/* Page de connexion — même mise en page sur tous les outils (modèle : espace
   YH, /connexion), charte My AfterSchool : encre bleue à gauche, papier à
   droite, ambre en accent, filets, aucune carte, rayon 0, aucune ombre.
   Préfixe cx- : la page vit aussi dans le socle des centres, à côté d'autres
   feuilles de style. */
:root {
  --cx-encre: #16324F;
  --cx-encre-fonce: #0F2338;
  --cx-ambre: #E9A21B;
  --cx-ambre-fonce: #B87A08;
  --cx-papier: #F6F7F8;
  --cx-texte: #16324F;
  --cx-doux: #4A5F75;
  --cx-gris: #6E8298;
  --cx-trait: #D8DEE5;
  --cx-titre: "Raleway", "Segoe UI", sans-serif;
  --cx-corps: "Open Sans", "Segoe UI", sans-serif;
  --cx-mono: "JetBrains Mono", ui-monospace, monospace;
}
.cx, .cx * { box-sizing: border-box; }
body.cx-page { margin: 0; background: var(--cx-papier); font-family: var(--cx-corps); color: var(--cx-texte); font-size: 15px; line-height: 1.6; }
.cx { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); background: var(--cx-papier); }

/* ---- colonne encre ---- */
.cx-encre { position: relative; background: var(--cx-encre-fonce); color: #E6ECF2;
  padding: clamp(28px, 5vw, 64px) clamp(28px, 6vw, 88px) clamp(28px, 5vw, 56px) calc(clamp(28px, 6vw, 88px) + 34px);
  display: flex; flex-direction: column; justify-content: space-between; border-right: 3px solid var(--cx-ambre); }
.cx-encre::before { content: attr(data-rail); position: absolute; left: clamp(14px, 2vw, 26px); top: 50%;
  transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; font-family: var(--cx-mono);
  font-size: 0.62rem; letter-spacing: 0.24em; color: rgba(255,255,255,0.5); white-space: nowrap; text-transform: uppercase; }
.cx-encre::after { content: ""; position: absolute; left: calc(clamp(14px, 2vw, 26px) + 18px);
  top: clamp(28px, 5vw, 64px); bottom: clamp(28px, 5vw, 56px); width: 1px; background: rgba(255,255,255,0.16); }
.cx-marque { align-self: flex-start; display: inline-flex; align-items: center; margin: 0;
  font-family: var(--cx-titre); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: #fff; }
.cx-marque img { width: auto !important; height: 40px !important; max-width: 160px; object-fit: contain; margin-right: 14px; }
/* Le logo du centre est mis par branding.js, avec ses propres dimensions : on le borne. */
.cx-marque p { margin: 0; }
.cx-marque b { color: var(--cx-ambre); font-weight: 800; }
.cx-marque small { font-family: var(--cx-mono); font-weight: 400; font-size: 0.64rem; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.55); margin-left: 14px; text-transform: uppercase; }
.cx-eyebrow { font-family: var(--cx-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cx-gris); margin: 0; }
.cx-encre .cx-eyebrow { color: rgba(255,255,255,0.55); }
.cx-encre h1 { font-family: var(--cx-titre); font-size: clamp(2.6rem, 5.6vw, 5.4rem); line-height: 0.94; letter-spacing: -0.04em;
  font-weight: 800; color: #fff; max-width: 13ch; margin: 28px 0 22px; }
.cx-encre h1 em { font-style: normal; color: var(--cx-ambre); }
.cx-phrase { color: rgba(255,255,255,0.78); max-width: 44ch; font-size: 0.98rem; margin: 0; }
.cx-bas { display: flex; align-items: center; gap: 14px; font-family: var(--cx-mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.55); }
.cx-bas b { width: 8px; height: 8px; background: var(--cx-ambre); display: inline-block; }

/* ---- colonne papier ---- */
.cx-papier { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 64px) clamp(24px, 5vw, 72px); }
.cx-bloc { width: min(100%, 420px); }
.cx-tete { display: flex; align-items: baseline; gap: 14px; padding-bottom: 12px; border-bottom: 2px solid var(--cx-encre); margin-bottom: 22px; }
.cx-tete .cx-num { font-family: var(--cx-mono); font-size: 0.72rem; color: var(--cx-ambre-fonce); letter-spacing: 0.1em; }
.cx-tete h2 { font-family: var(--cx-titre); font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1; letter-spacing: -0.03em;
  font-weight: 800; margin: 0; white-space: nowrap; color: var(--cx-texte); }
.cx-tete .cx-eyebrow { margin-left: auto; }
.cx-aide { margin: 0 0 24px; color: var(--cx-doux); font-size: 0.95rem; max-width: 40ch; }
.cx-message { display: none; align-items: center; gap: 10px; padding: 12px 14px; margin: 0 0 18px; font-size: 0.9rem;
  border-left: 3px solid #C0261E; background: #FBE9E8; color: #8E1B15; border-radius: 0; }
.cx-message.visible, .cx-message.cx-visible { display: flex; }
.cx-message.cx-info { border-left-color: var(--cx-encre); background: #E3E9EF; color: var(--cx-encre); }

.cx-fournisseurs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--cx-encre); }
.cx-fournisseur { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 108px;
  padding: 18px 12px; background: var(--cx-papier); color: var(--cx-texte); font: 600 0.86rem/1.2 var(--cx-corps);
  text-decoration: none; text-align: center; border: 0; border-radius: 0; cursor: pointer; transition: background 0.2s, color 0.2s; }
.cx-fournisseur + .cx-fournisseur { border-left: 1px solid var(--cx-encre); }
.cx-fournisseur:only-child, .cx-fournisseur.cx-seul { grid-column: 1 / -1; }
.cx-fournisseur svg { width: 26px; height: 26px; }
.cx-fournisseur span { display: block; }
.cx-fournisseur small { display: block; font-family: var(--cx-mono); font-weight: 400; font-size: 0.62rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cx-gris); margin-top: 3px; }
.cx-fournisseur:hover, .cx-fournisseur:focus-visible { background: var(--cx-encre); color: #fff; outline: none; }
.cx-fournisseur:hover small, .cx-fournisseur:focus-visible small { color: rgba(255,255,255,0.6); }
.cx-separateur { display: flex; align-items: center; gap: 14px; margin: 26px 0 18px; font-family: var(--cx-mono); font-size: 0.66rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-gris); }
.cx-separateur::before, .cx-separateur::after { content: ""; flex: 1; height: 1px; background: var(--cx-trait); }

.cx-form { display: grid; }
.cx-form label { margin: 0 0 4px; font-size: 0.82rem; font-weight: 600; color: var(--cx-doux); }
.cx-champ { position: relative; }
.cx-form input { width: 100%; border: 0; border-bottom: 1px solid #B9C3CD; border-radius: 0; background: transparent; padding: 10px 0 12px;
  margin-bottom: 18px; font: 400 1.02rem var(--cx-corps); color: var(--cx-texte); box-shadow: none; }
.cx-form input:focus { outline: none; border-bottom: 2px solid var(--cx-ambre); padding-bottom: 11px; }
.cx-oeil { position: absolute; right: 0; top: 6px; background: none; border: 0; color: var(--cx-gris); cursor: pointer; padding: 6px; }
.cx-bouton { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; min-height: 52px; padding: 0 18px 0 22px;
  width: 100%; font: 600 0.95rem var(--cx-corps); color: #fff; background: var(--cx-encre); border: 1px solid var(--cx-encre);
  border-radius: 0; cursor: pointer; text-decoration: none; }
.cx-bouton:hover { background: var(--cx-encre-fonce); }
.cx-bouton svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.cx-bouton:disabled { opacity: 0.6; cursor: wait; }
.cx-pied { margin: 30px 0 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-family: var(--cx-mono);
  font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-gris); }
.cx-pied a { color: var(--cx-ambre-fonce); text-decoration: none; }
.cx-pied a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .cx { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cx-encre { border-right: 0; border-bottom: 3px solid var(--cx-ambre); padding-left: clamp(24px, 6vw, 40px); }
  .cx-encre::before, .cx-encre::after { display: none; }
  .cx-encre h1 { font-size: 2.3rem; margin: 18px 0 12px; }
  .cx-phrase { display: none; }
  .cx-bas { margin-top: 14px; }
  .cx-papier { align-items: flex-start; padding-top: 28px; }
  .cx-tete h2 { white-space: normal; }
}
