/* Dounia : page d'accueil et inscription. Couleurs tirees du logo. */
:root {
  --terre: #8D5929;
  --terre-fonce: #6A4019;
  --soleil: #F2C04A;
  --soleil-pale: #FFF4D6;
  --nuit: #1E1309;
  --nuit-2: #2A1B0C;
  --feuille: #1D7A4A;
  --fleuve: #1F56A0;
  --texte: #23170A;
  --doux: #66513A;
  --fond: #FFFFFF;
  --teinte: #F8F4EE;
  --trait: #E9E1D4;
  --erreur: #B3361F;
  --titre: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --corps: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --rayon: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--corps); font-size: 17px; line-height: 1.6; color: var(--texte); background: var(--fond); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terre); }
a:hover { color: var(--terre-fonce); }
:focus-visible { outline: 3px solid var(--fleuve); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 800; line-height: 1.06; margin: 0; letter-spacing: -0.015em; color: var(--nuit); }
h2 { font-size: clamp(32px, 4.2vw, 50px); max-width: 20ch; text-wrap: balance; }
h3 { font-size: 21px; line-height: 1.2; }
p { margin: 0; }
.conteneur { width: min(1180px, 100% - 40px); margin: 0 auto; }
.evitement { position: absolute; left: -999px; top: 8px; background: var(--nuit); color: #fff; padding: 8px 14px; z-index: 200; border-radius: 8px; }
.evitement:focus { left: 8px; }
.intro { margin-top: 16px; max-width: 60ch; font-size: 19px; color: var(--doux); }

/* Boutons */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 15px 26px; border-radius: 999px; font: 700 16px/1 var(--corps); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color .18s, color .18s, transform .18s, box-shadow .18s; white-space: nowrap; }
.bouton:active { transform: translateY(1px); }
.bouton-plein { background: var(--terre); color: #fff; box-shadow: 0 10px 24px -10px rgba(141, 89, 41, .7); }
.bouton-plein:hover { background: var(--terre-fonce); color: #fff; }
.bouton-clair { background: #fff; color: var(--terre); }
.bouton-clair:hover { background: var(--soleil-pale); color: var(--terre-fonce); }
.bouton-contour { border-color: currentColor; color: var(--terre); background: transparent; }
.bouton-contour:hover { background: var(--terre); border-color: var(--terre); color: #fff; }
.bouton-nuit { background: var(--nuit); color: #fff; }
.bouton-nuit:hover { background: #000; color: #fff; }
.petit { padding: 10px 18px; font-size: 15px; }

/* En-tete */
.entete { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.entete.defile { border-color: var(--trait); box-shadow: 0 6px 24px -18px rgba(30, 19, 9, .5); }
.entete-ligne { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.marque { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 26px/1 var(--titre); color: var(--terre); letter-spacing: -0.02em; }
.marque img { width: 46px; height: 46px; }
.marque em { font-style: normal; color: #D99A1E; }
.menu { display: flex; align-items: center; gap: 26px; }
.menu a:not(.bouton) { text-decoration: none; color: var(--texte); font-weight: 600; font-size: 15px; }
.menu a:not(.bouton):hover { color: var(--terre); }
.menu-actions { display: flex; gap: 10px; align-items: center; }
.menu-bouton { display: none; border: 2px solid var(--terre); background: none; color: var(--terre); border-radius: 999px; padding: 8px 16px; font: 700 15px var(--corps); cursor: pointer; }

/* Accueil (haut de page) */
.une { position: relative; overflow: hidden; padding: 56px 0 72px; background:
  radial-gradient(900px 520px at 88% 8%, rgba(242, 192, 74, .26), transparent 62%),
  radial-gradient(700px 480px at 70% 100%, rgba(141, 89, 41, .12), transparent 70%); }
.une-grille { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 40px; align-items: center; }
.une h1 { font-size: clamp(46px, 6.6vw, 90px); letter-spacing: -0.035em; line-height: .98; }
.une h1 span { color: var(--terre); }
.chapeau { margin-top: 24px; font-size: 20px; color: var(--doux); max-width: 50ch; }
.une-boutons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.une-mention { margin-top: 26px; display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--doux); font-size: 15px; }
.une-mention img { width: 30px; height: 30px; }
.vitrine { position: relative; height: 600px; }
.vitrine .embleme { position: absolute; width: 520px; max-width: none; right: -80px; top: 10px; opacity: .16; animation: tourne 90s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.telephone { background: var(--nuit); padding: 9px; border-radius: 38px; box-shadow: 0 40px 70px -30px rgba(30, 19, 9, .55), 0 0 0 1px rgba(0, 0, 0, .04); }
.telephone img { border-radius: 30px; width: 100%; }
.vitrine .telephone { position: absolute; width: 248px; }
.vitrine .tel-1 { left: 6%; top: 46px; transform: rotate(-5deg); z-index: 2; animation: monte .9s .1s cubic-bezier(.2, .7, .2, 1) both; }
.vitrine .tel-2 { left: 46%; top: 0; transform: rotate(4deg); z-index: 1; animation: monte .9s .25s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes monte { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .vitrine .embleme, .vitrine .telephone { animation: none; } html { scroll-behavior: auto; } }

/* Bande aux couleurs de la ronde */
.ronde { display: grid; grid-template-columns: repeat(12, 1fr); height: 8px; }

/* Sections */
.section { padding: 96px 0; }
.teinte { background: var(--teinte); }
.sombre { background: var(--nuit); color: #F3E5CF; }
.sombre h2, .sombre h3 { color: #fff; }
.sombre .intro { color: #DCC7A6; }

/* Fonctionnalites */
.fonctions { margin-top: 52px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.fonction { background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 26px 24px 24px; transition: transform .2s, box-shadow .2s; }
.fonction:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(30, 19, 9, .45); }
.pastille { width: 50px; height: 50px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent, var(--soleil)); color: #fff; }
.fonction h3 { margin-top: 18px; }
.fonction p { margin-top: 8px; color: var(--doux); font-size: 15.5px; }
.nouveau { display: inline-block; margin-left: 6px; vertical-align: 3px; padding: 3px 9px; border-radius: 999px; background: var(--soleil); color: var(--nuit); font: 700 11px/1.2 var(--corps); letter-spacing: .02em; }

/* Mise en avant alternee */
.atout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.atout + .atout { margin-top: 96px; }
.atout.inverse .atout-image { order: 2; }
.atout-image { display: flex; justify-content: center; padding: 40px; border-radius: 28px; background: linear-gradient(160deg, var(--soleil-pale), #fff 70%); }
.atout-image .telephone { width: 260px; transform: rotate(-3deg); }
.atout.inverse .atout-image .telephone { transform: rotate(3deg); }
.atout ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.atout li { display: flex; gap: 12px; align-items: flex-start; color: var(--doux); }
.atout li::before { content: ''; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--soleil-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238D5929' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 12 10 16 18 8'/%3E%3C/svg%3E") center/14px no-repeat; }

/* Histoires IA */
.etapes { list-style: none; counter-reset: etape; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.etapes li { counter-increment: etape; position: relative; padding: 30px 28px; border-radius: var(--rayon); background: var(--nuit-2); border: 1px solid rgba(255, 255, 255, .07); }
.etapes li::before { content: counter(etape); display: block; width: 48px; height: 48px; border-radius: 50%; background: var(--soleil); color: var(--nuit); font: 800 22px/48px var(--titre); text-align: center; margin-bottom: 20px; }
.etapes p { margin-top: 10px; color: #DCC7A6; }
.sombre .bouton-clair { margin-top: 44px; }

/* Telechargement */
.telecharger { background: linear-gradient(120deg, var(--terre) 0%, #B66E22 60%, #D98B1F 100%); color: #fff; }
.telecharger h2 { color: #fff; }
.telecharger .intro { color: #FCEBD0; }
.tele-grille { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.tele-carte { background: #fff; color: var(--texte); border-radius: 24px; padding: 30px; box-shadow: 0 40px 70px -40px rgba(30, 19, 9, .7); }
.tele-carte .bouton { width: 100%; padding: 18px; font-size: 17px; }
.tele-version { text-align: center; margin-top: 10px; font-size: 13.5px; color: var(--doux); }
.tele-choix { margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--trait); display: grid; gap: 12px; }
.tele-choix a { font-weight: 700; text-decoration: none; }
.tele-choix span { display: block; font-size: 13.5px; color: var(--doux); line-height: 1.45; }
.tele-aide { margin-top: 16px; font-size: 13px; color: var(--doux); line-height: 1.5; }

/* Questions */
.questions { margin-top: 40px; border-top: 2px solid var(--nuit); max-width: 820px; }
.questions details { border-bottom: 1px solid var(--trait); }
.questions summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; position: relative; font: 700 19px/1.3 var(--titre); }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: '+'; position: absolute; right: 6px; top: 16px; font-size: 28px; font-weight: 500; color: var(--terre); }
.questions details[open] summary::after { content: '−'; }
.questions details p { padding: 0 0 22px; color: var(--doux); max-width: 66ch; }

/* Appel final */
.final { text-align: center; }
.final h2 { margin: 0 auto; max-width: 18ch; }
.final .intro { margin: 18px auto 0; }
.final .une-boutons { justify-content: center; }

/* Pied */
.pied { background: var(--nuit); color: #CDB998; padding: 64px 0 28px; font-size: 15px; }
.pied-grille { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.pied h3 { color: #fff; font-size: 16px; margin-bottom: 14px; font-family: var(--corps); font-weight: 700; letter-spacing: 0; }
.pied a { color: #F3E5CF; text-decoration: none; }
.pied a:hover { color: var(--soleil); }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pied .marque { color: #fff; }
.pied-bas { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; color: #A8936F; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Bandeau cookies */
.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; max-width: 760px; margin: 0 auto; display: none; gap: 16px; align-items: center; background: var(--nuit); color: #F3E5CF; padding: 16px 18px; border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6); font-size: 14px; }
.cookies.visible { display: flex; }
.cookies a { color: var(--soleil); }
.cookies .bouton { flex: none; }

/* ---------- Inscription ---------- */
.page-inscription { min-height: 100vh; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); background: var(--teinte); }
.panneau { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--nuit); color: #F3E5CF; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; }
.panneau .marque { color: #fff; }
.panneau h1 { color: #fff; font-size: clamp(36px, 3.6vw, 54px); margin-top: 44px; max-width: 13ch; }
.panneau h1 span { color: var(--soleil); }
.panneau > div > p { margin-top: 18px; color: #DCC7A6; font-size: 18px; max-width: 40ch; }
.panneau ul { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.panneau li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.panneau li span { flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(242, 192, 74, .14); color: var(--soleil); display: inline-flex; align-items: center; justify-content: center; }
.panneau .embleme { position: absolute; width: 560px; max-width: none; right: -210px; bottom: -190px; opacity: .14; pointer-events: none; }
.panneau-bas { position: relative; font-size: 14px; color: #A8936F; }
.formulaire-zone { padding: 48px clamp(20px, 5vw, 72px) 64px; }
.carte-form { max-width: 620px; margin: 0 auto; background: #fff; border-radius: 26px; padding: clamp(26px, 4vw, 44px); box-shadow: 0 30px 60px -44px rgba(30, 19, 9, .55); border: 1px solid var(--trait); }
.carte-form h2 { font-size: 34px; }
.carte-form .sous-titre { margin-top: 8px; color: var(--doux); }
.carte-form .sous-titre a { font-weight: 700; }
.etape-titre { margin: 32px 0 14px; font: 700 13px/1 var(--corps); letter-spacing: .06em; text-transform: uppercase; color: var(--terre); display: flex; align-items: center; gap: 10px; }
.etape-titre::after { content: ''; flex: 1; height: 1px; background: var(--trait); }
.rangee { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.champ { position: relative; margin-bottom: 14px; }
.champ label, .groupe-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--texte); }
.champ input, .champ select { width: 100%; font: 16px var(--corps); color: var(--texte); background: #fff; border: 1.5px solid var(--trait); border-radius: 12px; padding: 13px 14px; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none; }
.champ select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366513A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 14px center/18px no-repeat; padding-right: 42px; }
.champ input:focus, .champ select:focus { outline: none; border-color: var(--terre); box-shadow: 0 0 0 4px rgba(141, 89, 41, .14); }
.champ input.correct { border-color: #3C9A62; }
.champ input.incorrect { border-color: var(--erreur); }
.champ .aide-erreur { display: none; margin-top: 6px; font-size: 13px; color: var(--erreur); font-weight: 600; }
.champ .incorrect ~ .aide-erreur { display: block; }
.mdp { position: relative; }
.mdp input { padding-right: 96px; }
.mdp button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: var(--teinte); color: var(--terre); font: 700 13px var(--corps); padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.force { margin-top: 8px; height: 5px; border-radius: 4px; background: var(--trait); overflow: hidden; }
.force span { display: block; height: 100%; width: 0; background: var(--erreur); transition: width .2s, background-color .2s; }
.genres { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.genres label { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--trait); border-radius: 12px; padding: 13px; cursor: pointer; font-weight: 600; transition: border-color .15s, background-color .15s; margin: 0; }
.genres input { position: absolute; opacity: 0; pointer-events: none; }
.genres label:has(input:checked) { border-color: var(--terre); background: var(--soleil-pale); color: var(--terre-fonce); }
.genres label:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(31, 86, 160, .3); }
.engagement { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--trait); border-radius: 14px; margin-bottom: 10px; cursor: pointer; font-size: 13.5px; line-height: 1.55; color: var(--doux); transition: border-color .15s, background-color .15s; }
.engagement:has(input:checked) { border-color: #3C9A62; background: #F2FAF5; }
.engagement input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--terre); cursor: pointer; }
.engagement strong { color: var(--texte); }
.bouton-inscription { width: 100%; margin-top: 18px; padding: 18px; font-size: 17px; }
.message-serveur:empty { display: none; }
.message-serveur { margin: 18px 0 0; }
.connexion-lien { text-align: center; margin-top: 20px; color: var(--doux); font-size: 15px; }
.connexion-lien a { font-weight: 700; }
.app-encart { max-width: 620px; margin: 22px auto 0; display: flex; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 20px; background: #fff; border: 1px solid var(--trait); font-size: 14px; color: var(--doux); }
.app-encart img { width: 52px; flex: none; }
.app-encart strong { color: var(--texte); display: block; font-size: 15.5px; }
.app-encart a { font-weight: 700; }

/* Ecrans moyens et petits */
@media (max-width: 1060px) {
  .fonctions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vitrine { height: 520px; }
  .vitrine .telephone { width: 210px; }
}
@media (max-width: 900px) {
  .menu-bouton { display: inline-block; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 74px; flex-direction: column; align-items: stretch; gap: 0; background: #fff; padding: 8px 20px 20px; border-bottom: 1px solid var(--trait); box-shadow: 0 20px 30px -20px rgba(30, 19, 9, .4); }
  .menu.ouvert { display: flex; }
  .menu a:not(.bouton) { padding: 14px 0; border-bottom: 1px solid var(--trait); font-size: 17px; }
  .menu-actions { margin-top: 16px; }
  .menu-actions .bouton { flex: 1; }
  .une { padding-top: 32px; }
  .une-grille, .atout, .tele-grille, .pied-grille { grid-template-columns: 1fr; }
  .atout.inverse .atout-image { order: 0; }
  .vitrine { height: 430px; }
  .vitrine .telephone { width: 180px; }
  .vitrine .tel-1 { left: 8%; }
  .vitrine .tel-2 { left: auto; right: 8%; }
  .vitrine .embleme { width: 420px; right: -60px; }
  .etapes { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .atout { gap: 36px; }
  .page-inscription { grid-template-columns: 1fr; }
  .panneau { position: relative; height: auto; padding: 28px 22px 34px; }
  .panneau h1 { margin-top: 26px; font-size: 34px; }
  .panneau ul, .panneau-bas { display: none; }
  .panneau .embleme { width: 340px; right: -120px; bottom: -150px; }
  .formulaire-zone { padding: 24px 14px 48px; }
}
@media (max-width: 560px) {
  .fonctions { grid-template-columns: 1fr; }
  .une-boutons .bouton { flex: 1; }
  .rangee, .genres { grid-template-columns: 1fr 1fr; }
  .rangee.simple-mobile { grid-template-columns: 1fr; }
  .cookies { flex-direction: column; align-items: stretch; }
}
