/* =====================================================================
   ALCHIMIEAPP V2 — LAYOUTS & PAGES
   Header, footer, landing, page thème, + responsive global.
   ===================================================================== */

/* ---------------------------------------------------------------------
   HEADER
   --------------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border-soft);
}
.site-header .hd-inner { display:flex; align-items:center; gap: var(--space-5); min-height: var(--header-h); }
.site-logo { display:flex; align-items:center; flex:none; }
.site-logo img { height: 30px; }
.site-logo:hover { text-decoration:none; }

.main-nav { display:flex; align-items:center; gap: var(--space-2); margin-left: auto; }
.main-nav a { padding:.55rem .85rem; border-radius: var(--radius-sm); color: var(--ink-soft); font-weight:600; font-size: var(--fs-sm); position: relative; }
.main-nav a:hover { color: var(--brand-purple); text-decoration:none; }
.main-nav a.active { color: var(--brand-purple); }
.main-nav a.active::after {
    content:""; position:absolute; left:.85rem; right:.85rem; bottom:-2px; height:2px;
    background: var(--brand-purple); border-radius: var(--radius-pill);
}
.hd-actions { display:flex; align-items:center; gap: var(--space-3); margin-left: var(--space-3); }

/* utilisateur connecté (avatar + nom) */
.hd-user { display:flex; align-items:center; gap:.55rem; padding:.35rem .5rem; border-radius: var(--radius-pill); cursor:pointer; border:1px solid transparent; }
.hd-user:hover { background: var(--bg-tint); text-decoration:none; }
.hd-user .avatar { width: 34px; height: 34px; border-radius:50%; background: var(--brand-purple-100); color: var(--brand-purple-700); display:grid; place-items:center; font-weight:800; font-size:.85rem; overflow:hidden; }
.hd-user .avatar img { width:100%; height:100%; object-fit:cover; }
.hd-user .u-name { font-weight:700; font-size: var(--fs-sm); color: var(--ink-soft); }
.hd-user .u-chevron { width:16px; height:16px; color: var(--text-faint); }
.hd-logout { color: var(--text-muted); }

.nav-toggle { display:none; background:none; border:none; cursor:pointer; padding:.4rem; margin-left:auto; }
.nav-toggle span { display:block; width:24px; height:2px; background: var(--ink); margin:5px 0; border-radius:2px; transition: .2s; }

/* ---------------------------------------------------------------------
   FOOTER (bleu nuit)
   --------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: var(--navy-text); padding: var(--space-8) 0 var(--space-6); margin-top: var(--space-9); }
.site-footer a { color:#d5c9ff; }
.footer-grid { display:grid; grid-template-columns: 1.6fr 1fr 1fr; gap: var(--space-7); }
.site-footer h4 { color:#fff; font-family: var(--font-sans); font-size: var(--fs-xs); text-transform:uppercase; letter-spacing:.1em; margin:0 0 var(--space-4); }
.site-footer ul { list-style:none; margin:0; padding:0; }
.site-footer li { margin-bottom:.55rem; font-size: var(--fs-sm); }
.footer-brand p { font-size: var(--fs-sm); max-width: 40ch; color:#9aa1c4; }
.footer-legal { margin-top: var(--space-6); padding-top: var(--space-5); border-top:1px solid var(--navy-soft); font-size: var(--fs-xs); color:#8a90b3; line-height:1.6; }
.footer-placeholder { border:1px dashed #3d4470; border-radius: var(--radius-sm); padding:.4rem .7rem; display:inline-block; color:#9aa1c4; }

/* ---------------------------------------------------------------------
   LANDING — HERO
   --------------------------------------------------------------------- */
.hero { position: relative; padding: var(--space-8) 0 var(--space-9); overflow: hidden; }
.hero-grid { display:grid; grid-template-columns: 45fr 55fr; gap: var(--space-7); align-items:center; }
.hero-grid > * { position: relative; z-index: 1; }
.hero h1 { font-size: var(--fs-display); line-height: 1.02; margin: var(--space-4) 0; letter-spacing: -0.01em; }
.hero h1 .accent { color: var(--brand-purple); }
.hero .lead { font-size: var(--fs-lead); color: var(--text-muted); max-width: 46ch; margin-bottom: var(--space-6); }
.hero-cta { display:flex; gap: var(--space-3); flex-wrap:wrap; margin-bottom: var(--space-5); }
.hero-trust { display:flex; align-items:center; gap: var(--space-4); flex-wrap:wrap; font-size: var(--fs-sm); color: var(--text-muted); }
.hero-trust .ht-item { display:flex; align-items:center; gap:.5rem; font-weight:600; }
.hero-trust svg { width:20px; height:20px; color: var(--brand-purple); }
.hero-trust .dot { width:4px; height:4px; border-radius:50%; background: var(--text-faint); }
.hero-visual { position: relative; }
.hero-visual img { width:100%; height:auto; filter: drop-shadow(0 24px 48px rgba(108,44,255,.14)); }

/* Décorations réutilisables */
.deco { position:absolute; z-index:0; pointer-events:none; }
.deco-blob-1 {
    top:-60px; right:-140px; width:520px; height:520px; border-radius:48% 52% 60% 40%/50% 45% 55% 50%;
    background: radial-gradient(circle at 35% 35%, #efe7ff, #f8e9e0 70%); opacity:.6; filter: blur(4px);
}
.deco-dots { width:120px; height:80px; opacity:.5;
    background-image: radial-gradient(var(--brand-purple-300) 1.6px, transparent 1.6px);
    background-size: 16px 16px; }
.deco-dots-hero { right:6%; bottom:8%; }

/* ---------------------------------------------------------------------
   LANDING — MÉTHODE (5 étapes)
   --------------------------------------------------------------------- */
.method-grid { display:grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); align-items:stretch; position:relative; }
.method-step { background:#fff; border:1px solid var(--border-soft); border-radius: var(--radius-lg); padding: var(--space-6) var(--space-4); text-align:center; box-shadow: var(--shadow-card); position:relative; }
.method-step .ms-num { width: 34px; height: 34px; border-radius:50%; display:grid; place-items:center; margin:0 auto var(--space-4); font-family: var(--font-sans); font-weight:700; color:#fff; font-size:.85rem; }
.method-step .ms-ico { width: 56px; height:56px; margin: 0 auto var(--space-4); display:grid; place-items:center; border-radius: var(--radius); background: var(--_accent-bg, var(--brand-purple-100)); }
.method-step .ms-ico svg { width: 30px; height:30px; }
.method-step h3 { font-size: 1.15rem; margin:0 0 .5rem; }
.method-step p { font-size: var(--fs-sm); color: var(--text-muted); margin:0; line-height:1.5; }
.method-step .ms-connector { position:absolute; top: 46px; right: calc(-1 * var(--space-4) / 2); width: var(--space-4); display:grid; place-items:center; transform: translateX(50%); color: var(--brand-purple-300); }
.method-step .ms-connector svg { width:18px; height:18px; }

/* couleurs par étape (num + fond d'icône) */
.ms-c1 .ms-num { background: var(--step-comprendre); } .ms-c1 h3 { color: var(--step-comprendre); } .ms-c1 .ms-ico { --_accent-bg: var(--step-comprendre-bg); color: var(--step-comprendre); }
.ms-c2 .ms-num { background: var(--step-ecouter); }    .ms-c2 h3 { color: var(--step-ecouter); }    .ms-c2 .ms-ico { --_accent-bg: var(--step-ecouter-bg); color: var(--step-ecouter); }
.ms-c3 .ms-num { background: var(--step-retenir); }    .ms-c3 h3 { color: var(--step-retenir); }    .ms-c3 .ms-ico { --_accent-bg: var(--step-retenir-bg); color: var(--step-retenir); }
.ms-c4 .ms-num { background: var(--step-agir); }       .ms-c4 h3 { color: var(--step-agir); }       .ms-c4 .ms-ico { --_accent-bg: var(--step-agir-bg); color: var(--step-agir); }
.ms-c5 .ms-num { background: var(--step-valider); }    .ms-c5 h3 { color: var(--step-valider); }    .ms-c5 .ms-ico { --_accent-bg: var(--step-valider-bg); color: var(--step-valider); }

/* ---------------------------------------------------------------------
   LANDING — DÉMARCHE
   --------------------------------------------------------------------- */
.demarche-grid { display:grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); max-width: 980px; margin: 0 auto; }
.demarche-card { display:flex; gap: var(--space-4); align-items:flex-start; padding: var(--space-6); }
.demarche-card .dc-ico { width:52px; height:52px; border-radius: var(--radius); background: var(--brand-purple-100); color: var(--brand-purple); display:grid; place-items:center; flex:none; }
.demarche-card .dc-ico svg { width:26px; height:26px; }
.demarche-card h3 { font-size: 1.2rem; margin:0 0 .4rem; }
.demarche-card p { font-size: var(--fs-sm); color: var(--text-muted); margin:0; }

/* ---------------------------------------------------------------------
   LANDING — EXEMPLE CONCRET (carrousel)
   --------------------------------------------------------------------- */
.carousel-head { display:flex; align-items:flex-end; justify-content:space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.teaser-card { width: 320px; background:#fff; border:1px solid var(--border-soft); border-radius: var(--radius-lg); overflow:hidden; box-shadow: var(--shadow-card); display:flex; flex-direction:column; transition: transform .15s, box-shadow .15s; }
.teaser-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.teaser-card .tc-visual { background: var(--_accent-bg, var(--brand-purple-50)); padding: var(--space-4); display:flex; align-items:center; justify-content:center; }
.teaser-card .tc-visual img { width:auto; max-height:150px; }
.teaser-card .tc-body { padding: var(--space-5); display:flex; flex-direction:column; flex:1; }
.teaser-card .tc-tag { display:inline-flex; align-items:center; gap:.4rem; font-size: var(--fs-xs); font-weight:800; letter-spacing:.06em; text-transform:uppercase; margin-bottom:.6rem; }
.teaser-card h3 { font-size: 1.05rem; margin:0 0 .5rem; line-height:1.25; }
.teaser-card p { font-size: var(--fs-sm); color: var(--text-muted); margin:0 0 var(--space-4); flex:1; }
.teaser-card .tc-foot { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.teaser-card .tc-cta { font-weight:700; font-size: var(--fs-sm); display:inline-flex; align-items:center; gap:.35rem; }
.teaser-card .tc-meta { font-size: var(--fs-xs); color: var(--text-faint); white-space:nowrap; }

/* ---------------------------------------------------------------------
   LANDING — EXPERTS (4 colonnes)
   --------------------------------------------------------------------- */
.experts-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.expert-card-v { background:#fff; border:1px solid var(--border-soft); border-radius: var(--radius-lg); padding: var(--space-6) var(--space-5); box-shadow: var(--shadow-card); text-align:center; position:relative; }
.expert-card-v .ecv-portrait { width:104px; height:104px; margin:0 auto var(--space-4); border-radius:50%; overflow:hidden; background: var(--brand-purple-50); }
.expert-card-v .ecv-portrait img { width:100%; height:100%; object-fit:cover; }
.expert-card-v h3 { font-size:1.1rem; margin:0 0 .2rem; }
.expert-card-v .ecv-role { font-size: var(--fs-sm); color: var(--text-muted); margin:0 0 var(--space-4); min-height:2.6em; }
.expert-card-v .ecv-ph { position:absolute; top:14px; right:14px; }

/* ---------------------------------------------------------------------
   LANDING — RÉASSURANCE
   --------------------------------------------------------------------- */
.trust-grid { display:grid; grid-template-columns: repeat(4,1fr); gap: var(--space-5); align-items:start; }
.trust-grid-5 { grid-template-columns: repeat(5,1fr); }
.trust-item { text-align:center; padding: var(--space-4); }
.trust-item .ti-ico { width:56px; height:56px; margin:0 auto var(--space-3); border-radius:50%; background: var(--brand-purple-50); border:1px solid var(--border-soft); display:grid; place-items:center; color: var(--brand-purple); }
.trust-item .ti-ico svg { width:26px; height:26px; }
.trust-item h4 { font-family: var(--font-sans); font-size: var(--fs-sm); color: var(--ink); margin:0 0 .25rem; }
.trust-item p { font-size: var(--fs-xs); color: var(--text-muted); margin:0; }
.trust-item .ph-logo { display:grid; place-items:center; width:64px; height:56px; margin:0 auto var(--space-3); border:1.5px dashed var(--text-faint); border-radius: var(--radius-sm); padding:.4rem; color: var(--text-faint); font-size:.62rem; line-height:1.2; background:#fff; text-align:center; }

/* ---------------------------------------------------------------------
   LANDING — CTA FINAL (bande violette)
   --------------------------------------------------------------------- */
.cta-band {
    background: linear-gradient(115deg, #7b3cff 0%, var(--brand-purple) 42%, #b062ff 100%);
    border-radius: var(--radius-2xl); padding: var(--space-8);
    display:grid; grid-template-columns: auto 1fr auto; gap: var(--space-6); align-items:center;
    position: relative; overflow:hidden;
}
.cta-band .cta-illus img { width: 180px; filter: drop-shadow(0 12px 24px rgba(0,0,0,.18)); }
.cta-band h2 { color:#fff; margin:0 0 .5rem; }
.cta-band p { color: rgba(255,255,255,.92); margin:0; max-width: 42ch; }
.cta-band .cta-flourish {
    top:50%; right:6%; width:120px; height:80px; transform:translateY(-50%);
    border:2px solid rgba(255,255,255,.35); border-radius:50%;
    box-shadow: 0 0 0 12px rgba(255,255,255,.06); opacity:.5;
}
@media (max-width: 820px){ .cta-band { grid-template-columns: 1fr; text-align:center; } .cta-band .cta-illus{ display:none; } .cta-band .cta-flourish{ display:none; } }

/* ---------------------------------------------------------------------
   PAGE THÈME — HERO
   --------------------------------------------------------------------- */
.theme-hero-grid { display:grid; grid-template-columns: 1fr 1.1fr; gap: var(--space-7); align-items:center; margin-bottom: var(--space-7); }
.theme-hero h1 { font-size: var(--fs-h1); margin: var(--space-3) 0; }
.theme-hero .th-desc { color: var(--text-muted); font-size: var(--fs-lead); margin-bottom: var(--space-5); }
.theme-hero .th-illus img, .theme-hero .th-illus svg { width:100%; border-radius: var(--radius-xl); }

/* “Vous avez 5 façons d’explorer” */
.explore-grid { display:grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }

/* Bloc “À propos de ce thème” */
.about-theme { background: var(--brand-purple-50); border-radius: var(--radius-2xl); padding: var(--space-8); position:relative; overflow:hidden; }
.about-grid { display:grid; grid-template-columns: 1.3fr .7fr; gap: var(--space-6); align-items:center; }
.about-cards { display:grid; grid-template-columns: repeat(3,1fr); gap: var(--space-4); margin-top: var(--space-5); }
.about-card { background:#fff; border-radius: var(--radius-lg); padding: var(--space-4); border:1px solid var(--border); }
.about-card .ac-head { display:flex; align-items:center; gap:.5rem; font-weight:800; font-size: var(--fs-sm); margin-bottom:.4rem; }
.about-card .ac-head svg { width:1.2em; height:1.2em; }
.about-card p { font-size: var(--fs-xs); color: var(--text-muted); margin:0; }
.about-card.ac-obj .ac-head { color: var(--brand-purple); }
.about-card.ac-pub .ac-head { color: var(--step-retenir); }
.about-card.ac-ben .ac-head { color: var(--step-ecouter); }

/* Bloc citation expert */
.expert-quote { background:#fff; border:1px solid var(--border-soft); border-radius: var(--radius-xl); padding: var(--space-6) var(--space-7); box-shadow: var(--shadow-card); display:grid; grid-template-columns: auto 1fr auto; gap: var(--space-6); align-items:center; }
.expert-quote .eq-portrait { width: 96px; height:96px; border-radius: 50%; object-fit:cover; background: var(--brand-purple-50); }
.expert-quote .eq-name { font-weight:800; color: var(--ink); font-size:1.05rem; }
.expert-quote .eq-role { font-size: var(--fs-sm); color: var(--text-muted); }
.expert-quote blockquote { position:relative; font-family: var(--font-serif); font-size: 1.35rem; color: var(--ink-soft); margin:.75rem 0 0; line-height:1.4; padding-left: 2.4rem; }
.expert-quote .eq-quote-mark { position:absolute; left:0; top:.1em; width:1.8rem; height:1.8rem; color: var(--brand-purple-300); }
.expert-quote .eq-cta { white-space:nowrap; }
@media (max-width: 820px){ .expert-quote { grid-template-columns:1fr; text-align:center; } .expert-quote .eq-portrait{ margin:0 auto; } .expert-quote blockquote{ padding-left:0; } .expert-quote .eq-quote-mark{ position:static; display:block; margin:0 auto .25rem; } }

/* ---------------------------------------------------------------------
   BLOBS DÉCORATIFS (fonds organiques)
   --------------------------------------------------------------------- */
.blob { position:absolute; z-index:0; pointer-events:none; opacity:.9; }
.has-blobs { position: relative; }
.has-blobs > * { position: relative; z-index: 1; }

/* ---------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 1024px){
    .explore-grid { grid-template-columns: repeat(3, 1fr); }
    .method-grid { grid-template-columns: repeat(3, 1fr); row-gap: var(--space-5); }
    .method-step .ms-connector { display:none; }
    .trust-grid, .trust-grid-5 { grid-template-columns: repeat(3,1fr); }
    .experts-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px){
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; max-width: 520px; margin:0 auto; }
    .theme-hero-grid { grid-template-columns: 1fr; }
    .theme-hero .th-illus { order:-1; }
    .about-grid { grid-template-columns: 1fr; }
    .about-cards { grid-template-columns: 1fr; }
    .page-hero .ph-grid { grid-template-columns: 1fr; }
    .page-hero .ph-illus { order:-1; }
    .vsteps { grid-template-columns: 1fr 1fr; }
    .vstep::after { display:none; }
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
    .expert-quote { grid-template-columns: 1fr; text-align:center; }
    .expert-quote .eq-portrait { margin:0 auto; }
}
@media (max-width: 720px){
    :root { --header-h: 64px; }
    .nav-toggle { display:block; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items:stretch;
        background:#fff; padding: var(--space-4); gap:.25rem; margin-left:0;
        border-bottom:1px solid var(--border); box-shadow: var(--shadow);
        transform: translateY(-130%); transition: transform .22s ease; max-height: calc(100vh - var(--header-h)); overflow:auto;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav a.active::after { display:none; }
    .hd-actions { margin-left:0; }
    .explore-grid, .method-grid, .grid-2, .grid-3, .demarche-grid, .trust-grid, .trust-grid-5, .about-cards, .vsteps, .experts-grid { grid-template-columns: 1fr; }
    .section { padding: var(--space-8) 0; }
    .page-hero, .about-theme { padding: var(--space-6); }
    .cta-band { padding: var(--space-6); }
    .btn-lg, .hero-cta .btn { width:100%; }
}
@media (max-width: 520px){
    .hero-trust { gap: var(--space-2); }
    .chip-row { gap: var(--space-2); }
    .teaser-card { width: 82vw; }
    .carousel-head { flex-direction:column; align-items:flex-start; gap: var(--space-4); }
}

/* Réduction de mouvement */
@media (prefers-reduced-motion: reduce){
    * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
