/* Gestion des camions : ajouts au style du Centre de services TI (styles.css copié du portail) */

/* Statuts d'entretien */
.st { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st-retard { background: #FBE2DE; color: #8E2617; }
.st-bientot { background: #FBEFD9; color: #7A4E00; }
.st-ok { background: #DFF1E6; color: #1E6B3F; }
.st-fait { background: #E3E9EE; color: #3E4F5C; }
.st-service { background: #DFF1E6; color: #1E6B3F; }
.st-garage { background: #FBEFD9; color: #7A4E00; }
.st-hors { background: #FBE2DE; color: #8E2617; }

/* Pastille du nombre d'avis */
.avis-btn { position: relative; }
.avis-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #B23A2B; color: #FFFFFF; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.avis-l { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.avis-l a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--bord); color: var(--texte); font-size: 14px; }
.avis-l a:hover { background: var(--hover); color: var(--texte); }

/* Champ + micro côte à côte */
.fld-mic { display: flex; gap: 8px; align-items: flex-start; }
.fld-mic .fld { flex: 1; min-width: 0; }
.fld-mic .hv-mic { margin-right: 0; margin-top: 1px; }
.hv-mic[aria-pressed="true"] { background: #B23A2B !important; box-shadow: 0 0 0 6px rgba(178, 58, 43, .25); animation: ecoute 1.2s ease-in-out infinite; }
@keyframes ecoute { 50% { box-shadow: 0 0 0 12px rgba(178, 58, 43, .08); } }
@media (prefers-reduced-motion: reduce) { .hv-mic[aria-pressed="true"] { animation: none; } }
.ecoute-msg { margin: 0; color: #B23A2B; font-size: 14px; font-weight: 700; }
.ecoute-msg:empty { display: none; }

/* Grande dictée de l'entrée du logbook */
.dictee { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 16px; background: var(--lecture); border: 2px dashed var(--bord-2); }
.dictee .hv-mic { width: 72px; height: 72px; }
.dictee .hv-mic svg { width: 34px; height: 34px; }
.dictee p { margin: 0; }
.dictee .ex { font-size: 13px; color: var(--texte-2); }
.compris { padding: 12px 14px; border-radius: 12px; background: var(--sel); border: 1px solid var(--bord); font-size: 14px; }
.compris:empty { display: none; }
.compris ul { margin: 6px 0 0; padding-left: 18px; }

/* Calendrier mensuel */
.cal-nav { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--ligne); }
.cal-nav strong { flex: 1; font-size: 18px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal .jn { padding: 8px; font-size: 12px; font-weight: 700; color: var(--texte-2); background: var(--lecture); border-bottom: 1px solid var(--bord); text-align: center; }
.cal .j { min-height: 96px; padding: 6px; border-right: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .j:nth-child(7n) { border-right: none; }
.cal .j.hors { background: var(--lecture); opacity: .6; }
.cal .j.auj { box-shadow: inset 0 0 0 2px var(--bleu); }
.cal .j b { font-size: 13px; }
.cal .ev { display: block; padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal a.ev:hover { filter: brightness(.95); text-decoration: underline; }
@media (max-width: 700px) {
  .cal .j { min-height: 64px; padding: 4px; }
  .cal .ev { font-size: 0; padding: 0; width: 10px; height: 10px; border-radius: 5px; display: inline-block; }
}

/* Fiche camion */
.fiche-head .km { font-size: 26px; font-weight: 700; color: #FFFFFF; margin-top: 6px; }
.ent-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ent-l li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 12px; }
.ent-l li .t { flex: 1 1 180px; min-width: 0; }
.ent-l li .t strong { display: block; font-size: 14px; }
.ent-l li .t span { font-size: 12px; color: var(--texte-2); }

/* Pièces : quantités */
.qte { display: inline-flex; gap: 6px; align-items: center; }
.qte button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--bord-2); background: var(--surface); color: var(--texte); font: inherit; font-weight: 700; cursor: pointer; }
.qte b { min-width: 28px; text-align: center; }
.bas td { background: rgba(178, 58, 43, .06); }

.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Formulaires : blocs titrés et bouton Supprimer */
fieldset.bloc { margin: 0; padding: 16px; border: 1px solid var(--bord); border-radius: 14px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
fieldset.bloc legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--texte-2); text-transform: uppercase; letter-spacing: .04em; }
.form-foot .btn-danger { margin-right: auto; color: var(--danger); border-color: var(--danger); }
.form-foot .btn-danger:hover { background: rgba(178, 58, 43, .08); color: var(--danger); }
.sec-titre { margin: 22px 0 10px; font-size: 18px; }
.pieces-l { display: flex; flex-direction: column; gap: 8px; }
.pieces-l .ligne { display: flex; gap: 8px; align-items: center; }
.pieces-l select { flex: 1; min-width: 0; }
.pieces-l input { width: 80px; }

/* Écran de connexion Microsoft */
body.hors-ligne .hdr-nav, body.hors-ligne .pop-wrap, body.hors-ligne nav { display: none !important; }
.connexion { max-width: 440px; margin: 10vh auto; padding: 32px 28px; text-align: center; background: var(--surface); border: 1px solid var(--bord); border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.connexion h1 { margin: 0; font-size: 24px; }
.connexion p { margin: 0; color: var(--texte-2); }
.connexion .err { color: var(--danger); font-weight: 600; }
