/* ============================================================
   app.css — Feuille de style unique, mobile-first
   ============================================================ */

/* ── Reset minimal ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; font-size: 16px;
       line-height: 1.5; color: #1a1a1a; background: #f5f5f5; }
a    { color: #0066cc; text-decoration: none; }
img  { max-width: 100%;  }

.logo {
    max-width: 100px;
    width: 100%;
    height: auto;
}


.logo {
    max-width: 100px;
    width: 100%;
    height: auto;
}
.logotech {
    max-width: 80px;
}



.login-logo .logo {
    max-width: 130px;
    width: 100%;
    height: auto;
}


/* ── Variables ────────────────────────────────────────────── */
:root {
  --bleu:      #0066cc;
  --vert:      #2b9530;
  --orange:    #e65100;
  --rouge:     #c62828;
  --gris-clair:#f0f0f0;
  --bordure:   #ddd;
  --radius:    10px;
  --shadow:    0 1px 4px rgba(0,0,0,.1);
}

/* ── Page de connexion ────────────────────────────────────── */
.login-page { display: flex; align-items: center; justify-content: center;
              min-height: 100vh; padding: 1rem; }
.login-container { background: #fff; border-radius: var(--radius);
                   box-shadow: var(--shadow); padding: 2rem; width: 100%;
                   max-width: 380px; }
.login-logo { text-align: center; margin-bottom: 1.5rem; }

/* ── Formulaires ──────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .875rem; font-weight: 600;
                    margin-bottom: .4rem; color: #444; }
input[type=text], input[type=email], input[type=password],
input[type=number], select, textarea {
  width: 100%; padding: .65rem .85rem; border: 1px solid var(--bordure);
  border-radius: 8px; font-size: 1rem; background: #fff;
  transition: border-color .15s; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--bleu); }

/* ── Boutons ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center;
       gap: .4rem; padding: .7rem 1.2rem; border: none; border-radius: 8px;
       font-size: 1rem; font-weight: 600; cursor: pointer;
       transition: opacity .15s, transform .1s; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:active   { transform: scale(.97); }
.btn-primary  { background: var(--bleu);   color: #fff; }
.btn-success  { background: var(--vert);   color: #fff; }
.btn-danger   { background: var(--rouge);  color: #fff; }
.btn-warning  { background: var(--orange); color: #fff; }
.btn-secondary{ background: #e0e0e0;       color: #333; }
.btn-full     { width: 100%; }
.btn-lg       { padding: 1rem; font-size: 1.1rem; border-radius: 12px; }

/* ── Alertes / messages ───────────────────────────────────── */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem;
         font-size: .9rem; }
.alert-danger  { background: #fdecea; color: #b71c1c; border: 1px solid #ef9a9a; }
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.alert-warning { background: #fff7eb; color: #e65100; border: 1px solid #ffcc80; }

.flash { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
         padding: .8rem 1.5rem; border-radius: 8px; font-weight: 600;
         z-index: 9999; display: none; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.flash-success { background: #2e7d32; color: #fff; }
.flash-danger  { background: #c62828; color: #fff; }
.flash-warning { background: #e65100; color: #fff; }

/* ── Badges de stock ──────────────────────────────────────── */
.badge-ok       { background: #e8f5e9; color: #2e7d32; }
.badge-bas      { background: #fff3e0; color: #e65100; }
.badge-critique { background: #fdecea; color: #c62828; font-weight: 700; }
.badge { padding: .2rem .6rem; border-radius: 20px; font-size: .8rem; }

/* ── Carte de contenu ─────────────────────────────────────── */
.card { background: #fff; border-radius: var(--radius);
        box-shadow: var(--shadow); margin-bottom: 1rem; overflow: hidden; }
.card-header { padding: .9rem 1rem; background: #fafafa;
               border-bottom: 1px solid var(--bordure);
               font-weight: 700; display: flex; align-items: center;
               justify-content: space-between; }
.card-body   { padding: 1rem; }

/* ── Navigation principale ────────────────────────────────── */
.topbar { background: var(--bleu); color: #fff; padding: .8rem 1rem;
          display: flex; align-items: center; justify-content: space-between;
          position: sticky; top: 0; z-index: 100; }
.topbar h2 { font-size: 1rem; font-weight: 700; }
.topbar a  { color: rgba(255,255,255,.85); font-size: .875rem; }

/* ── Layout principal ─────────────────────────────────────── */
.page { padding: 1rem; max-width: 640px; margin: 0 auto; }

/* ── Checklist ────────────────────────────────────────────── */
.checklist-item { display: flex; align-items: flex-start; gap: .75rem;
                  padding: .75rem 0; border-bottom: 1px solid #f0f0f0; }
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type=checkbox] { width: 22px; height: 22px;
                                        flex-shrink: 0; margin-top: 2px;
                                        accent-color: var(--bleu); cursor: pointer; }
.checklist-item label { cursor: pointer; line-height: 1.4; }
.checklist-item .btn-info { font-size: 1.2rem; border: 0;  color: #0277bd; margin-left: auto;   flex-shrink: 0; cursor:pointer}

/* ── Tâche critique (3 portes) ────────────────────────────── */
.checklist-item.critique { background: #fff3e0; border-radius: 8px;
                            padding: .75rem; border: 2px solid var(--orange); }
.checklist-item.critique label { font-weight: 700; color: var(--orange); }

/* ── Sélecteur de quantité ────────────────────────────────── */
.produit-row { display: flex; align-items: center; gap: .75rem;
               padding: .6rem 0; border-bottom: 1px solid #f0f0f0; }
.produit-row:last-child { border-bottom: none; }
.produit-nom  { flex: 1; font-size: .95rem; }
.produit-row select { width: 80px; }

/* ── Modale info ──────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5);
                 display: flex; align-items: flex-end; z-index: 200;
                 padding: 1rem; }
.modal-box     { background: #fff; border-radius: 14px; padding: 1.25rem;
                 width: 100%; max-height: 75vh; overflow-y: auto; }
.modal-box h3  { font-size: 1.1rem; margin-bottom: .75rem; }
.modal-close   { float: right; background: none; border: none;
                 font-size: 1.4rem; cursor: pointer; color: #666; }

/* ── Étapes d'intervention (accordéon) ───────────────────────*/
.etape { border: 1px solid var(--bordure); border-radius: var(--radius);
         margin-bottom: .75rem; overflow: hidden; }
.etape-header { padding: .9rem 1rem; background: #fafafa; cursor: pointer;
                display: flex; align-items: center; justify-content: space-between;
                font-weight: 700; }
.etape-header.done { background: #e8f5e9; color: var(--vert); }
.etape-body { padding: 1rem; display: none; }
.etape-body.open { display: block; }

/* ── Tableau de bord gestionnaire ────────────────────────────*/
@media (min-width: 600px) {
  .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}
.stat-card { background: #fff; border-radius: var(--radius); padding: 1rem;
             text-align: center; box-shadow: var(--shadow); }
.stat-card .valeur { font-size: 2rem; font-weight: 700; color: var(--bleu); }
.stat-card .libelle { font-size: .85rem; color: #666; }

/* ── Tableau ──────────────────────────────────────────────── */
.tableau { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tableau th { background: #f5f5f5; padding: .6rem .75rem;
              text-align: left; border-bottom: 2px solid var(--bordure); }
.tableau td { padding: .6rem .75rem; border-bottom: 1px solid #eee; }
.tableau tr:hover td { background: #fafafa; }





/* ============================================================
   gestionnaire.css — Styles de l'interface desktop gestionnaire
   Complète app.css (ne pas inclure sans app.css)
   ============================================================ */

/* ── Layout page ──────────────────────────────────────────── */
.g-page {
    padding: 1.25rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

.g-titre {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav-links {
    display: flex;
    gap: .25rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: rgba(255,255,255,.8);
    font-size: .875rem;
    padding: .35rem .75rem;
    border-radius: 6px;
    transition: background .12s;
}

.nav-links a:hover    { background: rgba(255,255,255,.15); color: #fff; }
.nav-links .nav-active { background: rgba(255,255,255,.2);  color: #fff; font-weight: 600; }

/* ── Two-col layout ───────────────────────────────────────── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }
}

/* ── Cartes gestionnaire ──────────────────────────────────── */
.g-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden;
    margin-bottom: 0;
}

.g-card-header {
    padding: .85rem 1.1rem;
    background: #fafafa;
    border-bottom: 1px solid #efefef;
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.g-card-body {
    padding: 1rem 1.1rem;
}

.g-card-body.vide {
    color: #aaa;
    font-size: .9rem;
    text-align: center;
    padding: 1.5rem;
}

.lien-voir {
    font-size: .82rem;
    font-weight: 400;
    color: #0066cc;
}

/* ── Stats grid (4 colonnes) ──────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 700px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    padding: 1.1rem 1.25rem;
    text-align: center;
}

.stat-card .valeur  { font-size: 2.2rem; font-weight: 800; color: #0066cc; line-height: 1.1; }
.stat-card .libelle { font-size: .8rem;  color: #888; margin-top: .2rem; }

.stat-card.stat-danger  .valeur { color: #c62828; }
.stat-card.stat-warning .valeur { color: #e65100; }
.stat-card.stat-danger  { border-color: #ffcdd2; background: #fff5f5; }
.stat-card.stat-warning { border-color: #ffe0b2; background: #fffbf0; }

/* ── Tournée row (liste) ──────────────────────────────────── */
.tournee-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid #f5f5f5;
    gap: 1rem;
}
.tournee-row:last-child { border-bottom: none; }

.tournee-meta {
    font-size: .82rem;
    color: #888;
    margin-top: .2rem;
}

.en-cours-badge {
    display: inline-block;
    background: #fff3e0;
    color: #e65100;
    font-size: .75rem;
    font-weight: 600;
    padding: .1rem .45rem;
    border-radius: 10px;
}

/* ── Pulse badge (tournée en cours) ───────────────────────── */
.pulse-badge {
    font-size: .85rem;
    font-weight: 600;
    color: #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}

/* ── Alertes ──────────────────────────────────────────────── */
.alerte-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1.1rem;
    border-bottom: 1px solid #f5f5f5;
    gap: 1rem;
}
.alerte-row:last-child { border-bottom: none; }

.alerte-critique { background: #fff5f5; }
.alerte-bas      { background: #fffbf0; }




/**Color FAs*/


.faw-gris {
    color: #b2b1bf;
}
.faw-vert {
    color: #22c55e;
}

/*Tournée active*/
.aire-row   { display:flex; align-items:center; justify-content:space-between;
              padding:.85rem 1rem; border-bottom:1px solid #f0f0f0;
              transition:background .15s; }
.aire-row:last-child { border-bottom:none; }
.aire-done  { background:#e3fde3; opacity:.90; }
.aire-reload {     width: 22px;    height: 22px;    font-size: 13px;    display: flex;    color: white;    background-color: #0066cc;    border-radius: 3px;    justify-content: center;    align-items: center;}
.aire-active{ background:#ffd38d; }
.aire-info  { display:flex; align-items:center; gap:.75rem; }
.aire-statut-icone { font-size:1.2rem; }
.aire-nom   { font-weight:600; font-size:.95rem; }
.aire-heure { font-size:.8rem; color:#888; margin-top:.1rem; }