/* Application Horaire HECh — thème « Bleu pétrole »
   Menu latéral bleu pétrole, accents turquoise, fonds clairs, cartes arrondies, icônes fines. */

:root {
  --petrole: #123a42; --petrole-2: #0d2d34; --petrole-texte: #eaf6f6; --petrole-texte-2: #a9c6c9;
  --turquoise: #45d6c6; --turquoise-vif: #2cc3b2; --turquoise-doux: #d7f4ef; --turquoise-texte: #0c5f55;
  --vert: #0e6b5a; --vert-survol: #0b5a4b; --vert-texte: #ffffff;
  --orange: #f2854a; --orange-doux: #ffe6d4; --orange-texte: #b4500f;
  --jaune: #f6c945;
  --corail: #d9473f; --corail-doux: #fde5e2;
  --bleu-doux: #e1edfb; --bleu-texte: #1f5c99;
  --violet: #6b3fa0; --violet-doux: #f0e9fa;
  --fond: #e9f2f6; --surface: #ffffff; --surface-2: #f3f7f9; --surface-3: #e8eff2;
  --texte: #11242b; --texte-2: #5a6b72; --bord: #dbe5ea; --bord-fort: #c3d1d7;
  --rayon: 16px; --rayon-s: 10px;
  --ombre: 0 1px 2px rgba(18, 58, 66, .05), 0 4px 16px rgba(18, 58, 66, .06);
  --focus: 0 0 0 3px rgba(44, 195, 178, .45);
  --largeur-menu: 260px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --petrole: #0b252b; --petrole-2: #071b20; --petrole-texte: #e3f1f2; --petrole-texte-2: #8fb0b4;
    --turquoise-doux: #143f3b; --turquoise-texte: #7fe6da;
    --vert: #2cc3b2; --vert-survol: #45d6c6; --vert-texte: #062420;
    --orange-doux: #3d2614; --orange-texte: #ffb27f;
    --corail-doux: #3d1a18; --corail: #ff8a80;
    --bleu-doux: #172a40; --bleu-texte: #8cbcf0;
    --violet: #c7a6f2; --violet-doux: #2a2040;
    --fond: #0e191d; --surface: #152329; --surface-2: #1a2b32; --surface-3: #21353d;
    --texte: #e4eef1; --texte-2: #9bb0b7; --bord: #29404a; --bord-fort: #355260;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 16px/1.5 "Figtree", "Nunito Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
a { color: var(--vert); text-underline-offset: 2px; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .35rem; line-height: 1.15; }
h2 { font-size: 1.25rem; font-weight: 750; margin: 1.5rem 0 .75rem; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 1rem 0 .5rem; }
.sous-titre { color: var(--texte-2); margin: 0 0 1.5rem; font-size: 1.05rem; display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lien-evitement { position: absolute; left: -9999px; }
.bandeau-environnement { background: var(--orange-doux); color: var(--orange-texte); text-align: center; font-size: .85rem; font-weight: 700; padding: .35rem 1rem; border-bottom: 1px solid var(--orange); }
.lien-evitement:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 100; border-radius: 8px; }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }

/* ---------- Menu latéral ---------- */
.menu-lateral {
  position: fixed; inset: 0 auto 0 0; width: var(--largeur-menu); z-index: 30;
  background: var(--petrole); color: var(--petrole-texte);
  display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
}
.menu-haut { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 1.25rem 1.25rem; }
.marque { display: flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; }
.logo { width: 46px; height: 46px; flex: none; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.1; }
.marque-texte strong { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.marque-texte span { font-size: .95rem; font-weight: 600; color: var(--petrole-texte); opacity: .92; }
.fermer-menu { display: none; }
.menu { list-style: none; margin: 0; padding: 0 .75rem; display: flex; flex-direction: column; gap: .2rem; }
.menu a, .menu button {
  display: flex; align-items: center; gap: .8rem; width: 100%; padding: .7rem .9rem; border-radius: 12px;
  color: var(--petrole-texte); text-decoration: none; font: inherit; font-weight: 600; font-size: 1.02rem;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.menu a:hover, .menu button:hover { background: rgba(255, 255, 255, .08); }
.menu a[aria-current="page"] { background: var(--turquoise); color: var(--petrole-2); }
.menu .ic { width: 1.45em; height: 1.45em; }
.menu-bas { margin-top: auto; padding: 1rem 0 0; position: relative; z-index: 1; }
.menu-secondaire a, .menu-secondaire button { font-size: .95rem; font-weight: 500; color: var(--petrole-texte-2); padding: .55rem .9rem; }
.menu-secondaire a:hover, .menu-secondaire button:hover { color: var(--petrole-texte); }
.menu-secondaire form { margin: 0; }
.decor { position: relative; height: 170px; flex: none; pointer-events: none; margin-top: -1rem; }
.decor span { position: absolute; border-radius: 50%; }
.decor .d1 { width: 200px; height: 200px; left: -60px; bottom: -70px; background: var(--turquoise-vif); }
.decor .d2 { width: 110px; height: 110px; left: 115px; bottom: 40px; background: var(--orange); }
.decor .d3 { width: 140px; height: 140px; left: 150px; bottom: -55px; background: var(--jaune); }
.pastille { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; padding: 0 .4em; border-radius: 999px; background: var(--orange); color: #fff; font-size: .75rem; font-weight: 700; margin-left: auto; }

.avec-menu .principal { margin-left: var(--largeur-menu); }
main { max-width: 1240px; margin: 0 auto; padding: 2.25rem 2rem 3rem; }
footer.pied { max-width: 1240px; margin: 0 auto; padding: 0 2rem 2rem; color: var(--texte-2); font-size: .85rem; }
.entete-mobile { display: none; }
.voile { display: none; }

@media (max-width: 960px) {
  .avec-menu .principal { margin-left: 0; }
  main { padding: 1.25rem 16px 2.5rem; }
  footer.pied { padding: 0 16px 1.5rem; }
  h1 { font-size: 1.6rem; }
  .entete-mobile {
    display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 20;
    background: var(--petrole); color: var(--petrole-texte); padding: .55rem 16px;
  }
  .bouton-menu, .cloche-mobile, .fermer-menu { background: none; border: 0; color: inherit; padding: .4rem; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; }
  .bouton-menu .ic, .cloche-mobile .ic, .fermer-menu .ic { width: 1.6em; height: 1.6em; }
  .marque-mobile { display: flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.2rem; margin-right: auto; }
  .marque-mobile .logo { width: 32px; height: 32px; }
  .js .menu-lateral { transform: translateX(-100%); transition: transform .2s ease; }
  .js .menu-ouvert .menu-lateral { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .js .menu-ouvert .voile { display: block; position: fixed; inset: 0; background: rgba(8, 25, 30, .45); z-index: 25; }
  .js .fermer-menu { display: inline-flex; }
  .no-js .menu-lateral { position: static; width: auto; }
  .no-js .decor, .no-js .entete-mobile .bouton-menu { display: none; }
}
@media (prefers-reduced-motion: reduce) { .js .menu-lateral { transition: none; } }

/* ---------- Cartes, grilles ---------- */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.35rem 1.5rem; box-shadow: var(--ombre); margin-bottom: 1.25rem; }
.carte > h2:first-child, .carte > h3:first-child, .carte > .titre-carte:first-child { margin-top: 0; }
@media (max-width: 640px) { .carte { padding: 1rem; border-radius: 14px; } }
.titre-carte { display: flex; align-items: center; gap: .85rem; margin: 0 0 1rem; font-size: 1.35rem; font-weight: 750; }
.titre-carte .pictogramme { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--turquoise-doux); color: var(--turquoise-texte); display: grid; place-items: center; flex: none; }
.titre-carte .pictogramme .ic { width: 1.4rem; height: 1.4rem; }
.titre-carte .discret { font-size: .95rem; font-weight: 500; }
.grille { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-bottom: 1.25rem; }
.deux-colonnes { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .deux-colonnes { grid-template-columns: 1fr; } }
.carte-action { display: flex; gap: .9rem; align-items: flex-start; text-decoration: none; color: var(--texte-2); margin: 0; transition: border-color .15s, transform .15s; }
.carte-action:hover { border-color: var(--turquoise-vif); transform: translateY(-1px); }
.carte-action strong { display: block; color: var(--texte); font-size: 1.05rem; margin-bottom: .2rem; }
.carte-action .pictogramme { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--turquoise-doux); color: var(--turquoise-texte); display: grid; place-items: center; flex: none; }

/* ---------- Messages et bandeaux ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.message { padding: .8rem 1.1rem; border-radius: 12px; margin-bottom: .5rem; border: 1px solid transparent; font-weight: 500; }
.message.succes { background: var(--turquoise-doux); border-color: var(--turquoise-vif); color: var(--turquoise-texte); }
.message.erreur { background: var(--corail-doux); border-color: var(--corail); color: var(--corail); }
.message.alerte { background: var(--orange-doux); border-color: var(--orange); color: var(--orange-texte); }
.message.info { background: var(--bleu-doux); border-color: var(--bleu-texte); color: var(--bleu-texte); }
.bandeau { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: 14px; margin: 0 0 1.25rem; background: var(--bleu-doux); color: var(--texte); border: 1px solid transparent; }
.bandeau > .ic { color: var(--bleu-texte); margin-top: .1rem; }
.bandeau.verrou { background: var(--orange-doux); }
.bandeau.verrou > .ic { color: var(--orange-texte); }
.bandeau.interne { background: var(--violet-doux); }
.bandeau.interne > .ic { color: var(--violet); }
.bandeau.succes { background: var(--turquoise-doux); }
.bandeau.succes > .ic { color: var(--turquoise-texte); }
.bandeau .barre-actions { margin: .75rem 0 0; }

/* ---------- Pastilles d'état ---------- */
.etat { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; font-size: .88rem; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--texte-2); line-height: 1.2; }
.etat .ic { width: 1.05em; height: 1.05em; vertical-align: 0; }
.etat-A_COMPLETER { background: var(--corail-doux); color: var(--corail); }
.etat-BROUILLON { background: var(--orange-doux); color: var(--orange-texte); }
.etat-SOUMISE { background: var(--turquoise-doux); color: var(--turquoise-texte); }
.etat-OUVERT { background: var(--surface-3); color: var(--texte); }
.etat-EN_COURS { background: var(--orange-doux); color: var(--orange-texte); }
.etat-CLOTURE { background: var(--turquoise-doux); color: var(--turquoise-texte); }
.etat-CLOTURE .ic { width: .75em; height: .75em; }
.etat-interne { background: var(--violet-doux); color: var(--violet); }
.portee { display: inline-block; padding: .1rem .55rem; border-radius: 8px; font-size: .9rem; font-weight: 600; background: var(--surface-2); color: var(--texte); white-space: nowrap; }

/* ---------- Tableaux ---------- */
.table-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .75rem .6rem; border-bottom: 1px solid var(--bord); vertical-align: middle; }
th { font-size: .92rem; color: var(--texte); font-weight: 600; background: none; border-bottom-color: var(--bord-fort); }
tbody tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }
td.actions > * + * { margin-left: .35rem; }
.discret { color: var(--texte-2); font-size: .92rem; }
.vide { padding: 1.5rem; text-align: center; color: var(--texte-2); border: 1.5px dashed var(--bord-fort); border-radius: 14px; background: var(--surface-2); margin: 0; }
li.vide { list-style: none; }

/* ---------- Desiderata classés ---------- */
.demandes { list-style: none; padding: 0; margin: 0; }
.demandes-entete, .demande { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) 7rem auto; gap: 1rem; align-items: center; }
.demandes-entete { font-size: .92rem; font-weight: 600; padding: 0 0 .5rem; border-bottom: 1px solid var(--bord-fort); }
.demande { padding: .8rem 0; border-bottom: 1px solid var(--bord); }
.demande:last-child { border-bottom: 0; }
.rang { width: 2.3rem; height: 2.3rem; border-radius: 9px; background: var(--turquoise-doux); color: var(--turquoise-texte); display: grid; place-items: center; font-weight: 800; }
.demande .libelle { font-weight: 700; font-size: 1.05rem; }
.demande .nature { color: var(--texte-2); font-size: .88rem; }
.demande ul.details { margin: .25rem 0 0; padding-left: 1.1rem; color: var(--texte-2); font-size: .92rem; }
.demande .boutons { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.demande.a-verifier { background: var(--orange-doux); border-radius: 12px; padding-left: .6rem; padding-right: .6rem; }
@media (max-width: 720px) {
  .demandes-entete { display: none; }
  .demande { grid-template-columns: 2.6rem minmax(0, 1fr); gap: .5rem .75rem; align-items: start; }
  .demande .col-periode { grid-column: 2; }
  .demande .boutons { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- Formulaires ---------- */
form p, .champ { margin: 0 0 1rem; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; max-width: 100%; padding: .65rem .8rem; border: 1.5px solid var(--bord-fort); border-radius: 12px;
  background: var(--surface); color: var(--texte); font: inherit;
}
textarea { min-height: 5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--turquoise-vif); box-shadow: var(--focus); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.aide { display: block; color: var(--texte-2); font-size: .87rem; margin-top: .25rem; font-weight: 400; }
ul.errorlist { list-style: none; padding: .45rem .7rem; margin: 0 0 .45rem; background: var(--corail-doux); color: var(--corail); border-radius: 10px; font-size: .9rem; }
.choix ul, form ul[id], .choix > div[id], form div[id] > div { list-style: none; padding: 0; margin: 0; }
.choix ul, form ul[id], .choix > div[id] { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.choix label, form ul[id] label, .choix > div[id] label { font-weight: 500; display: inline-flex; gap: .45rem; align-items: center; }
.label-groupe { display: block; margin-bottom: .35rem; }
input[type=checkbox], input[type=radio] { width: 1.1rem; height: 1.1rem; accent-color: var(--vert); }
.case { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; }
.case input { margin-top: .2rem; flex: none; }
.ligne-champs { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
fieldset { border: 1px solid var(--bord); border-radius: 14px; padding: .9rem 1.1rem; margin: 0 0 1.1rem; }
legend { font-weight: 700; padding: 0 .4rem; }
.filtres { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; }
.filtres p { margin: 0; }
.champ-recherche { position: relative; margin: 0 0 1rem; }
.champ-recherche .ic { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--texte-2); width: 1.3rem; height: 1.3rem; pointer-events: none; }
.champ-recherche input { padding-left: 2.8rem; }

/* ---------- Boutons ---------- */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1.2rem; border-radius: 12px;
  border: 1.5px solid var(--vert); background: var(--vert); color: var(--vert-texte); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; line-height: 1.2; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--vert-survol); border-color: var(--vert-survol); }
.btn.secondaire { background: var(--surface); color: var(--vert); }
.btn.secondaire:hover { background: var(--turquoise-doux); }
.btn.danger { background: var(--surface); color: var(--corail); border-color: var(--corail); }
.btn.danger:hover { background: var(--corail-doux); }
.btn.petit { padding: .4rem .75rem; font-size: .9rem; font-weight: 600; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-icone {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px;
  border: 1.5px solid var(--bord-fort); background: var(--surface); color: var(--texte); cursor: pointer; text-decoration: none; padding: 0;
}
.btn-icone:hover { border-color: var(--vert); color: var(--vert); }
.btn-icone.danger:hover { border-color: var(--corail); color: var(--corail); }
.btn-icone[disabled] { opacity: .35; cursor: not-allowed; border-color: var(--bord); color: var(--texte-2); }
.btn-icone .ic { width: 1.2rem; height: 1.2rem; }
.barre-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.barre-fin { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; margin: 1.25rem 0; }
.barre-fin form { margin: 0; }
form.inline { display: inline; margin: 0; }
.fil-ariane { margin: 0 0 .6rem; font-size: .92rem; }
.fil-ariane a { display: inline-flex; align-items: center; gap: .2rem; text-decoration: none; color: var(--texte-2); font-weight: 600; }
.fil-ariane a:hover { color: var(--vert); }

/* ---------- Avatars ---------- */
.avatar { display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; font-weight: 800; font-size: 1rem; flex: none; letter-spacing: .02em; }
.avatar.grand { width: 3.6rem; height: 3.6rem; font-size: 1.25rem; }
.avatar.petit { width: 2.2rem; height: 2.2rem; font-size: .8rem; }
.avatar-0 { background: var(--turquoise-doux); color: var(--turquoise-texte); }
.avatar-1 { background: var(--surface-3); color: var(--texte); }
.avatar-2 { background: var(--orange-doux); color: var(--orange-texte); }
.avatar-3 { background: var(--bleu-doux); color: var(--bleu-texte); }

/* ---------- Support : page ticket ---------- */
.entete-ticket { display: flex; flex-wrap: wrap; gap: 1rem 0; padding-bottom: 1.1rem; border-bottom: 1px solid var(--bord); margin-bottom: 1.25rem; }
.entete-ticket > div { padding: 0 1.4rem; border-left: 1px solid var(--bord); display: flex; flex-direction: column; gap: .2rem; justify-content: center; }
.entete-ticket > div:first-child { padding-left: 0; border-left: 0; flex-direction: row; align-items: center; gap: .9rem; }
.entete-ticket .etiquette { color: var(--texte-2); font-size: .88rem; }
.entete-ticket .valeur { font-weight: 700; font-size: 1.05rem; }
@media (max-width: 640px) { .entete-ticket > div { border-left: 0; padding: 0 1rem 0 0; } }
.fil { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: 1.1rem; }
.fil .msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: start; }
.bulle { padding: .8rem 1.1rem; border-radius: 14px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; }
.msg.personnel .bulle { background: var(--turquoise-doux); }
.msg .meta { color: var(--texte-2); font-size: .85rem; margin: .35rem 0 0 .25rem; }
.msg .auteur { font-weight: 600; color: var(--texte); }
.fil .systeme { text-align: center; color: var(--texte-2); font-size: .85rem; }
.fil .systeme span { display: inline-block; padding: .25rem .8rem; border-radius: 999px; background: var(--surface-2); }
.reponse textarea { min-height: 6rem; }
.reponse .barre-fin { margin: .75rem 0 0; }

/* ---------- Divers ---------- */
.chiffres { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0 0 1.25rem; }
.chiffres a { text-decoration: none; }
.chiffre { display: block; padding: .8rem 1rem; border-radius: 14px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte-2); font-size: .9rem; height: 100%; }
.chiffre b { display: block; font-size: 1.6rem; color: var(--texte); line-height: 1.2; }
.chiffre.actif { border-color: var(--turquoise-vif); box-shadow: inset 0 0 0 1px var(--turquoise-vif); background: var(--turquoise-doux); }
dl.infos { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; }
dl.infos dt { color: var(--texte-2); }
dl.infos dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.infos { grid-template-columns: 1fr; } dl.infos dd { margin-bottom: .5rem; } }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.liste-simple { list-style: none; padding: 0; margin: 0; }
.liste-simple li { padding: .55rem 0; border-bottom: 1px solid var(--bord); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.liste-simple li:last-child { border-bottom: 0; }
details > summary { cursor: pointer; }

/* Page de connexion (sans menu) */
.sans-menu main { max-width: 460px; padding-top: 4rem; }
.sans-menu footer.pied { text-align: center; }
.connexion .marque-connexion { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.connexion .marque-connexion .logo { width: 54px; height: 54px; }
.connexion .marque-connexion strong { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1; }
.connexion .marque-connexion span { color: var(--texte-2); font-weight: 600; }
.connexion .btn { width: 100%; }
.demo-comptes { font-size: .92rem; }
.demo-comptes code { background: var(--surface-2); padding: .05rem .35rem; border-radius: 6px; }

/* ---------- Formulaire de demande guidé ---------- */
.choix-type { border: 0; padding: 0; margin: 0 0 1.25rem; }
.choix-type legend { font-size: 1.05rem; margin-bottom: .6rem; padding: 0; }
.cartes-choix { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.carte-choix { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border: 1.5px solid var(--bord-fort); border-radius: 14px; cursor: pointer; font-weight: 400; margin: 0; background: var(--surface); }
.carte-choix strong { display: block; font-size: 1.02rem; margin-bottom: .15rem; }
.carte-choix input { margin-top: .25rem; flex: none; }
.carte-choix:hover { border-color: var(--turquoise-vif); }
.carte-choix.choisie, .carte-choix:has(input:checked) { border-color: var(--turquoise-vif); background: var(--turquoise-doux); box-shadow: inset 0 0 0 1px var(--turquoise-vif); }
.tous-jours { margin-bottom: .6rem; }
.jours-choix div[id] > div, .jours-choix ul li { display: inline-flex; }
.jours-choix label { padding: .4rem .8rem; border: 1.5px solid var(--bord-fort); border-radius: 999px; cursor: pointer; }
.jours-choix label:has(input:checked) { border-color: var(--turquoise-vif); background: var(--turquoise-doux); color: var(--turquoise-texte); font-weight: 600; }
details.precision { border: 1px dashed var(--bord-fort); border-radius: 12px; padding: .6rem 1rem; margin: 0 0 1rem; }
details.precision > summary { font-weight: 600; color: var(--vert); }
details.precision[open] > summary { margin-bottom: .6rem; }
[hidden] { display: none !important; }

/* Action principale avec explication en dessous */
.action-principale { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; margin: 0; }
.case-aucun { padding: .9rem 1rem; margin: 0 0 1.1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--bord); }
.case-aucun .case { margin: 0; }
.case-aucun noscript .btn { margin-top: .6rem; }

/* ---------- Grille « semaine type » (vue horairiste) ---------- */
.semaines { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
@media (max-width: 640px) { .semaines { grid-template-columns: 1fr; } }
.semaine { margin: 0; }
.semaine figcaption { font-weight: 800; font-size: 1.1rem; margin-bottom: .5rem; }
.grille-semaine { display: grid; grid-template-columns: 3.1rem repeat(5, minmax(0, 1fr)); gap: 0 4px; }
.axe { position: relative; margin-top: 1.9rem; height: 440px; }
.repere { position: absolute; right: .4rem; transform: translateY(-50%); font-size: .75rem; color: var(--texte-2); white-space: nowrap; }
.repere:first-child { transform: none; }
.nom-jour { text-align: center; font-weight: 700; font-size: .9rem; height: 1.9rem; line-height: 1.9rem; }
@media (max-width: 1300px) { .nom-jour .suite { display: none; } }
.colonne { position: relative; height: 440px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--bord); }
.colonne .zone-evitee:last-of-type { border-radius: 0 0 9px 9px; }
.ligne-heure { position: absolute; left: 0; right: 0; border-top: 1px solid var(--bord); }
.zone-evitee { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, transparent 0 5px, color-mix(in srgb, var(--texte-2) 30%, transparent) 5px 7px); }
.bloc { position: absolute; box-sizing: border-box; border-radius: 7px; border: 1.5px solid var(--surface); font-size: .72rem; line-height: 1.15; cursor: help; }
.bloc-contenu { height: 100%; overflow: hidden; padding: 2px 4px; display: flex; flex-direction: column; gap: 1px; }
.bloc:hover, .bloc:focus { z-index: 5; filter: brightness(1.06); }
.infobulle { display: none; position: absolute; top: 0; left: calc(100% + 8px); width: 15rem; z-index: 10; padding: .65rem .8rem; border-radius: 10px;
  background: var(--petrole-2); color: var(--petrole-texte); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: .85rem; line-height: 1.35; cursor: default; }
.bulle-gauche .infobulle { left: auto; right: calc(100% + 8px); }
.bloc:hover .infobulle, .bloc:focus .infobulle, .bloc:focus-within .infobulle { display: flex; flex-direction: column; gap: .3rem; }
.infobulle-titre { font-weight: 700; display: flex; gap: .4rem; align-items: center; }
.infobulle-titre .portee { background: rgba(255, 255, 255, .14); color: inherit; font-size: .75rem; }
.infobulle-texte { font-weight: 600; }
.infobulle-remarque strong { color: var(--turquoise); }
.infobulle-sans { color: var(--petrole-texte-2); font-style: italic; }
.bloc:focus { outline: none; box-shadow: var(--focus); z-index: 2; }
.bloc .rang-bloc { font-weight: 800; font-size: .85rem; }
.bloc.court .bloc-contenu { flex-direction: row; align-items: center; gap: 4px; }
.bloc.court .plage-bloc { display: none; }
/* Priorité : rouge (forte) → orange → jaune (faible) */
.prio-1 { background: #c62828; color: #fff; }
.prio-2 { background: #e8562a; color: #fff; }
.prio-3 { background: #f39c3d; color: #3a1d00; }
.prio-4 { background: #f6cf4a; color: #3a2a00; }
.legende { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: 1rem 0 0; font-size: .85rem; color: var(--texte-2); }
.legende span { display: inline-flex; align-items: center; gap: .35rem; }
.pastille-legende { display: inline-block; width: 1rem; height: 1rem; border-radius: 4px; }
.pastille-legende.zone { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 3px, color-mix(in srgb, var(--texte-2) 45%, transparent) 3px 5px); border: 1px solid var(--bord); }
.a-cote li { flex-wrap: nowrap; align-items: flex-start; gap: .75rem; }
.a-cote li > span:nth-child(2) { flex: 1; }
.a-cote .rang { width: 2rem; height: 2rem; font-size: .9rem; flex: none; }

/* ---------- Tableaux de gestion (campagnes) ---------- */
.entete-tableau { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.outils-tableau { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.outils-tableau form { margin: 0; }
.compte-titre { display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.6rem; padding: 0 .5rem; border-radius: 999px; background: var(--turquoise-doux); color: var(--turquoise-texte); font-size: .9rem; }
.petit-champ { margin: 0; width: 14rem; max-width: 100%; }
.petit-champ input { padding-top: .45rem; padding-bottom: .45rem; }
.btn-icone.principal { background: var(--vert); border-color: var(--vert); color: var(--vert-texte); width: 2.6rem; height: 2.6rem; }
.btn-icone.principal:hover { background: var(--vert-survol); color: var(--vert-texte); }
.btn-icone.principal .ic { width: 1.4rem; height: 1.4rem; stroke-width: 2.25; }
.tableau-plein { width: 100%; }
.tableau-plein tbody tr:hover { background: var(--surface-2); }
.col-action, .col-case { width: 3.5rem; text-align: center; }
.col-case input { margin: 0; }
.col-case .case { justify-content: center; margin: 0; }
span.btn-icone[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* ---------- Fenêtre modale ---------- */
dialog.dialogue { width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: var(--rayon);
  padding: 1.25rem 1.5rem; background: var(--surface); color: var(--texte); box-shadow: 0 20px 60px rgba(8, 25, 30, .35); }
dialog.dialogue::backdrop { background: rgba(8, 25, 30, .5); }
dialog.dialogue[open]:not(:modal) { position: fixed; inset: 24px 0 auto; margin: 0 auto; z-index: 50; overflow: auto; }
.dialogue-entete { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.dialogue-entete h2 { margin: 0; }
.dialogue-recherche { margin-bottom: 1rem; }
.dialogue-table { max-height: 52vh; overflow: auto; border: 1px solid var(--bord); border-radius: 12px; }
.dialogue-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dialogue-pied { position: sticky; bottom: 0; margin: .9rem 0 0; }

/* Identité de la personne connectée (menu latéral) */
.identite { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.identite-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identite-role { font-size: .78rem; font-weight: 500; color: var(--turquoise); opacity: .9; }
.menu a[aria-current="page"] .identite-role { color: var(--petrole-2); }

/* ---------- Tri et filtres par colonne ---------- */
th .tri { all: unset; display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; font: inherit; font-weight: 600; color: inherit; border-radius: 6px; }
th .tri:hover { color: var(--vert); }
th .tri:focus-visible { box-shadow: var(--focus); }
.indic-tri { opacity: .35; }
.indic-tri::after { content: "⇅"; font-size: .85em; }
th[aria-sort] .indic-tri { opacity: 1; color: var(--vert); }
th[aria-sort="ascending"] .indic-tri::after { content: "↑"; }
th[aria-sort="descending"] .indic-tri::after { content: "↓"; }
.ligne-filtres td { padding: .35rem .4rem .6rem; border-bottom: 1px solid var(--bord-fort); background: var(--surface); }
.ligne-filtres input, .ligne-filtres select { padding: .3rem .5rem; font-size: .85rem; border-radius: 8px; min-width: 0; width: 100%; }
.info-filtre { margin: .5rem 0 0; }

/* ---------- Espace enseignant : une ligne par fiche annuelle ---------- */
.mes-fiches { list-style: none; margin: 0; padding: 0; }
.ma-fiche { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: .75rem 1.25rem; align-items: center;
  padding: 1rem 0; border-bottom: 1px solid var(--bord); }
.ma-fiche:first-child { padding-top: 0; }
.ma-fiche:last-child { border-bottom: 0; padding-bottom: 0; }
.ma-fiche-annee { display: flex; gap: .8rem; align-items: center; }
.ma-fiche-annee strong { display: block; font-size: 1.1rem; }
.ma-fiche-annee .discret { display: block; }
.ma-fiche-annee .pictogramme { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--surface-2); color: var(--texte-2); display: grid; place-items: center; flex: none; }
.ma-fiche-ouverte .ma-fiche-annee .pictogramme { background: var(--turquoise-doux); color: var(--turquoise-texte); }
.ma-fiche-etat { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.etat-ouverte { background: var(--turquoise-doux); color: var(--turquoise-texte); white-space: normal; }
.etat-ouverte .ic { width: .75em; height: .75em; color: var(--turquoise-vif); }
.ma-fiche-actions { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; justify-content: flex-end; }
.lien-discret { font-size: .9rem; color: var(--texte-2); }
.lien-discret:hover { color: var(--vert); }
@media (max-width: 760px) {
  .ma-fiche { grid-template-columns: 1fr; }
  .ma-fiche-actions { justify-content: flex-start; }
}

/* ---------- Support (help desk) ---------- */
.entete-page { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.entete-page .sous-titre { margin-bottom: 1rem; }
.chiffres a[aria-current="true"] .chiffre { border-color: var(--turquoise-vif); }
.tableau-tickets td { vertical-align: middle; }
.objet-ticket { font-weight: 700; color: var(--texte); text-decoration: none; }
.objet-ticket:hover { color: var(--vert); text-decoration: underline; }
.personne { display: inline-flex; align-items: center; gap: .55rem; line-height: 1.25; }
.type-ticket { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 8px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.type-ticket .ic { width: 1em; height: 1em; }
.type-fiche { background: var(--turquoise-doux); color: var(--turquoise-texte); }
.type-cours { background: var(--bleu-doux); color: var(--bleu-texte); }
.type-horaire { background: var(--orange-doux); color: var(--orange-texte); }
.type-autre { background: var(--surface-3); color: var(--texte); }
.ticket-grille { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.25rem; align-items: start; }
.ticket-grille > .carte { margin: 0; }
@media (max-width: 1100px) { .ticket-grille { grid-template-columns: 1fr; } }
.ticket-details h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.ticket-details h2 + dl, .ticket-details dl + h2, .ticket-details p + h2 { margin-top: 0; }
.ticket-details dl.infos { grid-template-columns: 1fr; gap: .1rem; margin-bottom: 1.25rem; }
.ticket-details dl.infos dt { font-size: .82rem; margin-top: .5rem; }
.ticket-details dl.infos dd { font-weight: 600; }
.pile { display: flex; flex-direction: column; gap: .4rem; margin: 0 0 1rem; align-items: flex-start; }
.pile label { margin: 0; font-size: .88rem; color: var(--texte-2); }
/* Interrupteur « Suivre par e-mail » */
.suivi-email { margin: 0; }
.interrupteur { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 600; margin: 0; }
.interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.glissiere { width: 2.6rem; height: 1.45rem; border-radius: 999px; background: var(--bord-fort); position: relative; transition: background .15s; flex: none; }
.glissiere::after { content: ""; position: absolute; top: .18rem; left: .2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.interrupteur input:checked + .glissiere { background: var(--vert); }
.interrupteur input:checked + .glissiere::after { transform: translateX(1.1rem); }
.interrupteur input:focus-visible + .glissiere { box-shadow: var(--focus); }
.ic-suivant { transform: scaleX(-1); }
.tableau-tickets .col-objet { min-width: 12rem; }
.tableau-tickets .col-activite { min-width: 9rem; }
.tableau-tickets td, .tableau-tickets th { padding-left: .45rem; padding-right: .45rem; }
.validation-A_VALIDER { background: var(--orange-doux); color: var(--orange-texte); }
.validation-VALIDEE { background: var(--turquoise-doux); color: var(--turquoise-texte); }
.validation-REFUSEE { background: var(--corail-doux); color: var(--corail); }
.choix-motifs { display: flex; flex-direction: column; gap: .7rem; }
.decision-direction textarea { min-height: 3.5rem; }

/* Connexion Microsoft */
.btn-microsoft { width: 100%; background: var(--surface); color: var(--texte); border-color: var(--bord-fort); gap: .7rem; }
.btn-microsoft:hover { background: var(--surface-2); border-color: var(--texte-2); }
.logo-microsoft { width: 1.2rem; height: 1.2rem; flex: none; }
.separateur-connexion { display: flex; align-items: center; gap: .75rem; color: var(--texte-2); font-size: .88rem; margin: 1.2rem 0; }
.separateur-connexion::before, .separateur-connexion::after { content: ""; flex: 1; border-top: 1px solid var(--bord); }

/* Analyse d'un texte collé : aperçu des demandes proposées */
table.propositions td:first-child { width: 2.5rem; text-align: center; }
table.propositions td:last-child { max-width: 28rem; font-style: italic; }
table.propositions tr.a-verifier td { background: var(--orange-doux); }
table.propositions label { font-weight: 500; }
.choix-6h { display: grid; gap: .6rem; }

/* Priorités de placement */
.tableau-priorites .champ-heures { width: 5.5rem; text-align: right; padding: .35rem .5rem; }
.tableau-priorites td { vertical-align: middle; }
.jauge { display: inline-block; width: 6rem; height: .6rem; border-radius: 99px; background: var(--surface-3); overflow: hidden; vertical-align: middle; }
.jauge span { display: block; height: 100%; border-radius: 99px; }
.jauge-impossible span { background: #8f1d17; }
.jauge-forte span { background: var(--corail); }
.jauge-moyenne span { background: var(--orange); }
.jauge-faible span { background: var(--jaune); }
.jauge-aisee span { background: var(--turquoise-vif); }
.valeur-jauge { margin-left: .5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
tr.tension-impossible td:first-child { box-shadow: inset 4px 0 0 #8f1d17; }
tr.tension-forte td:first-child { box-shadow: inset 4px 0 0 var(--corail); }
.marge-negative { color: var(--corail); font-weight: 700; }
.alertes { font-size: .85rem; }
.alerte-ligne { display: inline-block; margin: 0 .3rem .25rem 0; padding: .1rem .5rem; border-radius: 99px; background: var(--orange-doux); color: var(--orange-texte); white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jauge-impossible span { background: #ff5a4f; } }
.tableau-priorites .col-tension, .tableau-priorites .col-nombre { white-space: nowrap; }
