/* CarNet – feuille de style unique, sans dépendance externe */
:root {
  --rouge: #E30613; --rouge-fonce: #B5121B; --encre: #262626; --gris: #6B6B6B; --ligne: #E3E3E3;
  --fond: #F6F6F4; --carte: #FFFFFF; --jaune: #FFF6D6; --vert: #1E8E3E; --orange: #C26A00; --bleu: #1A5FB4;
  --rayon: 10px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
       color: var(--encre); background: var(--fond); line-height: 1.45; }
a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 .2rem; font-weight: 650; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 .6rem; font-weight: 650; }
h3 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--rouge); margin: 0 0 .6rem; }
.muted, .aide { color: var(--gris); font-size: .9rem; }

/* barre du haut */
.barre { background: #fff; border-bottom: 3px solid var(--rouge); position: sticky; top: 0; z-index: 10; }
.barre .int { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 1.4rem; padding: .55rem 1.2rem; }
.logo { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--encre); font-size: 1.15rem; }
.logo img { height: 34px; }
.logo span small { display: block; font-weight: 400; font-size: .72rem; color: var(--gris); letter-spacing: .04em; }
.nav { display: flex; gap: .2rem; flex: 1; }
.nav a { color: var(--encre); padding: .45rem .75rem; border-radius: 8px; font-weight: 550; }
.nav a:hover, .nav a.actif { background: #FBE7E8; color: var(--rouge-fonce); text-decoration: none; }
.recherche-globale input { width: 230px; }
.user { font-size: .85rem; color: var(--gris); white-space: nowrap; }

main { max-width: 1240px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
.entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* cartes et grilles */
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.1rem 1.2rem; }
.grille { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .nav { flex-wrap: wrap; } .recherche-globale { display: none; } }
.chiffre { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.chiffre.rouge { color: var(--rouge); }

/* boutons */
.btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #CFCFCF; background: #fff; color: var(--encre);
       padding: .5rem .9rem; border-radius: 8px; font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; }
.btn:hover { background: #F2F2F2; text-decoration: none; }
.btn.principal { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.btn.principal:hover { background: var(--rouge-fonce); }
.btn.petit { padding: .25rem .6rem; font-size: .85rem; }
.btn.danger { color: var(--rouge-fonce); border-color: #E9B4B7; }

/* tableaux */
table.liste { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; }
.liste th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gris);
            background: #FAFAFA; padding: .55rem .7rem; border-bottom: 1px solid var(--ligne); }
.liste td { padding: .5rem .7rem; border-bottom: 1px solid #F0F0F0; vertical-align: top; }
.liste tr:last-child td { border-bottom: 0; }
.liste tr.clic:hover td { background: #FFF7F7; cursor: pointer; }
.liste tr.annule td { color: #9A9A9A; text-decoration: line-through; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.total td { font-weight: 700; background: #FAFAFA; }

/* pastilles de statut */
.pastille { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.pastille.vert { background: #E3F4E8; color: var(--vert); }
.pastille.orange { background: #FDEFD9; color: var(--orange); }
.pastille.rouge { background: #FBE0E2; color: var(--rouge-fonce); }
.pastille.bleu { background: #E3EDFA; color: var(--bleu); }
.pastille.gris { background: #ECECEC; color: #777; }
.orange-fond { background: #FCE4D6; }

/* formulaires */
label { display: block; font-size: .82rem; font-weight: 600; color: #444; margin-bottom: .2rem; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=search], input[type=password],
select, textarea {
  width: 100%; font: inherit; padding: .45rem .55rem; border: 1px solid #CFCFCF; border-radius: 7px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #F5B5B9; border-color: var(--rouge); }
input.num { text-align: right; }
input.nb { text-align: center; }
.champ { margin-bottom: .75rem; }
.champ .aide { font-size: .78rem; margin-top: .15rem; }
.erreur, .errorlist { color: var(--rouge-fonce); font-size: .85rem; list-style: none; padding: 0; margin: .2rem 0; }
.saisie { background: var(--jaune); }
input.orange { background: #FCE4D6; }
fieldset { border: 0; padding: 0; margin: 0; }

/* messages */
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li { padding: .65rem .9rem; border-radius: 8px; margin-bottom: .4rem; background: #E3F4E8; color: #165c2b; }
.messages li.error { background: #FBE0E2; color: var(--rouge-fonce); }

/* bon : tableau des prix */
.prix td { padding: .3rem .3rem; }
.prix input { padding: .3rem .4rem; }
.prix input.nb { width: 58px; }
.prix input.num { width: 104px; }
.prix select { width: auto; padding: .2rem .3rem; font-size: .85rem; margin-top: .15rem; }
.prix .lib { width: auto; }
.totaux { margin-top: .6rem; border-top: 2px solid var(--encre); padding-top: .5rem; }
.totaux div { display: flex; justify-content: space-between; padding: .15rem 0; }
.totaux .grand { font-size: 1.2rem; font-weight: 700; color: var(--rouge); }
.definition { display: grid; grid-template-columns: 150px 1fr; gap: .3rem .8rem; margin: 0; }
.definition dt { color: var(--gris); font-size: .88rem; }
.definition dd { margin: 0; }
.voyageurs td input { margin: 0; }
pre.copie { white-space: pre-wrap; background: #fff; border: 1px solid var(--ligne); border-radius: 8px; padding: .8rem; font-size: .9rem; }
.pagination { display: flex; gap: .6rem; align-items: center; margin-top: .8rem; }
.vide { color: var(--gris); font-style: italic; }

/* connexion */
.connexion { max-width: 380px; margin: 9vh auto; }
.connexion .carte { padding: 1.8rem; }
.connexion img { height: 56px; display: block; margin: 0 auto .6rem; }
footer.pied { display: flex; align-items: center; justify-content: center; gap: .7rem; color: #999; font-size: .78rem; padding: 1.5rem; }
footer.pied img { height: 28px; width: auto; display: block; opacity: .9; }

.alerte { background: #FDECEC; border: 1px solid #E30613; color: #A00000; border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.alerte div { font-weight: 400; margin-top: .2rem; }

/* ---------------------------------------------------------------- plan du car */
.plan-stats { display: flex; flex-wrap: wrap; gap: 1.4rem; margin: .4rem 0 1rem; color: var(--gris); }
.plan-stats strong { color: var(--encre); font-size: 1.15rem; }
.plan-stats .rouge, .plan-stats .rouge strong { color: var(--rouge); }
.plan-grille { display: grid; grid-template-columns: minmax(0, 560px) minmax(260px, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 900px) { .plan-grille { grid-template-columns: 1fr; } }
.plan-aide { color: var(--gris); font-size: .85rem; margin-bottom: .5rem; }
.car { background: #fff; border: 2px solid #CFCFCF; border-radius: 28px 28px 12px 12px; padding: 14px; }
.rangee { display: grid; grid-template-columns: 1fr 1fr 22px 1fr 1fr; gap: 5px; margin-bottom: 5px; }
.allee { }
.poste { grid-column: span 2; display: flex; align-items: center; justify-content: center; background: #F0F0F0;
         color: var(--gris); border-radius: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; min-height: 54px; }
.porte { grid-column: span 2; border-radius: 8px; min-height: 54px; display: flex; align-items: center; justify-content: center;
         color: #888; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
         background: repeating-linear-gradient(-60deg, #ECECEC 0 8px, #fff 8px 16px); }
.siege { position: relative; min-height: 54px; border-radius: 8px; border: 1.5px dashed #C9C9C9; background: #FAFAFA;
         text-align: left; padding: 4px 6px 4px 6px; cursor: pointer; font: inherit; display: flex; flex-direction: column;
         justify-content: flex-end; overflow: hidden; }
.siege.large { grid-column: span 2; }
.siege .no { position: absolute; top: 3px; right: 6px; font-size: .68rem; color: #999; }
.siege .nom { font-size: .76rem; font-weight: 600; line-height: 1.15; padding-right: 14px; word-break: break-word; }
.siege .tel { font-size: .66rem; color: var(--gris); }
.siege.occupe { border: 1.5px solid #D6D6D6; border-left: 4px solid var(--rouge); background: #fff; }
.siege.reserve { border: 1.5px solid #E7D38A; background: #FFF8DC; }
.siege.reserve .nom { font-style: italic; font-weight: 500; }
.siege.libre:hover { border-color: var(--rouge); background: #FDF1F1; }
.siege.choisi, .personne.choisi { outline: 3px solid #1E6FD9; outline-offset: 1px; }
.gens { max-height: calc(100vh - 160px); overflow: auto; position: sticky; top: 80px; }
.gens-bon { margin-bottom: .7rem; }
.gens-titre { font-size: .78rem; color: var(--gris); margin-bottom: .2rem; }
.personne { display: flex; justify-content: space-between; align-items: center; gap: .5rem; width: 100%; text-align: left;
            border: 1px solid #E1E1E1; background: #fff; border-radius: 8px; padding: .35rem .55rem; margin-bottom: 3px;
            font: inherit; font-size: .88rem; cursor: pointer; }
.personne .badge { font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; background: #FDECEC; color: var(--rouge-fonce); white-space: nowrap; }
.personne.placee .badge { background: #E9F5EC; color: #1E7B34; }
.plan-barre { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: #262626; color: #fff;
              border-radius: 12px; padding: .6rem .8rem; display: flex; gap: .6rem; align-items: center; z-index: 50;
              box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 30px); flex-wrap: wrap; }
.plan-barre[hidden] { display: none; }
.plan-barre .reserve-nom { padding: .35rem .5rem; border-radius: 6px; border: 1px solid #888; }
.entete .actions form { display: inline; }
