/* Charte CO d'Octodure : fond gris clair, gris anthracite, bleu du logo */
:root {
  --fond: #fafafa; --carte: #ffffff; --texte: #4a4a4a; --titre: #555555;
  --bleu: #0195e3; --bleu-fonce: #0065a9; --ligne: #d9d9d9;
  --rouge: #c62828; --rouge-fond: #fdecea; --orange: #e67e00; --orange-fond: #fff4e0;
  --bleu-fond: #e6f4fc; --vert: #2e7d32; --vert-fond: #e8f5e9;
  --police: "DIN Next LT Pro", "DIN Pro", "DIN", "Barlow", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police); font-weight: 400;
       font-size: 16px; line-height: 1.45; letter-spacing: .01em; }
a { color: var(--bleu-fonce); }
h1, h2, h3 { font-weight: 300; color: var(--titre); letter-spacing: .02em; margin: .2em 0 .5em; }
h1 { font-size: 1.8rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }

/* En-tete */
.tete { display: flex; justify-content: space-between; align-items: center; max-width: 1240px; margin: 0 auto;
        padding: 22px 24px 10px; }
.tete .titre { font-size: 2.3rem; font-weight: 300; color: var(--titre); letter-spacing: .03em; line-height: 1.1;
               text-shadow: 0 3px 6px rgba(0,0,0,.18); }
.tete .sous-titre { font-size: 1.6rem; font-weight: 300; color: var(--bleu-fonce); text-shadow: 0 3px 6px rgba(0,0,0,.15); }
.tete .logo { height: 64px; }

/* Onglets : trait fin en haut, trait epais bleu pour l'onglet actif */
.onglets { display: flex; flex-wrap: wrap; gap: 0 28px; align-items: flex-start; max-width: 1240px; margin: 0 auto 18px;
           padding: 0 24px; }
.onglets a { display: block; min-width: 120px; padding: 10px 14px 4px; border-top: 1px solid #555; text-align: center;
             text-decoration: none; color: var(--texte); font-size: 1.05rem; letter-spacing: .04em; }
.onglets a:hover { color: var(--bleu-fonce); }
.onglets a.actif { border-top: 5px solid var(--bleu-fonce); padding-top: 6px; color: var(--bleu-fonce); }
.tete .droite { text-align: right; }
.tete .util { font-size: .9rem; margin-top: 4px; }
.tete .util a { color: var(--texte); text-decoration: none; }
.tete .util button.lien { padding: 0; font-size: .9rem; }
@media (max-width: 1100px) { .onglets { gap: 0 12px; } .onglets a { min-width: 0; } }

main { max-width: 1240px; margin: 0 auto; padding: 0 24px 40px; }
.centre main { max-width: 480px; }
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: 4px; padding: 18px 20px; margin-bottom: 18px; }
.etroite { max-width: 460px; margin: 30px auto; }
.grille2 { display: grid; grid-template-columns: 3fr 2fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .grille2 { grid-template-columns: 1fr; } .tete .titre { font-size: 1.7rem; } .tete .logo { height: 44px; } }
.titre-ligne { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* Formulaires */
label { display: block; margin: 0 0 12px; font-size: .92rem; color: var(--titre); }
label.case { display: flex; gap: 8px; align-items: center; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #bdbdbd; border-radius: 3px; background: #fff; color: var(--texte); }
label > input:not([type=checkbox]), label > select { display: block; width: 100%; margin-top: 4px; }
button, .bouton { font: inherit; background: var(--bleu-fonce); color: #fff; border: 1px solid var(--bleu-fonce); border-radius: 3px;
                  padding: 8px 16px; cursor: pointer; text-decoration: none; display: inline-block; letter-spacing: .03em; }
button:hover, .bouton:hover { background: var(--bleu); border-color: var(--bleu); }
button.sec, .bouton.sec { background: #fff; color: var(--bleu-fonce); }
button.sec:hover, .bouton.sec:hover { background: var(--bleu-fond); }
button.danger { color: var(--rouge); border-color: var(--rouge); }
button.lien { background: none; border: none; color: var(--texte); padding: 10px 6px 4px; font-size: .95rem; }
button.lien:hover { color: var(--bleu-fonce); background: none; }
form.inline { display: inline-flex; gap: 6px; align-items: center; }
.ligne-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ligne-form label { margin-bottom: 0; }
.actions form { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.actions button, .actions select, .actions input { padding: 4px 8px; font-size: .85rem; }
.motif { width: 110px; }

/* Messages */
.flash { padding: 10px 14px; border-radius: 3px; margin-bottom: 14px; }
.flash.ok { background: var(--vert-fond); border-left: 4px solid var(--vert); }
.flash.err { background: var(--rouge-fond); border-left: 4px solid var(--rouge); }
.alerte { padding: 10px 14px; border-radius: 3px; margin-bottom: 14px; }
.alerte.n1 { background: var(--rouge-fond); border-left: 5px solid var(--rouge); }
.alerte.n2 { background: var(--orange-fond); border-left: 5px solid var(--orange); }
.alerte.n3 { background: var(--bleu-fond); border-left: 5px solid var(--bleu); }
.petit { font-size: .85rem; color: #777; }
.rouge { color: var(--rouge); }
.cle-totp { font-family: Consolas, monospace; font-size: 1.3rem; letter-spacing: .12em; background: #f1f1f1; padding: 10px; text-align: center; border-radius: 3px; }
.pastille { display: inline-block; padding: 2px 10px; border-radius: 12px; background: #eee; font-size: .85rem; }
.pastille.ok { background: var(--vert-fond); color: var(--vert); }

/* Badges allergies / regimes : 1 rouge, 2 orange, 3 bleu */
.badge { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 3px; font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.badge.n1 { background: var(--rouge); color: #fff; }
.badge.n2 { background: var(--orange); color: #fff; }
.badge.n3 { background: var(--bleu-fond); color: var(--bleu-fonce); border: 1px solid var(--bleu); }
.badge small { font-weight: 400; }

/* Tableaux */
table.liste { width: 100%; border-collapse: collapse; }
.liste th { text-align: left; font-weight: 400; color: #777; border-bottom: 2px solid var(--ligne); padding: 6px 8px; font-size: .9rem; }
.liste td { border-bottom: 1px solid #eee; padding: 6px 8px; vertical-align: top; }
.liste tr.annule td { text-decoration: line-through; color: #aaa; }
.liste tr.annule td.actions { text-decoration: none; }
.liste tr.termine td { color: #aaa; }
.liste tr.ligne-n1 td:first-child { box-shadow: inset 4px 0 var(--rouge); }
.liste tr.ligne-n2 td:first-child { box-shadow: inset 4px 0 var(--orange); }

/* Ecran cuisine (tablette) */
.cuisine main { max-width: 1400px; }
.compteur { font-size: 1.2rem; }
.attention { background: var(--rouge-fond); border: 2px solid var(--rouge); border-radius: 4px; padding: 12px 16px; margin-bottom: 16px; }
.attention h2 { color: var(--rouge); font-weight: 600; margin-top: 0; }
.att-ligne { padding: 6px 0; border-bottom: 1px solid #f3c6c2; font-size: 1.1rem; }
.att-ligne:last-child { border-bottom: none; }
.aide { color: #777; }
.grille-eleves { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tuile { background: #fff; color: var(--texte); border: 2px solid var(--ligne); border-radius: 6px; padding: 12px; text-align: left;
         min-height: 92px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.tuile:hover { background: #fff; border-color: var(--bleu); }
.tuile .nom { font-size: 1.1rem; font-weight: 600; }
.tuile .classe { font-size: .85rem; color: #888; }
.tuile .etat { font-weight: 700; color: var(--rouge); }
.tuile.bord-n1 { border-left: 8px solid var(--rouge); }
.tuile.bord-n2 { border-left: 8px solid var(--orange); }
.tuile.absent { background: #eee; opacity: .75; }
.tuile.absent .nom { text-decoration: line-through; }
.tuile.envoi { opacity: .5; }
.onglets-service { display: flex; gap: 6px; }
.valider { margin-top: 22px; text-align: center; }
button.gros { font-size: 1.2rem; padding: 16px 28px; background: var(--vert); border-color: var(--vert); }
button.gros:hover { background: #388e3c; }

/* Impression */
.impression { background: #fff; padding: 10px 20px; font-size: 12px; }
.impression h1 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.cadre-attention { border: 2px solid #000; padding: 6px 10px; margin: 8px 0; }
.page { page-break-after: always; }
@media print {
  .non-imprime { display: none; }
  .badge.n1 { border: 1px solid #000; }
}

/* ================= Salle des Alambics ================= */
.pastille.attention { background: var(--orange-fond); color: var(--orange); }
.vert { color: var(--vert); }
.petit.rouge, td.rouge { color: var(--rouge); }
.centre-texte { text-align: center; }
h2.inline { display: inline; }
summary { cursor: pointer; }
textarea { width: 100%; margin-top: 4px; }
textarea.mono { font-family: Consolas, "Courier New", monospace; font-size: .92rem; }
.champs4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 10px; }
@media (max-width: 700px) { .champs4 { grid-template-columns: 1fr 1fr; } }
.droite-bas { text-align: right; margin-top: 10px; }
body.evenement .grille2 { grid-template-columns: 3fr 2fr; }
table.classes input, table.classes select { width: 100%; padding: 4px 6px; font-size: .88rem; }
table.classes input.court { width: 58px; } table.classes input.moyen { width: 92px; }
table.classes td { padding: 4px; vertical-align: middle; }

/* Plan */
.plan-zone { display: grid; grid-template-columns: 1fr 270px; gap: 18px; align-items: start; }
@media (max-width: 1150px) { .plan-zone { grid-template-columns: 1fr; } }
.salle { overflow-x: auto; padding: 14px 10px; }
label.case > input[type=radio], label.case > input[type=checkbox] { display: inline-block; width: auto; margin: 0; flex: none; }
.scene { text-align: center; background: #555; color: #fff; letter-spacing: .4em; padding: 6px; border-radius: 0 0 40% 40% / 0 0 18px 18px;
         margin: 0 auto 14px; max-width: 70%; font-size: .9rem; }
.rang { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.rang .lettre { width: 18px; text-align: center; font-weight: 600; color: #888; flex: none; }
.rang .sieges { display: flex; justify-content: center; gap: 2px; flex: 1; }
.rang.rang-libre .siege:not([class*=" c-"]) { background: repeating-linear-gradient(45deg, #fff, #fff 3px, #eee 3px, #eee 6px); }
.siege { width: 36px; height: 30px; padding: 1px; border: 1px solid #bbb; border-radius: 4px 4px 2px 2px; background: #fff; color: #999;
         display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; cursor: pointer; flex: none; }
.siege:hover { border-color: var(--bleu-fonce); background-color: inherit; filter: brightness(.95); }
.siege .nu { font-size: 13px; font-weight: 600; color: #333; }
.siege[class*=" c-"] { border-color: rgba(0,0,0,.35); }
.siege.prof { box-shadow: inset 0 0 0 2px #333; }
.siege.prof .nu { color: #000; }
.siege.verrou { border: 3px solid #000; }
.siege.inactif { opacity: .25; cursor: not-allowed; }
.siege.choisi { outline: 3px solid var(--bleu); outline-offset: 1px; }
.siege.envoi { opacity: .5; }
.outils .modes label { margin-bottom: 6px; }
.outils .sous-mode { display: flex; gap: 6px; margin: 0 0 8px 24px; }
.outils .sous-mode select { padding: 4px; font-size: .9rem; }
.legende { list-style: none; padding: 0; margin: 0 0 14px; }
.legende li { margin-bottom: 8px; font-size: .92rem; }
.pastille-couleur { display: inline-block; width: 14px; height: 14px; border: 1px solid rgba(0,0,0,.35); border-radius: 3px; vertical-align: -2px; margin-right: 4px; }

/* Impression du plan (A4 paysage) */
.impression-plan { background: #fff; padding: 10px 16px; font-size: 11px; color: #222; }
.impr-tete { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #333; margin-bottom: 8px; }
.impr-tete h1 { font-size: 20px; font-weight: 600; margin: 0; color: #222; }
.impr-sous { margin: 2px 0 6px; font-size: 12px; }
.impr-infos { text-align: right; font-size: 12px; }
.impr-corps { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.impr-plan .siege { width: 30px; height: 17px; cursor: default; border-radius: 3px 3px 1px 1px; }
.impr-plan .siege .nu { font-size: 10px; }
.impr-plan .rang { margin-bottom: 1px; gap: 3px; } .impr-plan .rang .lettre { width: 12px; font-size: 10px; }
.impr-plan .scene { font-size: 10px; padding: 3px; margin-bottom: 8px; }
.impr-legende table { border-collapse: collapse; width: 100%; }
.impr-legende th { text-align: left; border-bottom: 1px solid #333; padding: 2px 4px; font-weight: 600; }
.impr-legende td { border-bottom: 1px solid #ddd; padding: 2px 4px; vertical-align: top; }
.impr-legende h2 { font-size: 13px; font-weight: 600; margin: 10px 0 4px; color: #222; }
.impr-texte { font-size: 10.5px; }
@page { size: A4 landscape; margin: 8mm; }
@media print {
  .impression-plan { padding: 0; }
  .siege, .pastille-couleur { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Bandeau du nom des classes entre les rangees */
.rang.bandeau { margin: 6px 0 2px; }
.rang.bandeau .vide { width: 36px; flex: none; }
.etiquette-classe { flex: none; display: block; text-align: center; font-weight: 700; font-size: 14px; letter-spacing: .03em; color: #222;
  padding: 2px 4px; border-radius: 4px; border: 1px solid rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.impr-plan .rang.bandeau { margin: 2px 0 1px; } .impr-plan .rang.bandeau .vide { width: 30px; }
.impr-plan .etiquette-classe { font-size: 10px; padding: 0 3px; line-height: 13px; }
@media print { .etiquette-classe { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.span-1 { width: 36px; } .impr-plan .span-1 { width: 30px; }
.span-2 { width: 74px; } .impr-plan .span-2 { width: 62px; }
.span-3 { width: 112px; } .impr-plan .span-3 { width: 94px; }
.span-4 { width: 150px; } .impr-plan .span-4 { width: 126px; }
.span-5 { width: 188px; } .impr-plan .span-5 { width: 158px; }
.span-6 { width: 226px; } .impr-plan .span-6 { width: 190px; }
.span-7 { width: 264px; } .impr-plan .span-7 { width: 222px; }
.span-8 { width: 302px; } .impr-plan .span-8 { width: 254px; }
.span-9 { width: 340px; } .impr-plan .span-9 { width: 286px; }
.span-10 { width: 378px; } .impr-plan .span-10 { width: 318px; }
.span-11 { width: 416px; } .impr-plan .span-11 { width: 350px; }
.span-12 { width: 454px; } .impr-plan .span-12 { width: 382px; }
.span-13 { width: 492px; } .impr-plan .span-13 { width: 414px; }
.span-14 { width: 530px; } .impr-plan .span-14 { width: 446px; }
.span-15 { width: 568px; } .impr-plan .span-15 { width: 478px; }
.span-16 { width: 606px; } .impr-plan .span-16 { width: 510px; }
.span-17 { width: 644px; } .impr-plan .span-17 { width: 542px; }
.span-18 { width: 682px; } .impr-plan .span-18 { width: 574px; }
.span-19 { width: 720px; } .impr-plan .span-19 { width: 606px; }
.span-20 { width: 758px; } .impr-plan .span-20 { width: 638px; }
.span-21 { width: 796px; } .impr-plan .span-21 { width: 670px; }
tr.autres-adultes td { border-bottom: 2px solid var(--ligne); padding-top: 0; }
.adulte { display: inline-flex; gap: 4px; align-items: center; margin: 2px 12px 2px 0; }
table.classes .adulte input { width: 170px; } table.classes .adulte select { width: auto; }
.adulte label.case { margin: 0; }
.adulte.ajout { color: #888; }
table.classes td:nth-child(4) input { min-width: 150px; }
.impr-legende td { font-size: 10px; }

/* Allee laterale (rangs N-T) et passage entre L et M */
.rang .vide.allee { width: 36px; flex: none; }
.impr-plan .rang .vide.allee { width: 30px; }
.passage { height: 10px; background: #bdbdbd; border-radius: 3px; margin: 10px 24px; }
.impr-plan .passage { height: 6px; margin: 4px 18px; }
