/* Portail pédagogique : pages hors coquille (connexion, administration, messages).
   Même charte que suite.css : fond lavande pointillé, cartes blanches, indigo et mauve. */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --encre: #1e1b39;
  --encre-2: #3a3660;
  --gris: #6c6890;
  --trait: #e9e7f7;
  --fond: #f4f3fb;
  --papier: #ffffff;
  /* Noms historiques conservés : l'action principale est désormais indigo. */
  --vert: #4f46e5;
  --vert-fonce: #4338ca;
  --vert-clair: #eeecfe;
  --ambre: #b45309;
  --ambre-clair: #fef3c7;
  --rouge: #e11d6f;
  --serif: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --mesure: 72rem;
  --ombre: 0 1px 2px rgba(30, 27, 57, .04), 0 8px 24px rgba(79, 70, 229, .06);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; color: var(--encre); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  background-color: var(--fond); background-image: radial-gradient(circle, #dedaf2 1px, transparent 1px); background-size: 22px 22px;
}
a { color: var(--vert); }
:focus-visible { outline: 3px solid rgba(79, 70, 229, .35); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

.bouton {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--vert); cursor: pointer; text-decoration: none;
  background: var(--vert); color: #fff; font: 600 14px/1 var(--sans); padding: 11px 16px; border-radius: 11px;
}
.bouton:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); }
.bouton.secondaire { background: #fff; color: var(--encre); border-color: var(--trait); }
.bouton.secondaire:hover { border-color: #dcd8f0; box-shadow: var(--ombre); }
.bouton:disabled { opacity: .55; cursor: not-allowed; }

input, select, textarea { font: inherit; color: var(--encre); background: #fff; border: 1px solid #dcd8f0; border-radius: 10px; padding: .6rem .75rem; }
input:focus, select:focus, textarea:focus { border-color: var(--vert); outline: none; box-shadow: 0 0 0 3px var(--vert-clair); }
label { font-size: .875rem; color: var(--gris); }
code { font-family: var(--mono); font-size: .9em; background: var(--fond); padding: 1px 5px; border-radius: 5px; }

/* ── En-tête (console hors coquille) ─────────────────────── */
.entete { margin: 14px 18px 0; background: rgba(255, 255, 255, .92); border: 1px solid var(--trait); border-radius: 18px; box-shadow: var(--ombre); }
.entete-int { max-width: var(--mesure); margin: 0 auto; padding: .75rem 1.2rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.marque { font-weight: 800; font-size: 1.05rem; color: var(--encre); text-decoration: none; margin-right: auto; letter-spacing: -.01em; }
.qui { font-size: .85rem; color: var(--gris); }
.entete nav { display: flex; gap: 1rem; }
.entete nav a { color: var(--encre-2); font-weight: 600; font-size: .9rem; text-decoration: none; }
.entete nav a:hover { color: var(--vert); }

/* ── Connexion ───────────────────────────────────────────── */
.page-connexion { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px; padding: 18px; }
.connexion-gauche {
  border-radius: 22px; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; color: var(--encre);
  background: linear-gradient(160deg, #ffffff 0%, #f1efff 55%, #ece8ff 100%); border: 1px solid var(--trait); box-shadow: var(--ombre);
}
.connexion-gauche h1 { font-weight: 800; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 1rem; }
.connexion-gauche p { color: var(--gris); max-width: 28rem; }
.connexion-cycle { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; counter-reset: e; max-width: 30rem; }
.connexion-cycle li { background: #fff; border: 1px solid var(--trait); border-radius: 14px; padding: 12px 14px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.connexion-cycle li::before { content: counter(e); counter-increment: e; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font: 700 12px var(--mono); }
.connexion-cycle li:nth-child(1)::before { background: #fef3c7; color: #b45309; }
.connexion-cycle li:nth-child(2)::before { background: #ffe4e6; color: #be123c; }
.connexion-cycle li:nth-child(3)::before { background: #ccfbf1; color: #0f766e; }
.connexion-cycle li:nth-child(4)::before { background: #e0e7ff; color: #4338ca; }
.connexion-droite { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.connexion-boite { width: 100%; max-width: 27rem; background: #fff; border: 1px solid var(--trait); border-radius: 22px; box-shadow: var(--ombre); padding: 2rem; }
.connexion-boite h2 { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; margin: 0 0 1.4rem; }
.fournisseurs { display: flex; flex-direction: column; gap: .6rem; }
.fournisseurs .bouton { justify-content: flex-start; padding: 13px 16px; }
.separateur { display: flex; align-items: center; gap: .8rem; color: var(--gris); font: 600 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; margin: 1.5rem 0; }
.separateur::before, .separateur::after { content: ''; flex: 1; height: 1px; background: var(--trait); }
.lien-courriel { display: flex; flex-direction: column; gap: .5rem; }
.lien-courriel .ligne { display: flex; gap: .5rem; }
.lien-courriel input { flex: 1; min-width: 0; }
.note { color: var(--gris); font-size: .85rem; margin-top: 1.4rem; }
.ok { color: #0f766e; font-size: .95rem; }
.erreur { color: var(--rouge); font-size: .9rem; margin: .6rem 0 0; min-height: 1.2em; }
.personnages .bouton { justify-content: space-between; }
.nom-personnage { font-weight: 400; color: var(--gris); font-size: .85rem; }
.champ-demo { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }

/* ── Cadre (ancienne entrée /cadre) ──────────────────────── */
.page-cadre { height: 100vh; overflow: hidden; background: var(--fond); }
.barre-cadre { height: 52px; background: #fff; border-bottom: 1px solid var(--trait); display: flex; align-items: center; gap: 1.2rem; padding: 0 1.2rem; }
.barre-cadre a { color: var(--vert); font-size: .9rem; font-weight: 600; }
.titre-cadre { font-weight: 800; margin-right: auto; }
.scene { position: relative; height: calc(100vh - 52px); }
.scene iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.voile { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; color: var(--gris); text-align: center; padding: 1.5rem; }

/* ── Page de message ─────────────────────────────────────── */
.page-message { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.message { background: #fff; border: 1px solid var(--trait); border-radius: 20px; box-shadow: var(--ombre); padding: 2rem 2.2rem; max-width: 34rem; }
.message h1 { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; margin: 0 0 .6rem; }
.message p { color: var(--encre-2); }

@media (max-width: 900px) {
  .page-connexion { grid-template-columns: minmax(0, 1fr); }
  .connexion-gauche { padding: 2rem 1.5rem; }
}
