/* ==========================================================
   BASE EXISTANTE (INCHANGÉE)
   ========================================================== */

/* ... TON CSS ACTUEL EXACTEMENT TEL QU’IL EST ... */
/* 👉 je ne le répète pas ici pour éviter les doublons */
/* 👉 garde-le tel quel jusqu’à la fin */

/* ==========================================================
   EXTENSION MODERNE – ADMIN / DOCUMENTS / PROJETS
   ========================================================== */

/* ---------- GLOBAL ---------- */
body {
    background: #f4f6f9;
    font-family: 'Segoe UI', Verdana, Helvetica, sans-serif;
}

/* ---------- LAYOUT ---------- */
main {
    padding: 1px;
}

/* ---------- TITRES ---------- */
.page-header h1,
.form-card h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

/* ---------- BARRES DE FILTRES / TABS ---------- */
.filter-bar,
.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.filter-btn,
.tab-btn {
    background: #e9ecef;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.tab-btn:hover {
    background: #dce1e7;
}

.filter-btn.active,
.tab-btn.active {
    background: #0D6BC3;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(13,107,195,0.3);
}

#btn-add,
.tab-btn.add {
    background: #198754;
    color: #ffffff;
}

#btn-add:hover,
.tab-btn.add:hover {
    background: #157347;
}

.tab-btn.print {
    background: #6c757d;
    color: white;
}

/* ---------- TABLEAUX MODERNES ---------- */
.tableau {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.tableau thead {
    background: #f1f3f6;
}

/* ==========================================================
   TABLEAUX MODERNES – VERSION COMPACTE
   ========================================================== */

.tableau th {
    padding: 8px 10px;          /* ↓ hauteur d’en-tête */
    font-size: 13px;
    line-height: 1.1;
}

.tableau td {
    padding: 4px 8px;          /* ↓ hauteur des lignes */
    font-size: 16px;
    line-height: 0.9;
}
.tableau .nombre {
	text-align: right;
	margin-right:3px;
}
.tableau .nombregras {
	text-align: right;
	font-size: 16px;
	font-weight: bold;
	margin-right:3px;
}
/* --- Alignement et style numérique --- */
.tableau .nombre-vert {
    text-align: right;   
    font-weight: bold;
	color: #2ecc71; 
}
.tableau td.nombre-rouge {
    text-align: right; 
    font-weight: bold;
	color: #e74c3c;
}
/* Zebra style “papier” */
.tableau tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.tableau tbody tr:nth-child(even) {
    background-color: #eef4fb;  /* bleu très léger */
}

/* Hover discret */
.tableau tbody tr:hover {
    background-color: #ddeaff;
}

/* ---------- ICONES ---------- */
.tableau img {
    width: 22px;
    opacity: 0.75;
    transition: 0.2s;
}

.tableau img:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ---------- FORMULAIRES (AJOUT DOC / PV) ---------- */
.form-card {
    background: white;
    width: 100%;
    max-width: 650px;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    margin: auto;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #495057;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0D6BC3;
    box-shadow: 0 0 0 2px rgba(13,107,195,0.15);
}

/* ---------- ACTIONS ---------- */
.form-actions {
    text-align: right;
    margin-top: 25px;
}

.btn-submit {
    background: #0D6BC3;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    display: none;
}

.btn-submit:hover {
    background: #0b5ed7;
}

/* ---------- ALERTES ---------- */
.alert-error {
    background: #fdecea;
    color: #842029;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c2c7;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .filter-bar,
    .tab-bar {
        flex-direction: column;
    }

    .tableau th:nth-child(3),
    .tableau td:nth-child(3),
    .tableau th:nth-child(4),
    .tableau td:nth-child(4) {
        display: none;
    }
}
mark {
    background-color: #ffe066;
    padding: 0 2px;
}
.app-header {
  background: linear-gradient(90deg, #2c3e50, #34495e);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 48px;
}

.title span {
  font-size: 0.85em;
  opacity: .8;
}

.user-info {
  font-size: 0.9em;
}

.user-info a {
  color: #ffd966;
  margin-left: 10px;
  text-decoration: none;
}

.main-nav {
  background: #1f2a36;
  display: flex;
  gap: 10px;
  padding: 8px 20px;
}

.main-nav > a,
.dropdown > button {
  color: #fff;
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 500;
}

.main-nav > a:hover,
.dropdown:hover button {
  background: #34495e;
  border-radius: 6px;
}
/* Mes boutons */
.button {
    border: none;
    color: white;
    padding: 5px 15px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 15px;
    margin: 2px 1px;
    cursor: pointer;
    border-radius: 999px;
}
/* red */
 .button1 {
        background-color: #ff6347;
    }
/* green */ 
 .button2 {
        background-color: #04AA6D;
    }
/* bleu */ 
 .button21 {
        background-color: #ddeaff;
		font-size: 20px;
    }
/* bleu */ 
 .button22 {
        background-color: #E67863;
		font-size: 20px;
    }
.button23 {
    background-color: #ff0000; /* rouge */
    color: #ffffff;           /* texte blanc */
    font-size: 22px;
}

/* gray */ 
 .button3 {
        background-color: #d3d3d3;
    }

    /* Green */
	 /* New style for disabled buttons */
  .button-disabled {
    pointer-events: none; /* Prevents all pointer events */
    opacity: 0.6; /* Makes it look slightly faded */
    cursor: not-allowed; /* Changes cursor to indicate it's not clickable */
  }
/* ==========================================================
   MODE FICHE A4 – AFFICHAGE & IMPRESSION
   ========================================================== */

/* Zone A4 */
.page-a4 {
    width: 210mm;
    min-height: 297mm;
    margin: 20px auto;
    background: #ffffff;
    padding: 20mm;
    box-sizing: border-box;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Neutralisation du style "app" pour la fiche */
.page-a4 table {
    box-shadow: none;
}

.page-a4 h1,
.page-a4 h2,
.page-a4 h3 {
    color: #000;
}

/* Tables version impression */
.page-a4 table {
    width: 100%;
    border-collapse: collapse;
}

.page-a4 th,
.page-a4 td {
    border: 1px solid #000;
    padding: 8px;
    font-size: 13px;
}

/* ==========================================================
   MODE FICHE A4 – AFFICHAGE & IMPRESSION
   ========================================================== */

/* Zone A4 */
.page-a4 {
    width: 210mm;
    min-height: 297mm;
    margin: 20px auto;
    background: #ffffff;
    padding: 20mm;
    box-sizing: border-box;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Neutralisation du style "app" pour la fiche */
.page-a4 table {
    box-shadow: none;
}

.page-a4 h1,
.page-a4 h2,
.page-a4 h3 {
    color: #000;
}

/* Tables version impression */
.page-a4 table {
    width: 100%;
    border-collapse: collapse;
}

.page-a4 th,
.page-a4 td {
    border: 1px solid #000;
    padding: 8px;
    font-size: 13px;
}

/* Impression */
@page {
    size: A4 landscape;
    margin: 20mm;
}
@media print {
    button {
        display: none !important;
    }
}

@media print {
    body {
        background: none;
    }

    /* Masquer navigation / header */
    .app-header,
    .main-nav,
    .filter-bar,
    .tab-bar,
    .button,
    .btn-submit {
        display: none !important;
    }

    .page-a4 {
        margin: 0;
        padding: 0;
        box-shadow: none;
        width: 100%;
        min-height: auto;
    }
}
