/* Assiduité FISE — charte ENSEA : rouge #A6004C (Pantone 207), gris #706F6F */
:root {
  --rouge: #A6004C; --rouge-f: #7d0039; --rouge-c: #f6e5ed;
  --gris: #706F6F; --gris-c: #E2E2E2; --fond: #f5f5f5;
  --vert: #1e8e4a; --vert-c: #dff3e6; --orange: #d9661f; --orange-c: #fbe6d8;
  --rayon: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "DejaVu Sans", Verdana, sans-serif; font-size: 15px; color: #222; background: var(--fond); }
a { color: var(--rouge); }
h1 { font-size: 1.35rem; margin: 0 0 .8rem; color: var(--rouge); }
h2 { font-size: 1.1rem; margin: 0 0 .8rem; color: var(--rouge); }

.bandeau { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  background: #fff; border-bottom: 4px solid var(--rouge); padding: .4rem 1rem; position: sticky; top: 0; z-index: 10; }
.marque { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--gris); font-size: 1.1rem; }
.marque img { height: 46px; }
.marque strong { color: var(--rouge); }
nav { display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; }
nav a, .lien { color: var(--gris); text-decoration: none; padding: .45rem .7rem; border-radius: 6px; background: none; border: 0; font: inherit; cursor: pointer; }
nav a:hover, .lien:hover { background: var(--rouge-c); color: var(--rouge); }
.inline { display: inline; margin: 0; }

main { max-width: 1280px; margin: 0 auto; padding: 1rem; padding-bottom: 6rem; }
.carte { background: #fff; border-radius: var(--rayon); padding: 1.2rem 1.4rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.etroite { max-width: 520px; margin-left: auto; margin-right: auto; }
.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; }
.grille-2 .carte { margin: 0; }
.aide { color: var(--gris); font-size: .88rem; }

.msg { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: var(--rouge-c); }
.msg.success { background: var(--vert-c); color: #135c30; }
.msg.error { background: var(--orange-c); color: #8a3a0c; }
.msg.alerte { background: #fff3cd; border-left: 5px solid var(--orange); color: #6b3a0b; }
.msg.info { background: #eef2f5; color: #3b4b57; }
.journal td.desc { width: 60%; }
.journal tr.alerte td { background: #fff3cd !important; }
.badge { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 99px; background: var(--gris-c); }
.badge.appel { background: var(--vert-c); } .badge.import, .badge.ade { background: #e6eefb; }
.badge.admin, .badge.compte { background: var(--rouge-c); } .badge.echec_connexion { background: var(--orange-c); }
.aide-page h2 { margin-top: 1.6rem; } .aide-page li { margin: .25rem 0; } .aide-page .sommaire { columns: 2 220px; }

label { display: block; margin: .3rem 0; }
input, select { font: inherit; padding: .55rem .6rem; border: 1px solid #c9c9c9; border-radius: 6px; background: #fff; max-width: 100%; }
select, input[type=search], .carte form input[type=file], form > div input:not([type=checkbox]) { width: 100%; }
form > div { margin-bottom: .8rem; }
.helptext { display: block; color: var(--gris); font-size: .82rem; }
.errorlist { color: var(--orange); margin: .2rem 0; padding-left: 1rem; }

.btn { display: inline-block; font: inherit; padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid var(--rouge); background: #fff;
  color: var(--rouge); cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--rouge-c); }
.btn.principal { background: var(--rouge); color: #fff; font-weight: bold; }
.btn.principal:hover { background: var(--rouge-f); }
.btn.principal:disabled { background: #bbb; border-color: #bbb; cursor: not-allowed; }
.btn.discret { border-color: var(--gris-c); color: var(--gris); }
.btn.large { width: 100%; padding: .85rem; font-size: 1.05rem; margin-top: .6rem; }
.btn.petit { padding: .25rem .6rem; font-size: .85rem; }

/* sélection */
.etapes fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
.etapes legend { font-weight: bold; color: var(--gris); margin-bottom: .4rem; padding: 0; }
.etapes .ligne { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.etapes .ligne input { width: 100%; }
.num { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--rouge); color: #fff; font-size: .85rem; margin-right: .3rem; }
.choix { display: flex; gap: .6rem; flex-wrap: wrap; }
.choix label { margin: 0; }
.choix input { position: absolute; opacity: 0; }
.choix span { display: block; padding: .7rem 1.4rem; border: 2px solid var(--gris-c); border-radius: 8px; cursor: pointer; min-width: 90px; text-align: center; font-weight: bold; }
.choix small { display: block; font-weight: normal; color: var(--gris); font-size: .78rem; }
.choix input:checked + span { border-color: var(--rouge); background: var(--rouge-c); color: var(--rouge); }
.choix input:focus-visible + span { outline: 3px solid var(--rouge); }

/* emploi du temps */
.edt-entete { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.edt-entete h1 { margin: 0; }
.jours { display: flex; gap: .3rem; flex-wrap: wrap; }
.creneaux { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .5rem; }
.creneau { display: grid; grid-template-columns: 70px 1fr auto; gap: .8rem; align-items: center; padding: .6rem .8rem; border: 1px solid var(--gris-c); border-left: 5px solid var(--gris-c); border-radius: 8px; }
.creneau.en-cours { border-left-color: var(--rouge); background: var(--rouge-c); }
.creneau.passe { opacity: .6; }
.heure { font-weight: bold; font-size: 1.05rem; color: var(--rouge); }
.heure small { display: block; color: var(--gris); font-weight: normal; font-size: .82rem; }
.maintenant { display: inline-block; margin-top: .2rem; font-size: .7rem; background: var(--rouge); color: #fff; padding: .05rem .4rem; border-radius: 99px; font-weight: normal; }
.detail small { display: block; color: var(--gris); font-size: .82rem; margin-top: .15rem; }
.actions { display: flex; flex-direction: column; gap: .3rem; align-items: stretch; }
.actions .btn { font-size: .88rem; padding: .45rem .8rem; }
.autres { margin-top: 1rem; }
.autres summary { cursor: pointer; color: var(--gris); font-weight: bold; padding: .3rem 0; }

/* feuille d'appel */
.entete-appel { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.sur-titre { margin: 0 0 .2rem; color: var(--gris); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.infos { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.pastille { background: var(--fond); border-radius: 99px; padding: .3rem .8rem; font-size: .88rem; display: inline-flex; align-items: center; gap: .3rem; margin: 0; }
.pastille input { border: 0; padding: 0; background: transparent; }
.pastille.info { background: var(--rouge-c); color: var(--rouge); }
.outils { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.outils input { width: 200px; }

.trombi { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.etu { background: #fff; border-radius: var(--rayon); border: 3px solid transparent; padding: .5rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: border-color .15s, background .15s; }
.etu.present { border-color: var(--vert); background: var(--vert-c); }
.etu.absent { border-color: var(--orange); background: var(--orange-c); }
.photo { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; border: 0; padding: 0; border-radius: 6px; overflow: hidden; background: var(--gris-c); cursor: pointer; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.initiales { display: grid; place-items: center; height: 100%; font-size: 2rem; color: var(--gris); font-weight: bold; }
.etat { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; display: none; place-items: center; color: #fff; font-weight: bold; font-size: 1.1rem; }
.present .etat { display: grid; background: var(--vert); }
.present .etat::after { content: "✓"; }
.absent .etat { display: grid; background: var(--orange); }
.absent .etat::after { content: "✗"; }
.absent .photo img { filter: grayscale(.8); opacity: .75; }
.identite { margin: .45rem 0; line-height: 1.25; font-size: .92rem; min-height: 2.5em; }
.identite small { display: block; color: var(--gris); font-size: .75rem; }
.boutons { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.boutons button { font: inherit; font-size: .82rem; padding: .45rem .2rem; border-radius: 6px; border: 1px solid var(--gris-c); background: #fff; cursor: pointer; }
.present .b-p { background: var(--vert); color: #fff; border-color: var(--vert); font-weight: bold; }
.absent .b-a { background: var(--orange); color: #fff; border-color: var(--orange); font-weight: bold; }

.trombi.en-liste { grid-template-columns: 1fr; gap: .35rem; }
.en-liste .etu { display: grid; grid-template-columns: 52px 1fr 220px; align-items: center; gap: .8rem; text-align: left; padding: .3rem .6rem; }
.en-liste .photo { width: 52px; }
.en-liste .initiales { font-size: 1rem; }
.en-liste .etat { width: 20px; height: 20px; font-size: .75rem; top: 2px; right: 2px; }
.en-liste .identite { margin: 0; min-height: 0; }
.en-liste .identite small { display: inline; margin-left: .5rem; }

.barre-bas { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--gris-c); padding: .7rem 1rem;
  display: flex; justify-content: flex-end; align-items: center; gap: .7rem; box-shadow: 0 -2px 8px rgba(0,0,0,.06); z-index: 5; }
#compteur { margin-right: auto; }
.vp { color: var(--vert); } .va { color: var(--orange); }

/* tableaux */
.defile { overflow-x: auto; }
.tableau { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tableau th { background: var(--rouge); color: #fff; text-align: left; padding: .5rem .6rem; }
.tableau td { padding: .45rem .6rem; border-bottom: 1px solid var(--gris-c); }
.tableau tbody tr:nth-child(even) td { background: #f2f2f2; }
.filtres { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.filtres select { width: auto; }
.case { display: flex; align-items: center; gap: .4rem; }
.rapport ul { margin: .3rem 0; }
.colonnes { columns: 3 200px; font-size: .9rem; }

@media (max-width: 600px) {
  .bandeau { position: static; padding: .3rem .5rem; }
  .marque img { height: 36px; }
  nav a, .lien { padding: .35rem .45rem; font-size: .88rem; }
  .marque span { display: none; }
  .trombi { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
  .en-liste .etu { grid-template-columns: 44px 1fr; }
  .en-liste .boutons { grid-column: 1 / -1; }
  .etapes .ligne { grid-template-columns: 1fr; }
  .outils input { width: 100%; }
  .creneau { grid-template-columns: 56px 1fr; }
  .creneau .actions { grid-column: 1 / -1; }
}
