/* Habillage du site des ateliers d'orientation, chargé APRÈS main.css.
   Couleur d'identité : le bordeaux du logo du lycée. */

:root {
  --encre: #231c1f;
  --encre-douce: #5d5358;
  --fond: #eef0f3;
  --carte: #ffffff;
  --trait: #d9d4d7;
  --bordeaux: #891b38;
  --bordeaux-fonce: #651028;
  --bordeaux-pale: #f8ecef;
  --vert: #2b6b4c;
  --alerte: #a8221a;
  --focus: #1c5fd1;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--encre);
  background: var(--fond);
}

/* bandeau d'identité en haut de chaque page */
body::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--bordeaux);
}

.font-robo { font-family: inherit; }

.bg-blue { background: var(--fond); }
.page-wrapper { min-height: 0; }
.p-t-100 { padding-top: 40px; }
.p-b-100 { padding-bottom: 56px; }
.wrapper--w680 { max-width: 640px; padding: 0 16px; }

/* ---- carte ---- */
.card, .card-1 { border-radius: 8px; }
.card-1 {
  box-shadow: 0 1px 2px rgba(35, 28, 31, .08), 0 6px 24px rgba(35, 28, 31, .06);
}
.card-1 .card-heading {
  padding-top: 0;
  height: 110px;
  background-size: 250px auto;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--trait);
}
.card-1 .card-body { padding: 24px 36px 36px; }

/* ---- titres ---- */
h1, h2, h3, h4, h5, h6, .title { font-weight: 600; line-height: 1.25; color: var(--encre); }
.title, h4.title, h2.title { font-size: 22px; margin: 0 0 18px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
strong { font-weight: 600; }
a { color: var(--bordeaux); }
a:hover { color: var(--bordeaux-fonce); }

/* ---- accessibilité : focus visible ---- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
.choix input:focus-visible + .choix-corps {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- boutons ---- */
.btn, .btn2, .btn3, .btn4, .btn5, .btn6 {
  display: inline-block;
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--bordeaux);
  cursor: pointer;
  transition: background .15s ease;
}
.btn--radius { border-radius: 6px; }
.btn--green, .btn--blue, .btn--red, .btn--orange, .btn--yellow, .btn--purple, .btn--sand { background: var(--bordeaux); color: #fff; }
.btn--green:hover, .btn--blue:hover, .btn--sand:hover, .btn:hover { background: var(--bordeaux-fonce); }
.btn6 { min-height: 36px; padding: 6px 14px; font-size: 14px; }
/* anciens boutons qui contiennent un lien : le lien prend la couleur du bouton */
button.btn a, button.btn2 a, button.btn3 a, button.btn4 a { color: inherit; text-decoration: none; }

.bouton-secondaire {
  display: inline-block; min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--trait); border-radius: 6px;
  background: #fff; color: var(--encre); font-weight: 600; text-decoration: none;
}
.bouton-secondaire:hover { border-color: var(--bordeaux); color: var(--bordeaux); }

/* ---- champs ---- */
select { width: 100%; max-width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; border: 1px solid #8d8388; border-radius: 6px; background: #fff; color: var(--encre); }
input[type=text], input[type=password], input[type=number], input[type=texte] {
  width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; font-size: 16px;
  border: 1px solid #8d8388; border-radius: 6px; color: var(--encre); background: #fff;
}
.input--style-1 { color: var(--encre); padding: 8px 10px; border: 1px solid #8d8388; border-bottom-width: 1px; }
.input--style-1::placeholder { color: var(--encre-douce); }
.input-group { margin-bottom: 14px; }
.champ { margin-bottom: 16px; }
.champ label { display: block; margin-bottom: 4px; font-weight: 600; }
.col-2 { width: 100%; }

/* ---- messages ---- */
.message { margin: 0 0 18px; padding: 10px 14px; border-radius: 6px; border-left: 4px solid var(--vert); background: #eaf4ee; }
.message.erreur { border-left-color: var(--alerte); background: #fbeceb; }

/* ---- tableaux (listes, statistiques) ---- */
table { width: 100%; border: 0; border-collapse: collapse; margin: 8px 0 20px; }
th, td { border: 0; border-bottom: 1px solid var(--trait); padding: 8px 10px; text-align: left; vertical-align: middle; }
th { background: var(--bordeaux-pale); color: var(--bordeaux-fonce); font-weight: 600; text-align: center; }
td[align=center] { text-align: center; }
tr:nth-child(even) td { background: #faf9fa; }
td a { font-weight: 600; }

/* ---- choix des ateliers ---- */
.creneau { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.creneau legend { padding: 0; margin-bottom: 10px; font-size: 18px; font-weight: 600; }
.creneau legend span { font-weight: 400; color: var(--encre-douce); }
.choix { display: block; position: relative; margin-bottom: 10px; }
.choix input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.choix-corps {
  display: block; padding: 12px 14px 12px 46px; position: relative;
  border: 1px solid #8d8388; border-radius: 8px; background: #fff;
}
.choix-corps::before {
  content: ""; position: absolute; left: 14px; top: 15px; width: 18px; height: 18px;
  border: 2px solid #8d8388; border-radius: 50%; background: #fff;
}
.choix input:checked + .choix-corps { border-color: var(--bordeaux); background: var(--bordeaux-pale); box-shadow: inset 0 0 0 1px var(--bordeaux); }
.choix input:checked + .choix-corps::before { border-color: var(--bordeaux); background: radial-gradient(var(--bordeaux) 0 45%, #fff 50%); }
.choix:hover input:not(:disabled) + .choix-corps { border-color: var(--bordeaux); }
.choix input:disabled { cursor: not-allowed; }
.choix input:disabled + .choix-corps { background: #f2f1f2; color: #6b6266; border-color: var(--trait); }
.choix input:disabled + .choix-corps::before { border-color: var(--trait); }
.choix-nom { display: block; font-weight: 600; }
.choix-info { display: block; font-size: 14px; color: var(--encre-douce); margin-top: 2px; }
.choix-info.dernier { color: var(--alerte); font-weight: 600; }
.jauge { display: block; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--trait); overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--bordeaux); }
.choix input:disabled + .choix-corps .jauge i { background: #9b9296; }

/* récapitulatif de l'inscription */
.recap { margin: 0 0 24px; padding: 0; list-style: none; }
.recap li { padding: 14px 0; border-bottom: 1px solid var(--trait); display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.recap .heure { font-size: 14px; color: var(--encre-douce); display: block; }
.recap .nom { font-size: 18px; font-weight: 600; }

.deconnexion { text-align: right; margin: 0 0 8px; font-size: 14px; }
.deconnexion a { color: var(--encre-douce); }

/* ---- menu d'administration ---- */
.etat { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 24px; padding: 14px 16px; border-radius: 8px; background: var(--bordeaux-pale); }
.etat strong { color: var(--bordeaux-fonce); }
.menu-groupe { margin: 0 0 22px; }
.menu-groupe h2 { font-size: 16px; margin: 0 0 6px; color: var(--encre-douce); font-weight: 600; }
.menu-groupe ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; }
.menu-groupe li + li { border-top: 1px solid var(--trait); }
.menu-groupe a { display: block; padding: 12px 16px; min-height: 44px; color: var(--encre); text-decoration: none; background: #fff; }
.menu-groupe a:hover { background: var(--bordeaux-pale); color: var(--bordeaux-fonce); }

/* ---- petits écrans ---- */
@media (max-width: 767px) {
  .p-t-100 { padding-top: 16px; }
  .wrapper--w680 { padding: 0 6px; }
  .card-1 .card-body { padding: 20px 14px 28px; overflow-x: auto; }   /* filet de sécurité : un tableau trop large défile dans la carte au lieu d'être coupé */
  .card-1 .card-heading { height: 90px; background-size: 210px auto; }
  th, td { padding: 8px 4px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- impression ---- */
@media print {
  body::before, .card-heading, .deconnexion, button, .btn { display: none; }
  .card-1 { box-shadow: none; }
}

/* espacement des textes courants dans la carte */
.card-body p { margin: 0 0 18px; }
.card-body .creneau + .creneau { margin-top: 8px; }

/* champs de capacité dans les tableaux */
table { table-layout: auto; }
input[type=number] { width: 72px; min-width: 64px; padding: 8px 4px; text-align: center; }
.largeurcapacite { width: 84px; }
.largeurcloture { width: 70px; }
.largeurbouton { width: auto; }

/* ---- écrans larges : plus de place pour les pages qui contiennent un tableau (listes, statistiques) ----
   Les pages de formulaire (connexion, choix des ateliers) gardent leur largeur étroite, plus lisible. */
@media (min-width: 900px) {
  .wrapper--w680:has(table) { max-width: min(1100px, 94vw); }
  .wrapper--w680:has(table) .card-1 .card-body { padding-left: 44px; padding-right: 44px; }
  /* tableaux élève / atelier 18 h / atelier 19 h : colonnes de 28 %, 36 % et 36 %, les intitulés tiennent sur une ligne */
  table:has(.largeuratelier) { table-layout: fixed; }
  table:has(.largeuratelier) .largeureleve2 { width: 28%; }
  table:has(.largeuratelier) .largeuratelier { width: 36%; }
}
