/* =========================================================
   7TH ROOM ACADEMY — Feuille de style commune
   ========================================================= */

:root{
  --fond:#fdfaf3;
  --carte:#ffffff;
  --bleu-nuit:#1b2a4a;
  --texte:#26314d;
  --texte-doux:#5a6684;
  --bleu-clair:#eaf3fb;
  --vert:#1f9d63;
  --vert-fonce:#157a4c;
  --rouge:#c0392b;
  --orange:#f4972b;
  --orange-fonce:#e07b0f;
  --bord:#e4e0d3;
  --ombre: 0 6px 18px rgba(27,42,74,0.10);
  --ombre-forte: 0 10px 28px rgba(27,42,74,0.16);
  --rayon: 22px;

  --accent:#2f6fed;
  --accent-fonce:#1f52c4;
  --accent-clair:#e8f0ff;
}

/* Thèmes de section */
[data-theme="avatar"]{ --accent:#2f6fed; --accent-fonce:#1f52c4; --accent-clair:#e8f0ff; }
[data-theme="decor"]{ --accent:#16a163; --accent-fonce:#0f7f4d; --accent-clair:#e5f7ee; }
[data-theme="integration"]{ --accent:#7c4fd6; --accent-fonce:#6238b3; --accent-clair:#f1eafd; }
[data-theme="kling"]{ --accent:#e8791a; --accent-fonce:#c4630e; --accent-clair:#fdf0e2; }
[data-theme="son"]{ --accent:#e8791a; --accent-fonce:#c4630e; --accent-clair:#fdf0e2; }

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:var(--fond);
  color:var(--texte);
  min-height:100vh;
  -webkit-tap-highlight-color:transparent;
  line-height:1.55;
}
button{ font-family:inherit; }
a{ color:var(--accent-fonce); }

.app{
  max-width:1040px;
  margin:0 auto;
  padding:20px 20px 60px;
  min-height:100vh;
}

/* ---------- Barre haute ---------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
  flex-wrap:wrap;
}
.btn-home{
  background:var(--carte);
  border:2px solid var(--bord);
  border-radius:14px;
  padding:12px 18px;
  font-size:16px;
  font-weight:700;
  color:var(--texte);
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn-home:hover{ background:#fffdf7; }
.page-title{
  color:var(--accent-fonce);
  font-weight:800;
  font-size:clamp(16px,2.2vw,20px);
  text-align:right;
}

/* ---------- En-tête de page ---------- */
.page-header{ text-align:center; padding:18px 8px 8px; }
.page-header h1{
  color:var(--bleu-nuit);
  font-size:clamp(28px,5vw,44px);
  margin:6px 0 10px;
  letter-spacing:-0.5px;
}
.page-header p{
  color:var(--texte-doux);
  font-size:clamp(16px,2.4vw,20px);
  max-width:680px;
  margin:0 auto 6px;
}
.tag{
  display:inline-block;
  background:var(--bleu-clair);
  color:var(--bleu-nuit);
  font-weight:700;
  padding:8px 18px;
  border-radius:999px;
  font-size:15px;
  margin-top:14px;
}

/* ---------- Cartes de navigation ---------- */
.grid-cards{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:22px;
  margin-top:32px;
}
@media (max-width:640px){ .grid-cards{ grid-template-columns:1fr; } }

.card-choice{
  background:var(--carte);
  border:3px solid transparent;
  border-radius:var(--rayon);
  box-shadow:var(--ombre);
  padding:30px 22px;
  text-align:left;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:18px;
  min-height:120px;
  transition:transform .15s ease, box-shadow .15s ease;
  text-decoration:none;
  color:inherit;
}
.card-choice:active{ transform:scale(0.97); }
.card-choice:hover{ box-shadow:var(--ombre-forte); }
.card-choice .emoji{ font-size:46px; flex:0 0 auto; }
.card-choice .txt strong{
  display:block;
  font-size:clamp(19px,2.6vw,23px);
  color:var(--bleu-nuit);
  margin-bottom:4px;
}
.card-choice .txt span{ color:var(--texte-doux); font-size:15px; }
.card-choice.c-prompt{ border-color:#2f6fed33; }
.card-choice.c-avatar{ border-color:#7c4fd633; }
.card-choice.c-son{ border-color:#e8791a33; background:linear-gradient(135deg,#fff,#fff8ee); }
.card-choice.c-soon{
  opacity:.6;
  cursor:not-allowed;
  border-color:var(--bord);
  background:#faf7ee;
}
.badge-soon{
  display:inline-block;
  background:#efe9d9;
  color:#7a705a;
  font-size:13px;
  font-weight:700;
  padding:4px 12px;
  border-radius:999px;
  margin-top:6px;
}

.privacy-note{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:#f4f1e8;
  border-radius:16px;
  padding:14px 18px;
  margin-top:24px;
  font-size:14px;
  color:#6b6552;
  text-align:center;
}

/* ---------- Barre de progression ---------- */
.progress-wrap{ margin:4px 0 26px; }
.progress-label{
  font-weight:700;
  color:var(--accent-fonce);
  font-size:16px;
  margin-bottom:10px;
}
.progress-bar-bg{
  background:#eae6d8;
  border-radius:999px;
  height:14px;
  overflow:hidden;
}
.progress-bar-fill{
  background:var(--accent);
  height:100%;
  border-radius:999px;
  transition:width .3s ease;
  width:0%;
}

/* ---------- Carte d'étape / formulaire ---------- */
.step-card{
  background:var(--carte);
  border-radius:var(--rayon);
  box-shadow:var(--ombre);
  padding:clamp(24px,5vw,44px);
  min-height:300px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.info-banner{
  background:var(--accent-clair);
  border-radius:16px;
  padding:16px 20px;
  color:var(--accent-fonce);
  font-size:15px;
  margin-bottom:22px;
  font-weight:600;
}
.step-question{
  font-size:clamp(21px,3.4vw,30px);
  font-weight:800;
  color:var(--bleu-nuit);
  margin:0 0 8px;
  line-height:1.3;
}
.step-optional{
  display:inline-block;
  font-size:13px;
  font-weight:700;
  color:var(--texte-doux);
  background:#f1eee2;
  padding:4px 12px;
  border-radius:999px;
  margin-bottom:18px;
}
.step-hint{
  color:var(--texte-doux);
  font-size:15px;
  margin:-6px 0 20px;
  font-style:italic;
}
.tips-box{
  background:#fffaf0;
  border:2px dashed #f0d9a8;
  border-radius:16px;
  padding:14px 18px;
  margin-top:18px;
  font-size:15px;
  color:#856a2b;
}
.tips-box strong{ display:block; margin-bottom:4px; color:#7a5f22; }

input[type=text], input[type=number], textarea, select{
  width:100%;
  font-size:20px;
  padding:18px 20px;
  border-radius:16px;
  border:3px solid var(--bord);
  background:#fffefb;
  color:var(--texte);
  font-family:inherit;
  outline:none;
  transition:border-color .15s ease;
}
input[type=text]:focus, input[type=number]:focus, textarea:focus, select:focus{
  border-color:var(--accent);
}
textarea{ min-height:120px; resize:vertical; line-height:1.5; }

.choice-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:16px;
}
.choice-grid.n2{ grid-template-columns:repeat(2,1fr); }
.choice-grid.n3{ grid-template-columns:repeat(3,1fr); }
@media (max-width:560px){ .choice-grid.n3{ grid-template-columns:1fr 1fr; } }

.choice-btn{
  background:#fffefb;
  border:3px solid var(--bord);
  border-radius:18px;
  padding:20px 14px;
  font-size:18px;
  font-weight:700;
  color:var(--texte);
  cursor:pointer;
  min-height:84px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-align:center;
  transition:all .12s ease;
}
.choice-btn .icon{ font-size:30px; }
.choice-btn:active{ transform:scale(0.96); }
.choice-btn.selected{
  border-color:var(--accent);
  background:var(--accent-clair);
  color:var(--accent-fonce);
  box-shadow:0 0 0 3px var(--accent-clair);
}
.other-input{ margin-top:16px; display:none; }
.other-input.show{ display:block; }

/* ---------- Boutons ---------- */
.nav-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-top:28px;
}
.btn{
  border:none;
  border-radius:16px;
  padding:18px 26px;
  font-size:19px;
  font-weight:800;
  cursor:pointer;
  transition:transform .12s ease, opacity .12s ease;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btn:active{ transform:scale(0.97); }
.btn:disabled{ opacity:.4; cursor:not-allowed; }
.btn-secondary{ background:#fff; border:3px solid var(--bord); color:var(--texte); }
.btn-primary{ background:var(--accent); color:#fff; flex:1; box-shadow:var(--ombre); }
.btn-primary:hover{ background:var(--accent-fonce); }
.btn-final{
  background:var(--orange);
  color:#fff;
  width:100%;
  font-size:22px;
  padding:22px;
  box-shadow:var(--ombre-forte);
}
.btn-final:hover{ background:var(--orange-fonce); }
.btn-vert{ background:var(--vert); color:#fff; }
.btn-vert:hover{ background:var(--vert-fonce); }
.btn-large{ width:100%; font-size:22px; padding:22px; }
.btn-modifier{ background:#fff; border:3px solid var(--accent); color:var(--accent-fonce); }
.btn-recommencer{ background:#fff; border:3px solid #d9534f; color:var(--rouge); }

/* ---------- Résultat / prompt ---------- */
.result-header{ text-align:center; margin:10px 0 26px; }
.result-header .big-emoji{ font-size:54px; display:block; margin-bottom:8px; }
.result-header h2{
  color:var(--vert-fonce);
  font-size:clamp(24px,4vw,32px);
  margin:0;
}
.prompt-box{
  background:var(--accent-clair);
  border:2px solid var(--accent);
  border-radius:var(--rayon);
  padding:clamp(20px,4vw,32px);
  font-size:18px;
  line-height:1.7;
  color:var(--texte);
  white-space:pre-wrap;
  max-height:50vh;
  overflow-y:auto;
}
textarea.prompt-edit{
  background:#fffefb;
  border:3px solid var(--accent);
  border-radius:var(--rayon);
  font-size:17px;
  line-height:1.6;
  min-height:280px;
  padding:22px;
}
.copied-msg{
  display:none;
  text-align:center;
  margin-top:16px;
  background:#e5f7ee;
  color:var(--vert-fonce);
  padding:16px;
  border-radius:14px;
  font-weight:700;
  font-size:17px;
}
.copied-msg.show{ display:block; }
.result-actions{
  display:flex;
  gap:14px;
  margin-top:26px;
  flex-wrap:wrap;
}
.result-actions .btn{ flex:1; min-width:200px; }

/* ---------- Chargement / erreurs ---------- */
.loader-box{
  text-align:center;
  padding:40px 20px;
  background:var(--carte);
  border-radius:var(--rayon);
  box-shadow:var(--ombre);
}
.spinner{
  width:56px; height:56px;
  border:6px solid var(--accent-clair);
  border-top-color:var(--accent);
  border-radius:50%;
  margin:0 auto 18px;
  animation:spin 1s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.error-box{
  background:#fdecea;
  border:2px solid #f0b3ad;
  color:#a02b20;
  border-radius:16px;
  padding:18px 20px;
  margin-top:18px;
  font-weight:600;
}
.image-result{
  width:100%;
  border-radius:var(--rayon);
  box-shadow:var(--ombre-forte);
  display:block;
  background:#fff;
}

.hidden{ display:none !important; }

/* =========================================================
   IDENTITÉ 7TH ROOM — logo, bannière, navigation à 2 entrées
   Ajouté sans rien retirer de ce qui précède.
   ========================================================= */

:root{
  --jaune:#ffe500;
  --noir:#111111;
}

/* ---------- Logo dans la barre haute ---------- */
.marque{
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
}
.marque img{
  height:52px;
  width:auto;            /* proportions du logo jamais déformées */
  display:block;
}
@media (max-width:560px){ .marque img{ height:40px; } }

/* ---------- Bannière d'accueil ---------- */
.banniere{
  display:block;
  width:100%;
  border-radius:var(--rayon);
  overflow:hidden;
  box-shadow:var(--ombre-forte);
  background:var(--noir);
  margin-bottom:8px;
}
.banniere img{
  display:block;
  width:100%;
  height:auto;           /* image entière, jamais rognée ni étirée */
  object-fit:contain;
}
/* Repli si la bannière n'a pas encore été déposée */
.banniere-repli{
  display:none;
  padding:44px 24px;
  text-align:center;
  color:#fff;
  background:linear-gradient(135deg,#111,#1b2a4a);
}
.banniere-repli strong{
  display:block;
  font-size:clamp(26px,6vw,46px);
  letter-spacing:1px;
}
.banniere-repli span{ color:var(--jaune); font-weight:700; letter-spacing:3px; font-size:14px; }

/* ---------- Accroche de l'accueil ---------- */
.accroche{
  text-align:center;
  margin:28px 0 4px;
}
.accroche .devise{
  display:inline-block;
  background:var(--noir);
  color:var(--jaune);
  font-weight:800;
  letter-spacing:4px;
  font-size:clamp(12px,2.4vw,15px);
  padding:9px 22px;
  border-radius:999px;
}
.accroche h2{
  color:var(--bleu-nuit);
  font-size:clamp(22px,4vw,32px);
  margin:20px 0 0;
}

/* ---------- Les deux grandes portes d'entrée ---------- */
.grand-menu{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:26px;
  margin:28px 0 10px;
}
@media (max-width:760px){ .grand-menu{ grid-template-columns:1fr; } }

.porte{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:10px;
  min-height:260px;
  padding:38px 26px;
  border-radius:26px;
  background:var(--carte);
  border:4px solid var(--bord);
  box-shadow:var(--ombre);
  text-decoration:none;
  color:inherit;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.porte:hover{ transform:translateY(-4px); box-shadow:var(--ombre-forte); }
.porte:active{ transform:scale(.98); }
.porte .icone{ font-size:64px; line-height:1; }
.porte .nom{
  font-size:clamp(28px,4.6vw,40px);
  font-weight:900;
  letter-spacing:1px;
  color:var(--bleu-nuit);
}
.porte .desc{
  color:var(--texte-doux);
  font-size:clamp(15px,2vw,17px);
  max-width:340px;
}
.porte .fleche{
  margin-top:8px;
  font-weight:800;
  color:var(--accent-fonce);
}
.porte-cours{ border-color:#2f6fed55; background:linear-gradient(160deg,#fff,#f2f7ff); }
.porte-cours .fleche{ color:#1f52c4; }
.porte-ateliers{ border-color:#e8791a55; background:linear-gradient(160deg,#fff,#fff8ee); }
.porte-ateliers .fleche{ color:#c4630e; }

/* ---------- AJOUT — la bande JEUX sous les deux portes ----------
   Plus basse et plus large que les portes : l'accueil garde ses
   deux entrées principales, et les jeux sont accessibles en un
   clic depuis la première page comme depuis le menu Ateliers. */
.porte-jeux{
  display:flex; align-items:center; gap:22px;
  margin:20px 0 6px; padding:24px 28px;
  border-radius:22px; text-decoration:none; color:inherit;
  border:4px solid #9be34a66;
  background:linear-gradient(120deg,#0f1420,#1a2335);
  box-shadow:var(--ombre);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.porte-jeux:hover{ transform:translateY(-3px); border-color:#9be34a; box-shadow:var(--ombre-forte); }
.porte-jeux:active{ transform:scale(.99); }
.porte-jeux .icone{ font-size:52px; line-height:1; flex:0 0 auto; }
.porte-jeux .txt{ flex:1 1 auto; display:flex; flex-direction:column; gap:5px; }
.porte-jeux .nom{
  font-size:clamp(22px,3.4vw,30px); font-weight:900; letter-spacing:1px; color:#fff;
}
.porte-jeux .desc{ color:#b4b8ce; font-size:clamp(13px,1.8vw,15px); line-height:1.5; }
.porte-jeux .fleche{
  flex:0 0 auto; font-weight:800; color:#9be34a; font-size:17px; white-space:nowrap;
}
@media (max-width:620px){
  .porte-jeux{ flex-direction:column; text-align:center; gap:12px; }
  .porte-jeux .txt{ align-items:center; }
}

/* Bande POT-POURRI : même forme que la bande Jeux, accent doré */
.porte-potpourri{ margin-top:12px; border-color:#ffc94d66; background:linear-gradient(120deg,#1d1420,#2e1d2a); }
.porte-potpourri:hover{ border-color:#ffc94d; }
.porte-potpourri .fleche{ color:#ffc94d; }

/* ---------- Titres de section dans Cours / Ateliers ---------- */
.section-titre{
  display:flex;
  align-items:center;
  gap:14px;
  margin:44px 0 4px;
}
.section-titre h2{
  font-size:clamp(20px,3.2vw,27px);
  color:var(--bleu-nuit);
  margin:0;
  white-space:nowrap;
}
.section-titre::after{
  content:"";
  flex:1;
  height:4px;
  border-radius:999px;
  background:var(--bord);
}
.section-intro{
  color:var(--texte-doux);
  margin:2px 0 0;
  font-size:16px;
}

/* ---------- Zone animateur / administration, volontairement discrète ---------- */
.zone-staff{
  margin-top:26px;
  padding:22px 24px 26px;
  background:#f4f1e8;
  border:2px dashed var(--bord);
  border-radius:18px;
}
.zone-staff h3{
  margin:0 0 4px;
  font-size:17px;
  color:#6b6552;
  letter-spacing:1px;
}
.zone-staff p{ margin:0 0 16px; color:#8a836e; font-size:14px; }
.liens-staff{ display:flex; flex-wrap:wrap; gap:12px; }
.lien-staff{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border:2px solid var(--bord);
  border-radius:12px;
  padding:11px 16px;
  font-size:15px;
  font-weight:700;
  color:#5a5443;
  text-decoration:none;
}
.lien-staff:hover{ background:#fffdf7; border-color:#cfc9b6; }

/* ---------- Fil de navigation (retour) ---------- */
.fil{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-bottom:16px;
}

@media (max-width:480px){
  .app{ padding:14px 12px 40px; }
  .step-card{ padding:20px; }
  .nav-row{ flex-direction:column-reverse; }
  .nav-row .btn{ width:100%; }
}
