/* Eksperiens — Espace Membres
 * Identité visuelle inspirée des maquettes graphistes (cf docs/design-mood.md) :
 * fond crème chaud, accents terre/terracotta, esprit patrimonial et éditorial.
 * Serif pour les titres, sans-serif sobre pour le corps. Pas de noir pur ni
 * de blanc clinique — on reste dans les tons chauds.
 */

:root {
    --eks-color-bg: #f5eee6;          /* crème principal, fond page */
    --eks-color-surface: #ffffff;     /* cards, blocs */
    --eks-color-surface-2: #efeae2;   /* alternance subtile, hover, encarts doux */
    --eks-color-text: #35201a;        /* texte courant, brun chaud (pas noir) */
    --eks-color-text-strong: #1f1610; /* titres, brun-noir profond */
    --eks-color-muted: #8b7a6c;       /* description, métadonnées */
    --eks-color-border: rgba(53, 32, 26, 0.10);
    --eks-color-border-strong: rgba(53, 32, 26, 0.22);
    --eks-color-accent: #ba7448;      /* terra-cotta, accent principal */
    --eks-color-accent-hover: #a05e36;
    --eks-color-accent-soft: rgba(186, 116, 72, 0.10);
    --eks-color-accent-strong: #8c3a2e; /* rouge brique, actions chaudes / dates affiche */
    --eks-color-cool: #7aaeb1;        /* bleu cendré, respiration / accents secondaires */
    --eks-color-error-bg: rgba(140, 58, 46, 0.10);
    --eks-color-error-text: #8c3a2e;
    --eks-color-success-bg: rgba(122, 174, 177, 0.18);
    --eks-color-success-text: #2e5a5d;
    --eks-radius: 2px;
    --eks-radius-lg: 4px;
    --eks-shadow: 0 8px 24px rgba(53, 32, 26, 0.10);
    --eks-font-serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;
    --eks-font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --eks-letter-spacing-loose: 0.18em;
}

*, *::before, *::after { box-sizing: border-box; }

/* Reset : neutralise les `margin-top` injectés par WP (admin bar bump notamment). */
html { margin-top: 0 !important; padding-top: 0 !important; }
html, body { margin: 0; padding: 0; }

body.eks-members {
    font-family: var(--eks-font-sans);
    font-size: 15px;
    color: var(--eks-color-text);
    background: var(--eks-color-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--eks-color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--eks-color-accent-hover); text-decoration: none; }

/* ---------- Header ---------- */

.eks-header {
    background: var(--eks-color-surface);
    border-bottom: 1px solid var(--eks-color-border);
}

.eks-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.eks-header__brand {
    font-family: var(--eks-font-serif);
    font-weight: 400;
    font-size: 20px;
    letter-spacing: 0.08em;
    color: var(--eks-color-text-strong);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.eks-header__brand:hover { color: var(--eks-color-accent); }

.eks-header__logo {
    display: block;
    max-height: 44px;
    width: auto;
    height: auto;
}

.eks-nav {
    display: flex;
    gap: 28px;
    margin-left: auto;
    flex-wrap: wrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
}

.eks-nav a {
    color: var(--eks-color-text);
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.eks-nav a:hover { color: var(--eks-color-accent); border-bottom-color: var(--eks-color-accent); }

.eks-nav__logout { color: var(--eks-color-muted); }

/* ---------- Main ---------- */

.eks-main { flex: 1; }

.eks-main__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 32px 80px;
}

/* ---------- Footer ---------- */

.eks-footer {
    text-align: center;
    padding: 32px;
    color: var(--eks-color-muted);
    font-size: 12px;
    letter-spacing: 0.1em;
    border-top: 1px solid var(--eks-color-border);
    background: var(--eks-color-surface);
}

/* ---------- Typo ---------- */

h1, h2, h3 {
    font-family: var(--eks-font-serif);
    font-weight: 400;
    color: var(--eks-color-text-strong);
    margin: 0 0 24px;
    line-height: 1.2;
}

h1 { font-size: 36px; letter-spacing: 0.02em; }
h2 { font-size: 24px; letter-spacing: 0.04em; }
h3 { font-size: 18px; text-transform: uppercase; letter-spacing: var(--eks-letter-spacing-loose); }

.eks-lead {
    color: var(--eks-color-muted);
    margin-bottom: 32px;
    font-size: 16px;
    max-width: 65ch;
}

.eks-stepper {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
    color: var(--eks-color-accent);
    margin: 0 0 8px;
}

/* ---------- Sections / cards ---------- */

.eks-section, .eks-auth, .eks-dashboard {
    background: var(--eks-color-surface);
    padding: 48px;
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius-lg);
    box-shadow: var(--eks-shadow);
}

/* Auth standard (login, password reset, choose-type) — étroit pour focus visuel */
.eks-auth { max-width: 520px; margin: 0 auto; }
/* Auth large (inscription complète, site check) — formulaires riches */
.eks-auth--wide {
    max-width: 880px;
    margin: 0 auto;
    background: transparent; /* pas de double card sur la page d'inscription */
    border: none;
    padding: 0;
    box-shadow: none;
}
.eks-auth--wide > h1 {
    color: var(--eks-color-text-strong);
    font-size: 32px;
    margin-bottom: 12px;
}
.eks-auth--wide > .eks-lead {
    color: var(--eks-color-muted);
    margin-bottom: 32px;
}

.eks-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

/* Étape formulaire : layout 2 colonnes avec sidebar d'aide sticky à gauche.
   Sur mobile/tablette, la sidebar passe en haut au-dessus du formulaire. */
.eks-auth--form-step {
    max-width: 1280px;
}
.eks-form-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
    margin-top: 24px;
}
@media (min-width: 992px) {
    .eks-form-layout {
        grid-template-columns: 320px 1fr;
        gap: 48px;
    }
}
.eks-form-aside {
    background: var(--eks-color-surface-2);
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius);
    padding: 24px;
}
@media (min-width: 992px) {
    .eks-form-aside {
        position: sticky;
        top: 24px;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
    }
}
.eks-form-aside__title {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
    color: var(--eks-color-accent);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--eks-color-border);
}
.eks-help-block {
    margin-bottom: 18px;
}
.eks-help-block:last-child {
    margin-bottom: 0;
}
.eks-help-block h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--eks-color-text-strong);
    margin: 0 0 6px 0;
}
.eks-help-block p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--eks-color-muted);
    margin: 0 0 6px 0;
}
.eks-help-block p:last-of-type {
    margin-bottom: 0;
}
.eks-help-specs {
    margin: 4px 0 8px 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--eks-color-muted);
}
.eks-help-specs li {
    margin-bottom: 4px;
}
.eks-help-note {
    font-size: 12px !important;
    font-style: italic;
    color: var(--eks-color-muted) !important;
}

/* Notice contextuelle au pied d'un champ de formulaire (ex: alerte rejets
   d'images sur le champ Galerie). Met l'information au plus près du champ
   concerné plutôt que dans la sidebar globale. */
.eks-field-notice {
    margin-top: 10px;
    padding: 14px 16px;
    background: rgba(191, 167, 59, 0.10);
    border-left: 3px solid var(--eks-color-accent);
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.55;
}
.eks-field-notice strong { display: block; margin-bottom: 4px; color: var(--eks-color-text-strong); }
.eks-field-notice p { margin: 6px 0 0 0; color: var(--eks-color-text); }
.eks-field-notice p:first-of-type { margin-top: 4px; }
.eks-field-notice--soft {
    background: rgba(0,0,0,.03);
    border-left-color: var(--eks-color-border);
}
.eks-field-notice--soft p { color: var(--eks-color-muted); }

/* Thumbnails dans les champs image / gallery du formulaire d'inscription.
   Clic = ouvre la version full dans un nouvel onglet (lightbox basique). */
.eks-gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.eks-gallery-thumb,
.eks-single-thumb {
    display: inline-block;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--eks-color-border);
    transition: transform .15s ease, border-color .15s ease;
}
.eks-gallery-thumb img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    display: block;
}
.eks-single-thumb img {
    max-width: 220px;
    height: auto;
    display: block;
}
.eks-gallery-thumb:hover,
.eks-single-thumb:hover {
    transform: scale(1.03);
    border-color: var(--eks-color-accent);
}

/* ---------- Pool d'images unifié (Vos images) ---------- */
.eks-image-pool__intro {
    margin: 0 0 18px 0;
    color: var(--eks-color-muted, #555);
    font-size: .95em;
}
.eks-image-pool__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}
.eks-image-pool__empty {
    margin: 16px 0;
    padding: 18px;
    background: #fafafa;
    border-radius: 6px;
    color: var(--eks-color-muted, #666);
    font-style: italic;
    text-align: center;
}
.eks-image-pool__specs {
    margin-top: 18px;
    padding: 12px 14px;
    background: rgba(0,0,0,.025);
    border-radius: 6px;
    font-size: 13px;
}
.eks-image-pool__specs summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--eks-color-accent-strong, #8c3a2e);
}
.eks-image-pool__specs ul {
    margin: 10px 0 0 0;
    padding-left: 18px;
}
.eks-image-pool__specs-desc { color: var(--eks-color-muted, #777); }

/* Bloc "Ajouter des images" : un seul bouton qui ouvre un input file caché.
   Les fichiers sélectionnés sont uploadés en AJAX puis injectés comme nouvelles
   cards dans le pool ci-dessus. */
.eks-image-pool__upload {
    margin-top: 22px;
    padding: 22px 24px;
    background: #fbfbfb;
    border: 1px dashed #d4d4d4;
    border-radius: 8px;
    text-align: center;
}
.eks-pool-add-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: var(--eks-color-accent, #ba7448);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: .95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 160ms ease;
}
.eks-pool-add-btn:hover,
.eks-pool-add-btn:focus { background: var(--eks-color-accent-hover, #a05e36); color: #fff; }
.eks-pool-add-btn__plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}
.eks-pool-add-help {
    margin: 12px 0 0 0;
    font-size: .85em;
    color: var(--eks-color-muted, #777);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.eks-pool-upload-status {
    display: none;
    margin-top: 12px;
    font-size: .9em;
    color: #444;
}
.eks-pool-upload-status.is-visible { display: block; }
.eks-pool-upload-status.is-error   { color: #b3261e; }

/* Le contenu du pool est wrappé dans un .eks-form-group__body qui porte déjà
   le padding standard (28px 32px). On override juste son gap pour resserrer
   un peu (sinon 32px par défaut entre intro / grid / upload / specs, c'est trop). */
.eks-image-pool .eks-form-group__body {
    gap: 18px;
}

.eks-image-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.eks-image-card:hover {
    border-color: var(--eks-color-accent);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.eks-image-card__media {
    position: relative;
    background: #f5f5f5;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.eks-image-card__thumb {
    display: block;
    width: 100%;
    height: 100%;
}
.eks-image-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.eks-image-card__badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 2;
    pointer-events: none;
}
.eks-role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #fff;
    line-height: 1.4;
    transition: opacity 160ms ease;
}
.eks-role-badge.is-off { display: none; }
.eks-role-badge--featured { background: #b85c2c; }
.eks-role-badge--cover    { background: #2c7da0; }
.eks-role-badge--logo     { background: #6a4c93; }
.eks-role-badge--gallery  { background: #5a8a3a; }

.eks-image-card__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}
.eks-role-btn {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    background: #f4f4f4;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    line-height: 1.3;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.eks-role-btn:hover {
    background: #e8e8e8;
}
.eks-role-btn__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 2px solid #999;
    border-radius: 50%;
    font-size: 12px;
    color: transparent;
    flex-shrink: 0;
    transition: all 140ms ease;
}
.eks-role-btn.is-on {
    background: var(--eks-color-accent, #ba7448);
    color: #fff;
    border-color: var(--eks-color-accent, #ba7448);
}
.eks-role-btn.is-on:hover {
    background: var(--eks-color-accent-hover, #a05e36);
}
.eks-role-btn.is-on .eks-role-btn__check {
    background: #fff;
    border-color: #fff;
    color: var(--eks-color-accent, #ba7448);
}
.eks-role-btn--remove {
    margin-top: 4px;
    background: transparent;
    color: #b3261e;
    font-size: 12px;
    justify-content: center;
}
.eks-role-btn--remove:hover {
    background: #fdecea;
}
.eks-role-btn--remove .eks-role-btn__check { display: none; }

@media (max-width: 640px) {
    .eks-image-pool__grid { grid-template-columns: 1fr; }
}

/* ---------- Thumbs sélectionnables (toggle de sélection + badge qualité) ---------- */
.eks-gallery-item,
.eks-image-item {
    position: relative;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    margin: 0 4px 4px 0;
}
.eks-gallery-item .eks-thumb-check,
.eks-image-item .eks-thumb-check {
    /* Hidden visually but kept accessible for keyboard navigation. */
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    clip: rect(0 0 0 0);
}
.eks-thumb-check:focus-visible + .eks-thumb-frame {
    outline: 2px solid var(--eks-color-accent);
    outline-offset: 2px;
}
.eks-thumb-frame {
    position: relative;
    display: inline-block;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 160ms ease, opacity 160ms ease, filter 160ms ease;
}
.eks-gallery-item.is-selected .eks-thumb-frame,
.eks-image-item.is-selected .eks-thumb-frame {
    border-color: var(--eks-color-accent);
}
.eks-gallery-item:not(.is-selected) .eks-thumb-frame,
.eks-image-item:not(.is-selected) .eks-thumb-frame {
    opacity: .45;
    filter: grayscale(70%);
}
.eks-gallery-item:not(.is-selected) .eks-thumb-frame img,
.eks-image-item:not(.is-selected) .eks-thumb-frame img {
    transform: none;
}

.eks-thumb-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    z-index: 3;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}
.eks-thumb-indicator svg {
    width: 18px;
    height: 18px;
}
.eks-thumb-check-icon { display: none; }
.eks-thumb-plus-icon  { display: block; }
.is-selected .eks-thumb-indicator {
    background: var(--eks-color-accent);
    color: #fff;
}
.is-selected .eks-thumb-check-icon { display: block; }
.is-selected .eks-thumb-plus-icon  { display: none; }

.eks-quality-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    padding: 3px 6px;
    background: rgba(176, 88, 0, .92); /* amber strong */
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    border-radius: 3px;
    z-index: 2;
    line-height: 1.2;
}

.eks-gallery-hint {
    flex-basis: 100%;
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--eks-color-muted, #777);
    font-style: italic;
}

/* Le clic sur le lien <a> du thumb ne doit pas toggle la sélection
   (le module lightbox.js l'intercepte pour ouvrir la modale d'aperçu). */
.eks-gallery-item .eks-gallery-thumb,
.eks-image-item .eks-single-thumb {
    position: relative;
    z-index: 1;
}

/* ---------- Bloc "Produits détectés" du formulaire (read-only + retrait) ---------- */
.eks-product-preview .eks-form-group__body { gap: 16px; }
.eks-product-preview__intro {
    margin: 0;
    color: var(--eks-color-muted, #555);
    font-size: .95em;
    line-height: 1.5;
}
.eks-product-preview__hint {
    margin: 0;
    padding: 10px 14px;
    background: rgba(186, 116, 72, .08);
    border-left: 3px solid var(--eks-color-accent, #ba7448);
    border-radius: 4px;
    font-size: .85em;
    color: #555;
}

.eks-product-preview__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.eks-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.eks-product-card:hover {
    border-color: var(--eks-color-accent, #ba7448);
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.eks-product-card__thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    overflow: hidden;
}
.eks-product-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.eks-product-card__placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #efefef 0%, #e0e0e0 100%);
}
.eks-product-card__body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.eks-product-card__title {
    font-weight: 600;
    font-size: .92em;
    line-height: 1.3;
    color: #222;
}
.eks-product-card__price {
    font-size: .85em;
    font-weight: 600;
    color: var(--eks-color-accent-strong, #8c3a2e);
}
.eks-product-card__price--on-demand {
    font-style: italic;
    font-weight: 500;
    color: #777;
}
.eks-product-card__excerpt {
    font-size: .78em;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.eks-product-card__remove {
    position: absolute;
    top: 6px; right: 6px;
    width: 26px; height: 26px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #b3261e;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: background 140ms ease, color 140ms ease;
}
.eks-product-card__remove:hover {
    background: #b3261e;
    color: #fff;
}

/* Specs recommandées affichées juste sous chaque champ image. */
.eks-image-specs {
    display: block;
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(0,0,0,.025);
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--eks-color-muted);
}
.eks-image-specs strong {
    color: var(--eks-color-text-strong);
}

/* Lightbox modale pour les previews du formulaire (chargée à la demande). */
.eks-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 15, 18, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    opacity: 0;
    transition: opacity .18s ease;
}
.eks-lightbox.is-open {
    display: flex;
    opacity: 1;
}
.eks-lightbox__figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eks-lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.eks-lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}
.eks-lightbox__close:hover {
    background: rgba(255,255,255,.25);
}
.eks-help-block--note {
    background: rgba(191, 167, 59, 0.08);
    border-left: 3px solid var(--eks-color-accent);
    padding: 12px 14px;
    border-radius: 4px;
    margin-top: 24px;
}
.eks-form-main {
    min-width: 0; /* permet au form de se contracter dans la grid */
}

/* Page de choix de profil : une seule colonne pleine largeur. Chaque carte
   prend toute la largeur dispo et expose son contenu sur plusieurs lignes
   pour bien expliquer qui est concerné et ce qu'on propose. */
.eks-auth--choose {
    max-width: 880px;
}

/* Bloc d'introduction en tête de la page d'inscription — explique le contexte
   pour les visiteurs qui arrivent ici sans contexte (lien direct, email…). */
.eks-intro {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--eks-color-border);
}
.eks-intro h1 {
    font-size: 32px;
    margin: 0 0 8px 0;
    color: var(--eks-color-text-strong);
}
.eks-intro__tagline {
    font-size: 18px;
    color: var(--eks-color-accent);
    font-style: italic;
    margin: 0 0 24px 0;
    line-height: 1.4;
}
.eks-intro__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: var(--eks-color-text);
    font-size: 15px;
    line-height: 1.65;
}
.eks-intro__body p {
    margin: 0;
}
.eks-auth--choose .eks-intro__cta-line,
p.eks-intro__cta-line {
    padding-top: 18px !important;
    padding-right: 22px !important;
    padding-bottom: 22px !important;
    padding-left: 22px !important;
    background: rgba(191, 167, 59, 0.08);
    border-left: 3px solid var(--eks-color-accent);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.65;
    margin-top: 8px;
}

/* Le stepper / section-title qui suit le bloc d'intro */
.eks-auth--choose .eks-stepper {
    margin-top: 0;
}
.eks-section-title {
    font-size: 22px;
    margin: 8px 0 12px 0;
    color: var(--eks-color-text-strong);
}
.eks-cards--profiles {
    grid-template-columns: 1fr;
    gap: 18px;
}
.eks-cards--profiles .eks-card--profile {
    display: block;
    padding: 28px 30px 32px;
    text-align: left;
}
.eks-card--profile h2 {
    font-size: 18px;
    margin: 0 0 12px 0;
}
.eks-card--profile p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--eks-color-text);
    margin: 0 0 12px 0;
}
.eks-card--profile p:last-of-type {
    margin-bottom: 0;
}
.eks-card--profile .eks-card__who {
    color: var(--eks-color-muted);
    font-size: 13px;
}
.eks-card--profile .eks-card__pitch {
    font-size: 15px;
    color: var(--eks-color-text-strong);
}
.eks-cards--profiles .eks-card--profile p.eks-card__expected {
    font-size: 13px;
    color: var(--eks-color-muted);
    padding-top: 16px !important;
    padding-right: 20px !important;
    padding-bottom: 18px !important;
    padding-left: 20px !important;
    background: rgba(0,0,0,.03);
    border-radius: 6px;
    line-height: 1.6;
    margin-top: 4px;
}
.eks-card--profile .eks-card__cta {
    display: inline-block;
    margin-top: 16px;
    font-weight: 600;
    color: var(--eks-color-accent);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
}
.eks-card--profile__body {
    display: block;
    min-width: 0;
}

.eks-card {
    display: block;
    padding: 28px;
    background: var(--eks-color-surface-2);
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius);
    color: var(--eks-color-text);
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.eks-card h2 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
    color: var(--eks-color-accent);
    margin-bottom: 8px;
}

.eks-card p {
    margin: 0;
    color: var(--eks-color-muted);
    font-size: 14px;
}

.eks-card:hover {
    border-color: var(--eks-color-accent);
    background: rgba(191, 167, 59, 0.04);
    transform: translateY(-2px);
}

/* ---------- Forms ----------
 * Logique d'espacement :
 *  - Entre fieldsets         : 48px (séparation forte)
 *  - Entre champs d'un même  : 36px (claire)
 *  - Label → input           : 8px  (lien fort)
 *  - Input → small (help)    : 8px  (lien fort, sous le bon champ)
 */

.eks-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

/* Chaque section = card distincte avec titre en haut + body en dessous */
.eks-form-group {
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius-lg);
    background: var(--eks-color-surface-2);
    margin: 0;
    padding: 0;
    overflow: visible;
}
.eks-form-group__title {
    margin: 0;
    padding: 18px 32px;
    font-family: var(--eks-font-serif);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
    color: var(--eks-color-accent);
    border-bottom: 1px solid var(--eks-color-border);
}
.eks-form-group__body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Wrapper du champ : block normal, pas display:contents (sinon le badge
 * "pré-rempli" en position absolute n'a plus d'ancêtre positionné). */
.eks-field-wrapper { display: block; }

.eks-field, label.eks-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.eks-field > span,
.eks-field > label > span:first-child,
.eks-field > label span:first-child {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
    color: var(--eks-color-muted);
    display: block;
}

/* Label séparé (struct <label><span></label><input>) : pas de gap supplémentaire */
.eks-field > label {
    margin: 0;
    padding: 0;
}

.eks-field input,
.eks-field textarea,
.eks-field select {
    padding: 14px 16px;
    border: 1px solid var(--eks-color-border-strong);
    background: var(--eks-color-surface-2);
    color: var(--eks-color-text);
    border-radius: var(--eks-radius);
    font: inherit;
    font-size: 15px;
    width: 100%;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.eks-field input::placeholder,
.eks-field textarea::placeholder { color: rgba(53, 32, 26, 0.40); }

.eks-field input:focus,
.eks-field textarea:focus,
.eks-field select:focus {
    outline: none;
    border-color: var(--eks-color-accent);
    background: var(--eks-color-bg);
}

.eks-field textarea { min-height: 140px; resize: vertical; }

.eks-field input[type="file"] {
    padding: 10px;
    background: var(--eks-color-bg);
    cursor: pointer;
}

.eks-field input[type="date"],
.eks-field input[type="datetime-local"] { color-scheme: light; }

/* Texte d'aide : collé à l'input (8px), avec une couleur subtile pour lever toute ambiguïté */
.eks-field small {
    display: block;
    margin-top: 0;
    color: var(--eks-color-muted);
    font-size: 12.5px;
    line-height: 1.5;
    font-style: italic;
    padding-left: 2px;
}

.eks-checkbox {
    display: flex !important;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--eks-color-text);
    cursor: pointer;
    line-height: 1.5;
    margin: 0;
    width: auto;
    text-align: left;
}
.eks-checkbox > span {
    flex: 0 1 auto;
    text-align: left;
}

.eks-checkbox input[type="checkbox"],
.eks-checkbox input[type="radio"] {
    margin-top: 3px;
    flex: 0 0 auto;
    accent-color: var(--eks-color-accent);
    flex-shrink: 0;
}

.eks-checkbox span { flex: 1; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--eks-color-text); font-size: 14px; }

/* Champ pré-rempli par l'IA — fond doré subtil + texte bien lisible */
.eks-field-wrapper--prefilled .eks-field input,
.eks-field-wrapper--prefilled .eks-field textarea,
.eks-field-wrapper--prefilled .eks-field select,
input[data-eks-ai-filled="1"],
textarea[data-eks-ai-filled="1"] {
    border-color: var(--eks-color-accent);
    background: var(--eks-color-accent-soft);
    color: var(--eks-color-text-strong);
}

/* Indicateur visuel "pré-rempli par l'IA" en haut du champ */
.eks-field-wrapper--prefilled {
    position: relative;
}
.eks-field-wrapper--prefilled::before {
    content: '✦ Pré-rempli';
    position: absolute;
    top: -8px;
    right: 8px;
    background: var(--eks-color-accent);
    color: var(--eks-color-bg);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 2px;
    z-index: 1;
    pointer-events: none;
}

/* ---------- Buttons ---------- */

.eks-btn {
    display: inline-block;
    padding: 14px 28px;
    border: 1px solid var(--eks-color-border-strong);
    background: transparent;
    color: var(--eks-color-text);
    border-radius: var(--eks-radius);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
    cursor: pointer;
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.eks-btn:hover {
    border-color: var(--eks-color-accent);
    color: var(--eks-color-accent);
    text-decoration: none;
}

.eks-btn--primary {
    background: var(--eks-color-accent);
    color: var(--eks-color-bg);
    border-color: var(--eks-color-accent);
}

.eks-btn--primary:hover {
    background: var(--eks-color-accent-hover);
    border-color: var(--eks-color-accent-hover);
    color: var(--eks-color-bg);
}

.eks-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.eks-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 16px;
}

/* ---------- Alerts ---------- */

.eks-alert {
    padding: 16px 20px;
    border-radius: var(--eks-radius);
    font-size: 14px;
    border: 1px solid var(--eks-color-border);
    color: var(--eks-color-muted);
    background: var(--eks-color-surface-2);
}
.eks-alert--error {
    background: var(--eks-color-error-bg);
    color: var(--eks-color-error-text);
    border-color: rgba(192, 57, 43, 0.3);
}
.eks-alert--success {
    background: var(--eks-color-success-bg);
    color: var(--eks-color-success-text);
    border-color: rgba(106, 142, 63, 0.3);
}
.eks-alert ul { margin: 0; padding-left: 20px; }

/* ---------- Tables ---------- */

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--eks-color-text);
}

table thead tr {
    border-bottom: 1px solid var(--eks-color-border-strong);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: var(--eks-letter-spacing-loose);
    color: var(--eks-color-muted);
}

table th, table td { padding: 14px 12px; text-align: left; }

table tbody tr { border-bottom: 1px solid var(--eks-color-border); }

/* ---------- Auth links ---------- */

.eks-auth__links {
    margin-top: 32px;
    text-align: center;
    font-size: 13px;
    color: var(--eks-color-muted);
}

/* ---------- wp_editor (TinyMCE) integration ---------- */

.eks-field--editor .wp-editor-wrap {
    border: 1px solid var(--eks-color-border-strong);
    border-radius: var(--eks-radius);
    background: #fff;
    overflow: hidden;
}

.eks-field--editor .wp-editor-tabs {
    background: var(--eks-color-surface-2);
    padding: 4px 8px 0;
    border-bottom: 1px solid var(--eks-color-border);
}

.eks-field--editor .wp-switch-editor {
    background: transparent;
    color: var(--eks-color-muted);
    border: 1px solid var(--eks-color-border);
    border-bottom-color: transparent;
    margin: 0 4px 0 0;
    padding: 6px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}

.eks-field--editor .wp-switch-editor.switch-tmce,
.eks-field--editor .wp-switch-editor.switch-html {
    color: var(--eks-color-muted);
}

.eks-field--editor .wp-editor-tools {
    background: var(--eks-color-surface-2);
}

.eks-field--editor .mce-toolbar-grp,
.eks-field--editor .mce-statusbar {
    background: #f3f3f3;
}

.eks-field--editor .wp-editor-container {
    border: 0;
}

.eks-field--editor textarea.wp-editor-area {
    background: #fff;
    color: #1a1a1a;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
    border: 0;
}

.eks-field--editor .quicktags-toolbar {
    background: #f3f3f3;
    border-bottom: 1px solid #ddd;
    padding: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.eks-field--editor .quicktags-toolbar input.button,
.eks-field--editor .quicktags-toolbar input.ed_button {
    margin: 0;
    width: auto !important;
    flex: 0 0 auto;
    padding: 4px 12px;
    font-size: 12px;
    line-height: 1.4;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    box-shadow: none;
    text-shadow: none;
    min-width: auto;
    height: auto;
}
.eks-field--editor .quicktags-toolbar input.button:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

/* ---------- Repeater compact (table-like) ---------- */

.eks-repeater {
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius);
    padding: 20px 24px;
    margin: 0;
    background: var(--eks-color-bg);
    display: flex;
    flex-direction: column;
}
.eks-repeater legend {
    font-family: var(--eks-font-serif);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
    color: var(--eks-color-accent);
    padding: 0 10px;
    margin: 0 -8px;
    background: var(--eks-color-bg);
    width: auto;
}

.eks-repeater__instructions {
    display: block;
    margin: 0 0 12px;
    color: var(--eks-color-muted);
    font-size: 12.5px;
    font-style: italic;
}

/* Header (labels colonnes) — affiché une seule fois en haut */
.eks-repeater__header {
    display: grid;
    grid-template-columns: var(--eks-repeater-cols);
    gap: 12px;
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--eks-color-border-strong);
    margin-bottom: 8px;
}
.eks-repeater__header span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--eks-letter-spacing-loose);
    color: var(--eks-color-muted);
}

.eks-repeater__rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Une ligne = grid en colonnes ; une cellule par sub_field + bouton × en fin */
.eks-repeater__row {
    display: grid;
    grid-template-columns: var(--eks-repeater-cols);
    gap: 12px;
    align-items: center;
    padding: 6px 0;
}

/* Cellule : on cache le label (déjà dans le header), on serre les inputs */
.eks-repeater__cell .eks-field {
    gap: 0;
}
.eks-repeater__cell .eks-field > span,
.eks-repeater__cell .eks-field > label > span:first-child {
    display: none;
}
.eks-repeater__cell .eks-field input,
.eks-repeater__cell .eks-field textarea,
.eks-repeater__cell .eks-field select {
    padding: 10px 12px;
    font-size: 14px;
}
.eks-repeater__cell .eks-field small {
    display: none;
}

/* Bouton suppression : rouge sobre, carré */
.eks-repeater__remove {
    background: transparent;
    color: var(--eks-color-error-text);
    border: 1px solid rgba(192, 57, 43, 0.4);
    border-radius: var(--eks-radius);
    width: 36px;
    height: 36px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.eks-repeater__remove:hover {
    background: var(--eks-color-error-bg);
    border-color: var(--eks-color-error-text);
}

.eks-repeater__add {
    margin-top: 16px;
    align-self: flex-start;
    padding: 8px 16px !important;
    font-size: 11px !important;
}

@media (max-width: 720px) {
    /* Mobile : on retombe en colonnes empilées avec labels visibles */
    .eks-repeater__header { display: none; }
    .eks-repeater__row {
        grid-template-columns: 1fr auto;
        align-items: flex-start;
        padding: 12px;
        background: var(--eks-color-surface-2);
        border: 1px solid var(--eks-color-border);
        border-radius: var(--eks-radius);
    }
    .eks-repeater__cell {
        grid-column: 1;
    }
    .eks-repeater__cell .eks-field > span,
    .eks-repeater__cell .eks-field > label > span:first-child {
        display: block; /* labels rétablis en mobile */
    }
    .eks-repeater__remove { grid-column: 2; grid-row: span 99; }
}

/* ---------- Cartes d'options (URL / Voix / Manuel sur site-check) ---------- */

.eks-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px 0 0;
}
.eks-option-card {
    background: var(--eks-color-surface);
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius-lg, 12px);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.eks-option-card:hover {
    border-color: var(--eks-color-accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.eks-option-card__header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: var(--eks-color-surface-2);
    border-bottom: 1px solid var(--eks-color-border);
}
.eks-option-card__icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}
.eks-option-card__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 600;
    color: var(--eks-color-text);
}
.eks-option-card__subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--eks-color-muted);
}
.eks-option-card__body {
    padding: 20px 24px;
}
.eks-option-card--simple .eks-option-card__body {
    padding: 16px 24px;
}
.eks-option-card--simple .eks-option-card__body .eks-actions {
    margin: 0;
}

.eks-voice-privacy {
    margin: 12px 0 16px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--eks-radius);
    font-size: 12.5px;
    color: var(--eks-color-muted);
    line-height: 1.5;
}
.eks-voice-privacy strong { color: var(--eks-color-text); }

/* ---------- Recorder vocal ---------- */

.eks-voice-example {
    background: var(--eks-color-surface-2);
    border-left: 3px solid var(--eks-color-accent);
    border-radius: var(--eks-radius);
    padding: 16px 20px;
    margin: 16px 0 24px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--eks-color-text);
}
.eks-voice-example strong { color: var(--eks-color-accent); }
.eks-voice-example em { color: var(--eks-color-muted); font-style: italic; }

.eks-voice-recorder {
    background: var(--eks-color-surface-2);
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eks-voice-recorder__stage {
    position: relative;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), rgba(168, 85, 247, 0.06));
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius);
    height: 120px;
    overflow: hidden;
}
.eks-voice-recorder__viz {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.eks-voice-recorder__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    pointer-events: none;
}
.eks-voice-recorder__pulse {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--eks-color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.eks-voice-recorder__pulse.is-recording {
    background: #fee2e2;
    border-color: #fecaca;
    animation: eks-pulse-ring 1.4s ease-in-out infinite;
}
.eks-voice-recorder__icon {
    font-size: 26px;
    line-height: 1;
}
@keyframes eks-pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.45); }
    50%      { box-shadow: 0 0 0 12px rgba(231, 76, 60, 0); }
}

.eks-voice-recorder__time {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius);
    padding: 8px 16px;
    text-align: right;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    pointer-events: none;
}
.eks-voice-recorder__time > span {
    display: block;
    font-size: 26px;
    font-weight: 600;
    font-family: var(--eks-font-serif);
    color: #111827;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: color 0.2s ease;
}
.eks-voice-recorder__time > span.is-warning {
    color: #dc2626;
    animation: eks-blink 1s ease-in-out infinite;
}
@keyframes eks-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}
.eks-voice-recorder__time > small {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 500;
}

.eks-voice-recorder__hint {
    color: var(--eks-color-muted);
    font-size: 13px;
    margin: 0;
    text-align: center;
}
.eks-voice-recorder__controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.eks-voice-recorder__playback {
    width: 100%;
}
.eks-voice-recorder__notice {
    color: var(--eks-color-error-text);
    font-size: 13px;
    margin: 0;
    text-align: center;
}

.eks-btn--danger {
    background: var(--eks-color-accent-strong);
    color: #fff;
    border-color: var(--eks-color-accent-strong);
}
.eks-btn--danger:hover {
    background: #6f2d24;
    border-color: #6f2d24;
}

/* ---------- Modale (analyse IA) ---------- */

.eks-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: eks-fadein 0.2s ease;
}

@keyframes eks-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

.eks-modal {
    background: var(--eks-color-surface);
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius-lg);
    padding: 40px;
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: eks-slideup 0.3s ease;
}

@keyframes eks-slideup {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.eks-modal h2 {
    font-family: var(--eks-font-serif);
    font-size: 22px;
    color: var(--eks-color-text-strong);
    margin: 0 0 12px;
}

.eks-modal__lead {
    color: var(--eks-color-muted);
    font-size: 14px;
    margin: 0 0 24px;
}

/* Stage = zone fixe où s'affiche un seul message à la fois (animation in/out) */
.eks-modal__step-stage {
    position: relative;
    height: 80px;
    overflow: hidden;
    margin-top: 16px;
}

.eks-modal__step {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    background: var(--eks-color-surface-2);
    border: 1px solid var(--eks-color-border);
    border-left: 3px solid var(--eks-color-accent);
    border-radius: var(--eks-radius);
    color: var(--eks-color-text);
    font-size: 15px;
    line-height: 1.4;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    will-change: transform, opacity;
}

/* État initial : caché, prêt à entrer par le haut */
.eks-modal__step--enter {
    transform: translateY(-110%);
    opacity: 0;
}

/* État courant : visible au centre, avec spinner discret à droite */
.eks-modal__step--current {
    transform: translateY(0);
    opacity: 1;
    padding-right: 56px;
    background: rgba(191, 167, 59, 0.08);
}

.eks-modal__step--current::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--eks-color-accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: eks-spin 0.8s linear infinite;
}

/* État de sortie : sort par le bas */
.eks-modal__step--leave {
    transform: translateY(110%);
    opacity: 0;
}

@keyframes eks-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.eks-modal__step--success {
    border-left-color: var(--eks-color-success-text);
    color: var(--eks-color-success-text);
    background: var(--eks-color-success-bg);
}
.eks-modal__step--success::after { display: none; } /* pas de spinner sur succès */

.eks-modal__step--error {
    border-left-color: var(--eks-color-error-text);
    color: var(--eks-color-error-text);
    background: var(--eks-color-error-bg);
}
.eks-modal__step--error::after { display: none; }

.eks-modal__actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ---------- Édition de profil : onglets ---------- */

.eks-profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid var(--eks-color-border);
    margin: 24px 0 24px;
}
.eks-profile-tab {
    background: transparent;
    border: none;
    color: var(--eks-color-muted);
    padding: 12px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.eks-profile-tab:hover {
    color: var(--eks-color-text);
}
.eks-profile-tab.is-active {
    color: var(--eks-color-accent);
    border-bottom-color: var(--eks-color-accent);
}

.eks-profile-panel {
    display: none;
}
.eks-profile-panel.is-active {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.eks-profile-panel.is-active > .eks-field,
.eks-profile-panel.is-active > label.eks-field,
.eks-profile-panel.is-active > fieldset {
    margin: 0;
}

.eks-profile-actions {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--eks-color-border);
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
    .eks-header__inner { flex-direction: column; align-items: flex-start; padding: 20px 24px; }
    .eks-nav { margin-left: 0; gap: 18px; }
    .eks-main__inner { padding: 32px 16px 56px; }
    .eks-section, .eks-auth, .eks-dashboard { padding: 28px 20px; }
    h1 { font-size: 28px; }
    .eks-form-group { gap: 28px; }
}

/* ---------- Bloc "Aperçu de ma fiche" (sidebar) + drawer ---------- */
.eks-help-block--preview {
    background: var(--eks-color-accent-soft);
    border-left: 3px solid var(--eks-color-accent);
    padding: 14px 16px;
}
.eks-help-block--preview h3 {
    margin: 0 0 8px 0;
    font-size: 1em;
    color: var(--eks-color-accent-strong);
}
.eks-help-block--preview p {
    margin: 0 0 12px 0;
    font-size: .92em;
    color: #444;
}
.eks-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: var(--eks-color-accent);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-weight: 600;
    font-size: .95em;
    cursor: pointer;
    transition: background 160ms ease;
}
.eks-preview-btn:hover,
.eks-preview-btn:focus { background: var(--eks-color-accent-hover); color: #fff; }

.eks-preview-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
}
.eks-preview-backdrop.is-open { opacity: 1; pointer-events: auto; }

.eks-preview-drawer {
    position: fixed;
    right: 0; top: 0;
    height: 100vh;
    width: min(92vw, 1200px);
    background: #fff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, .18);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(.2, .8, .2, 1);
}
.eks-preview-drawer.is-open { transform: translateX(0); }

.eks-preview-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}
.eks-preview-drawer__title {
    margin: 0;
    font-size: 1.05em;
    color: var(--eks-color-accent-strong);
}
.eks-preview-drawer__close {
    appearance: none;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 4px 10px;
    border-radius: 4px;
}
.eks-preview-drawer__close:hover { background: #eee; color: #222; }

.eks-preview-drawer__status {
    display: none;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: .95em;
}
.eks-preview-drawer__status.is-visible { display: block; }
.eks-preview-drawer__status.is-error { color: #b3261e; background: #fdecea; }

.eks-preview-drawer__frame {
    flex: 1;
    width: 100%;
    border: 0;
    background: #fff;
}

body.eks-no-scroll { overflow: hidden; }

@media (max-width: 768px) {
    .eks-preview-drawer { width: 100vw; }
}

/* =========================================================================
   Arbre d'inscription interactif (page principale d'inscription)
   ========================================================================= */

:root {
    --eks-fruit: #ec6608;       /* orange des fruits du SVG */
    --eks-fruit-soft: rgba(236, 102, 8, 0.55);
}

.eks-auth--tree {
    max-width: 760px;
    text-align: center;
}

.eks-tree-intro {
    max-width: 600px;
    margin: 0 auto 1.4rem;
}
.eks-tree-intro h1 {
    font-family: var(--eks-font-serif);
    margin: 0.2rem 0 0.5rem;
}
.eks-tree-intro__lead {
    color: var(--eks-color-muted);
    line-height: 1.55;
}
.eks-tree-intro__lead strong { color: var(--eks-color-accent); font-weight: 600; }

/* --- Scène : le SVG en fond, le calque interactif par-dessus --- */
.eks-tree {
    position: relative;
    margin: 0 auto;
}
.eks-tree__stage {
    position: relative;
    width: min(92vw, 540px);
    margin: 0 auto;
    background: #303030;
    border-radius: var(--eks-radius-lg);
    box-shadow: 0 18px 50px rgba(20, 12, 8, 0.28);
    overflow: hidden;
}
.eks-tree__img {
    display: block;
    width: 100%;
    height: auto;
    transform-origin: 50% 100%;
    animation: eksTreeSway 9s ease-in-out infinite;
}
.eks-tree__layer {
    position: absolute;
    inset: 0;
}

.eks-tree__hint {
    display: flex;
    gap: 1.4rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem auto 0;
    font-size: 0.82rem;
    color: var(--eks-color-muted);
    letter-spacing: 0.02em;
}
.eks-tree__hint span { position: relative; padding-left: 1.1rem; }
.eks-tree__hint span::before {
    content: "";
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 0.55rem; height: 0.55rem; border-radius: 50%;
}
.eks-tree__hint-root::before { background: var(--eks-color-accent); }
.eks-tree__hint-fruit::before { background: var(--eks-fruit); }

/* --- Zones interactives --- */
.eks-tree-spot {
    position: absolute;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    z-index: 2;
}
.eks-tree-spot:focus-visible { outline: none; }
.eks-tree-spot__tag {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Fruits : pastille ronde avec halo orange qui « respire » */
.eks-tree-spot--fruit {
    width: 13%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}
.eks-tree-spot--fruit::before {
    content: "";
    position: absolute;
    inset: -18%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--eks-fruit-soft) 0%, rgba(236, 102, 8, 0) 68%);
    opacity: 0.35;
    transform: scale(0.8);
    animation: eksFruitPulse 3.4s ease-in-out infinite;
    animation-delay: var(--eks-fruit-delay, 0s);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.eks-tree-spot--fruit::after {
    content: "";
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.eks-tree-spot--fruit:hover::before,
.eks-tree-spot--fruit:focus-visible::before,
.eks-tree-spot--fruit.is-active::before {
    opacity: 1;
    transform: scale(1.12);
    animation-play-state: paused;
}
.eks-tree-spot--fruit:hover::after,
.eks-tree-spot--fruit:focus-visible::after,
.eks-tree-spot--fruit.is-active::after {
    opacity: 0.9;
    transform: scale(1);
}

/* Racines : zone large sur l'étiquette, surlignage chaud au survol */
.eks-tree-spot--root {
    width: 23%;
    height: 6.2%;
    border-radius: 999px;
}
.eks-tree-spot--root::before {
    content: "";
    position: absolute;
    inset: -6% -4%;
    border-radius: 999px;
    background: var(--eks-color-accent);
    opacity: 0;
    box-shadow: 0 0 0 1px rgba(186, 116, 72, 0.6) inset, 0 0 22px rgba(186, 116, 72, 0.5);
    mix-blend-mode: screen;
    transition: opacity 0.22s ease;
}
.eks-tree-spot--root:hover::before,
.eks-tree-spot--root:focus-visible::before,
.eks-tree-spot--root.is-active::before {
    opacity: 0.5;
}
.eks-tree-spot--root::after {
    content: "";
    position: absolute;
    left: 50%; bottom: -2px; transform: translateX(-50%);
    width: 0; height: 2px;
    background: var(--eks-color-accent);
    transition: width 0.28s ease;
}
.eks-tree-spot--root:hover::after,
.eks-tree-spot--root:focus-visible::after,
.eks-tree-spot--root.is-active::after {
    width: 80%;
}

/* Branches / logos → sites du réseau (accent bleu cendré) */
.eks-tree-spot--branch { border-radius: 8px; }
.eks-tree-spot--branch::before {
    content: "";
    position: absolute;
    inset: -12% -6%;
    border-radius: 10px;
    background: rgba(122, 174, 177, 0);
    box-shadow: 0 0 0 1.5px rgba(122, 174, 177, 0);
    transition: background 0.22s ease, box-shadow 0.22s ease;
}
.eks-tree-spot--branch:hover::before,
.eks-tree-spot--branch:focus-visible::before,
.eks-tree-spot--branch.is-active::before {
    background: rgba(122, 174, 177, 0.16);
    box-shadow: 0 0 0 1.5px rgba(122, 174, 177, 0.65), 0 0 20px rgba(122, 174, 177, 0.4);
}
.eks-tree__hint-branch::before { background: var(--eks-color-cool); }

/* Logo override (image uploadée) : recouvre le logo d'origine dessiné dans le SVG */
.eks-tree-spot--has-logo {
    background: #303030;
    overflow: hidden;
    border-radius: 4px;
}
.eks-tree-spot__logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* --- Debug (?eksdebug=1) : rend les zones visibles pour caler les positions sur
   la vraie page. Aucun effet pour les visiteurs normaux. --- */
.eks-tree--debug .eks-tree-spot {
    outline: 2px solid #fff;
    outline-offset: -1px;
}
/* Couleurs vives ABSENTES de l'arbre → repérage non ambigu (crosshair au centre). */
.eks-tree--debug .eks-tree-spot::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    background:
        linear-gradient(#fff, #fff) center / 100% 2px no-repeat,
        linear-gradient(#fff, #fff) center / 2px 100% no-repeat;
}
.eks-tree--debug .eks-tree-spot--root {
    background: rgba(255, 0, 255, 0.5);
    outline-color: #ff00ff;
    width: 6%;
    height: 3.5%;
}
.eks-tree--debug .eks-tree-spot--fruit {
    background: rgba(0, 230, 255, 0.55);
    outline-color: #00e6ff;
    width: 4.5%;
    height: 3.2%;
}
.eks-tree--debug .eks-tree-spot--branch {
    background: rgba(255, 235, 0, 0.35);
    outline-color: #ffeb00;
}
.eks-tree--debug .eks-tree-spot__tag {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    clip-path: none;
    overflow: visible;
    font: 700 9px/1 sans-serif;
    color: #fff;
    text-shadow: 0 1px 2px #000;
    white-space: nowrap;
}

/* --- Pop-over --- */
.eks-tree-pop {
    position: absolute;
    z-index: 30;
    width: 264px;
    max-width: 86vw;
    background: var(--eks-color-surface);
    color: var(--eks-color-text);
    border: 1px solid var(--eks-color-border);
    border-radius: var(--eks-radius-lg);
    box-shadow: 0 16px 40px rgba(53, 32, 26, 0.22);
    padding: 0.95rem 1rem 1.05rem;
    text-align: left;
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}
.eks-tree-pop.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.eks-tree-pop__close {
    position: absolute;
    top: 4px; right: 6px;
    width: 30px; height: 30px;
    border: 0; background: transparent;
    font-size: 1.4rem; line-height: 1;
    color: var(--eks-color-muted);
    cursor: pointer;
}
.eks-tree-pop__close:hover { color: var(--eks-color-text-strong); }
.eks-tree-pop__eyebrow {
    margin: 0 0 0.15rem;
    font-size: 0.68rem;
    letter-spacing: var(--eks-letter-spacing-loose);
    text-transform: uppercase;
    color: var(--eks-color-accent);
}
.eks-tree-pop__title {
    margin: 0 0 0.4rem;
    font-family: var(--eks-font-serif);
    font-size: 1.15rem;
    color: var(--eks-color-text-strong);
}
.eks-tree-pop__text {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--eks-color-muted);
}
.eks-tree-pop__cta {
    display: inline-block;
    margin-top: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--eks-color-accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s ease;
}
.eks-tree-pop__cta:hover { background: var(--eks-color-accent-hover); color: #fff; }
.eks-tree-pop__cta--ghost {
    background: transparent;
    color: var(--eks-color-accent);
    border: 1px solid var(--eks-color-border-strong);
    padding: 0.4rem 0.9rem;
}
.eks-tree-pop__cta--ghost:hover { background: var(--eks-color-accent-soft); color: var(--eks-color-accent-hover); }

.eks-tree-pop__media {
    margin: -0.2rem -0.2rem 0.6rem;
    border-radius: var(--eks-radius);
    overflow: hidden;
    background: var(--eks-color-surface-2);
}
.eks-tree-pop__img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.eks-tree-pop__arrow {
    position: absolute;
    bottom: -8px;
    left: var(--eks-pop-arrow, 50%);
    transform: translateX(-50%) rotate(45deg);
    width: 14px; height: 14px;
    background: var(--eks-color-surface);
    border-right: 1px solid var(--eks-color-border);
    border-bottom: 1px solid var(--eks-color-border);
}
.eks-tree-pop.is-below .eks-tree-pop__arrow {
    bottom: auto;
    top: -8px;
    border: 0;
    border-left: 1px solid var(--eks-color-border);
    border-top: 1px solid var(--eks-color-border);
}

/* --- Repli liste (accessibilité / sans JS) --- */
.eks-tree-fallback {
    margin: 2rem auto 0;
    max-width: 760px;
    text-align: left;
}
.eks-tree-fallback > summary {
    cursor: pointer;
    text-align: center;
    color: var(--eks-color-muted);
    font-size: 0.9rem;
    padding: 0.5rem;
}
.eks-tree-fallback > summary:hover { color: var(--eks-color-accent); }
.eks-tree-fallback[open] > summary { margin-bottom: 1rem; }

/* --- Mobile : pop-over en bottom-sheet --- */
@media (max-width: 640px) {
    .eks-tree-pop.is-sheet {
        position: fixed;
        left: 0 !important;
        right: 0;
        bottom: 0;
        top: auto !important;
        width: 100%;
        max-width: none;
        border-radius: 16px 16px 0 0;
        padding: 1.1rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom));
        transform: translateY(100%);
        box-shadow: 0 -10px 40px rgba(53, 32, 26, 0.28);
    }
    .eks-tree-pop.is-sheet.is-open { transform: none; }
    .eks-tree-pop.is-sheet .eks-tree-pop__arrow { display: none; }
    .eks-tree-pop__img { height: 38vw; max-height: 220px; }
    .eks-tree__hint { flex-direction: column; gap: 0.45rem; align-items: center; }
}

/* --- Animations --- */
@keyframes eksFruitPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.82); }
    50%      { opacity: 0.65; transform: scale(1.04); }
}
@keyframes eksTreeSway {
    0%, 100% { transform: rotate(-0.35deg); }
    50%      { transform: rotate(0.35deg); }
}

@media (prefers-reduced-motion: reduce) {
    .eks-tree__img { animation: none; }
    .eks-tree-spot--fruit::before { animation: none; opacity: 0.5; }
    .eks-tree-pop { transition: opacity 0.12s ease; transform: none; }
}

/* --- Mode immersif : page d'inscription plein écran, l'arbre comme point central --- */
/* `body.eks-members--immersive` (et non `.eks-members--immersive`) pour battre la
   spécificité de la règle de base `body.eks-members { background: crème }`. */
body.eks-members--immersive {
    background: #303030;
    color: #f1ebe3;
}
.eks-members--immersive .eks-header { display: none; }
/* `body` est un flex column → ses items (.eks-main) ont min-width:auto et refusent
   de rétrécir sous la largeur intrinsèque du SVG (viewBox 7086px), ce qui débordait
   sur mobile. min-width:0 + min-width:0 sur la chaîne corrige. */
.eks-members--immersive .eks-main { padding: 0; min-width: 0; }
.eks-members--immersive .eks-main__inner,
.eks-members--immersive .eks-auth--tree,
.eks-members--immersive .eks-tree { min-width: 0; }
.eks-members--immersive .eks-main__inner {
    max-width: none;
    padding: 1.4rem 1rem 2rem;
}
.eks-members--immersive .eks-auth--tree { max-width: 860px; }

/* Intro en clair, intégrée à la zone sombre */
.eks-members--immersive .eks-tree-intro { margin-bottom: 0.6rem; }
.eks-members--immersive .eks-stepper { color: var(--eks-fruit); }
.eks-members--immersive .eks-tree-intro h1 { color: #ffffff; }
.eks-members--immersive .eks-tree-intro__lead { color: rgba(241, 235, 227, 0.72); }
.eks-members--immersive .eks-tree-intro__lead strong { color: var(--eks-fruit); }

/* L'arbre fond dans la page (même couleur) — plus grand, plus central */
.eks-members--immersive .eks-tree__stage {
    width: min(94vw, 72vh, 800px);
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}
.eks-members--immersive .eks-tree__hint { color: rgba(241, 235, 227, 0.6); }
.eks-members--immersive .eks-tree-fallback > summary { color: rgba(241, 235, 227, 0.62); }
.eks-members--immersive .eks-tree-fallback > summary:hover { color: var(--eks-fruit); }
.eks-members--immersive .eks-auth__links { color: rgba(241, 235, 227, 0.62); }
.eks-members--immersive .eks-auth__links a { color: var(--eks-fruit); }
.eks-members--immersive .eks-footer {
    background: transparent;
    border-top: 1px solid rgba(241, 235, 227, 0.12);
    color: rgba(241, 235, 227, 0.5);
}
.eks-members--immersive .eks-footer a { color: rgba(241, 235, 227, 0.78); }

@media (max-width: 640px) {
    /* Sur mobile, l'arbre prend toute la largeur dispo (le SVG = même fond que la
       page, donc bords invisibles), pour un maximum de lisibilité. On utilise
       width:100% (et non 100vw, qui inclut la scrollbar et déborde). */
    .eks-members--immersive { overflow-x: hidden; }
    .eks-members--immersive .eks-main { padding: 0; }
    .eks-members--immersive .eks-main__inner { padding: 0.75rem 0 1.4rem; max-width: 100%; }
    .eks-members--immersive .eks-auth--tree { max-width: none; padding-left: 0; padding-right: 0; }
    .eks-members--immersive .eks-tree { width: 100%; margin: 0; }
    .eks-members--immersive .eks-tree__stage {
        width: 100%;
        max-width: 100%;
        overflow: hidden; /* clippe les halos en bord d'écran pour éviter tout scroll horizontal */
    }
    /* L'intro et les éléments texte gardent une petite marge latérale. */
    .eks-members--immersive .eks-tree-intro { padding: 0 0.9rem; }
    .eks-members--immersive .eks-tree-intro h1 { font-size: 1.42rem; }
    .eks-members--immersive .eks-tree-intro__lead { font-size: 0.9rem; }
    .eks-members--immersive .eks-tree__hint,
    .eks-members--immersive .eks-tree-fallback,
    .eks-members--immersive .eks-auth__links { padding-left: 0.9rem; padding-right: 0.9rem; }
}

/* =========================================================================
   Arbre d'inscription — variante 3D (concept). Vue registration/concept-3d.php
   + module concept-tree.js. Palette & UI adaptées du POC.
   ========================================================================= */
body.eks-c3d-body {
    background: radial-gradient(120% 95% at 50% 26%, #2b2f22 0%, #1c1d16 46%, #14130f 100%);
    color: #efe7d8;
    font-family: "Inter", system-ui, sans-serif;
    overflow: hidden;
}
body.eks-c3d-body .eks-main,
body.eks-c3d-body .eks-main__inner { padding: 0; margin: 0; max-width: none; }
body.eks-c3d-body .eks-footer { display: none; }

.eks-c3d { --c-fruit: #ec6608; --c-fruit-lt: #ffb15a; --c-teal: #79aeb1; --c-cream: #efe7d8; --c-dim: #b6ac9b; --c-line: rgba(239,231,216,.16); }

.eks-c3d__stage { position: fixed; inset: 0; z-index: 1; }
.eks-c3d__stage canvas { display: block; touch-action: none; }
.eks-c3d__labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }

/* ---- marqueurs ---- */
.eks-c3d-m { pointer-events: auto; cursor: pointer; border: 0; background: none; font: inherit;
    color: var(--c-cream); transform: translate(-50%, -50%); transition: opacity .35s; }
.eks-c3d-m--exp { display: flex; align-items: center; gap: 9px; padding: 4px; white-space: nowrap; }
.eks-c3d-m__dot { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
    background: radial-gradient(circle at 35% 30%, var(--c-fruit-lt), var(--c-fruit) 55%, #ad4a05);
    box-shadow: 0 0 0 5px rgba(236,102,8,.15), 0 2px 10px rgba(0,0,0,.5); transition: transform .25s, box-shadow .25s; }
.eks-c3d-m--exp.is-teal .eks-c3d-m__dot { background: radial-gradient(circle at 35% 30%, #bfe0e2, var(--c-teal) 55%, #3f7c80);
    box-shadow: 0 0 0 5px rgba(121,174,177,.18), 0 2px 10px rgba(0,0,0,.5); }
.eks-c3d-m__txt { display: flex; flex-direction: column; line-height: 1.05; text-shadow: 0 1px 4px rgba(0,0,0,.85), 0 0 12px rgba(0,0,0,.6); }
.eks-c3d-m__txt b { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.eks-c3d-m__txt i { font-size: 10.5px; font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--c-dim); }
.eks-c3d-m--exp:hover .eks-c3d-m__dot, .eks-c3d-m--exp:focus-visible .eks-c3d-m__dot {
    transform: scale(1.22); box-shadow: 0 0 0 6px rgba(236,102,8,.22), 0 0 18px rgba(255,160,70,.6); }
.eks-c3d-m--exp.is-right { flex-direction: row-reverse; }
.eks-c3d-m--exp.is-right .eks-c3d-m__txt { align-items: flex-end; text-align: right; }

.eks-c3d-m--heart { border: 1px solid var(--c-line); background: rgba(18,16,13,.66); backdrop-filter: blur(4px);
    padding: 9px 16px; border-radius: 13px; text-align: center; box-shadow: 0 6px 22px rgba(0,0,0,.45); transition: opacity .35s, border-color .2s; }
.eks-c3d-m--heart:hover { border-color: var(--c-fruit); }
.eks-c3d-m--heart b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; display: block; }
.eks-c3d-m--heart b i { font-style: normal; color: var(--c-fruit); }
.eks-c3d-m--heart small { font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--c-dim); }

.eks-c3d-m--root { border: 1px solid var(--c-line); background: rgba(18,16,13,.72); backdrop-filter: blur(3px);
    padding: 9px 16px; border-radius: 999px; white-space: nowrap; font-size: 13px; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 8px;
    transition: opacity .35s, border-color .2s, background .2s; }
.eks-c3d-m--root::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #88a23c; flex: 0 0 auto; }
.eks-c3d-m--root:hover { border-color: var(--c-fruit); background: rgba(236,102,8,.14); }

/* ---- topbar / signature / hint ---- */
.eks-c3d__topbar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center;
    justify-content: space-between; padding: 14px clamp(14px,4vw,28px); pointer-events: none; }
.eks-c3d__brand { display: flex; align-items: baseline; gap: .5ch; pointer-events: auto; text-decoration: none; color: var(--c-cream); }
.eks-c3d__brand b { font-weight: 700; letter-spacing: .02em; font-size: clamp(15px,2.4vw,18px); }
.eks-c3d__brand b i { font-style: normal; color: var(--c-fruit); }
.eks-c3d__brand span { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--c-dim); }
.eks-c3d__menu { pointer-events: auto; border: 1px solid var(--c-line); background: rgba(0,0,0,.3); color: var(--c-cream);
    font: inherit; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; padding: 9px 14px;
    border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); transition: border-color .2s, background .2s; }
.eks-c3d__menu:hover { border-color: var(--c-fruit); background: rgba(236,102,8,.12); }

.eks-c3d__signature { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    z-index: 15; font-family: "Caveat", cursive; color: var(--c-fruit); font-size: clamp(30px,8vw,46px);
    margin: 0; pointer-events: none; text-shadow: 0 2px 14px rgba(0,0,0,.55); }
.eks-c3d__hint { position: fixed; left: 50%; bottom: calc(64px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    z-index: 15; margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--c-dim);
    pointer-events: none; animation: eksC3dFade 1s ease 6s forwards; opacity: .85; text-align: center; }
@keyframes eksC3dFade { to { opacity: 0; } }

/* ---- boot / erreur ---- */
.eks-c3d__boot { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center;
    gap: 18px; background: #14130f; text-align: center; padding: 24px; transition: opacity .5s; }
.eks-c3d__boot.is-off { opacity: 0; pointer-events: none; }
.eks-c3d__sprout { width: 42px; height: 42px; border: 3px solid rgba(239,231,216,.18); border-top-color: #88a23c;
    border-radius: 50%; animation: eksC3dSpin 1s linear infinite; }
@keyframes eksC3dSpin { to { transform: rotate(360deg); } }
.eks-c3d__load { margin: 0; color: var(--c-dim); font-size: 13px; letter-spacing: .12em; }
.eks-c3d__err { display: none; max-width: 440px; color: var(--c-cream); line-height: 1.55; font-size: 14px; }
.eks-c3d__err a { color: var(--c-fruit-lt); }
.eks-c3d__boot.is-fail .eks-c3d__sprout, .eks-c3d__boot.is-fail .eks-c3d__load { display: none; }
.eks-c3d__boot.is-fail .eks-c3d__err { display: block; }

/* ---- fiche / panneau ---- */
.eks-c3d__scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10,9,8,.55); backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none; transition: opacity .3s; }
.eks-c3d__scrim.is-on { opacity: 1; pointer-events: auto; }
.eks-c3d__sheet { position: fixed; z-index: 41; left: 50%; bottom: 0; transform: translate(-50%, 110%);
    width: min(520px, 100%); background: linear-gradient(180deg, #2f3127, #1c1d16); border: 1px solid var(--c-line);
    border-bottom: none; border-radius: 22px 22px 0 0; padding: 26px clamp(20px,5vw,32px) calc(28px + env(safe-area-inset-bottom));
    box-shadow: 0 -20px 60px rgba(0,0,0,.5); transition: transform .38s cubic-bezier(.22,.61,.36,1); }
.eks-c3d__sheet.is-on { transform: translate(-50%, 0); }
.eks-c3d__grip { width: 42px; height: 4px; border-radius: 99px; background: var(--c-line); margin: 0 auto 18px; }
.eks-c3d__close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--c-line); background: transparent; color: var(--c-cream); cursor: pointer; font-size: 18px; line-height: 1; }
.eks-c3d__eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--c-fruit); margin: 0 0 6px; }
.eks-c3d__title { margin: 0; font-size: clamp(26px,7vw,34px); font-weight: 700; letter-spacing: -.01em; }
.eks-c3d__sub { margin: 4px 0 16px; color: var(--c-dim); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.eks-c3d__text { margin: 0 0 22px; line-height: 1.55; color: #ded6c6; font-size: 15.5px; }
.eks-c3d__media { margin: 0 0 16px; border-radius: 14px; overflow: hidden; aspect-ratio: 16/10; background: rgba(0,0,0,.25); }
.eks-c3d__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eks-c3d__cta { display: inline-flex; align-items: center; gap: 10px; border: none; cursor: pointer; background: var(--c-fruit);
    color: #1c140c; font: inherit; font-weight: 700; font-size: 15px; padding: 14px 22px; border-radius: 999px;
    text-decoration: none; transition: transform .15s, background .2s; }
.eks-c3d__cta:hover { transform: translateY(-2px); background: var(--c-fruit-lt); }
.eks-c3d__cta--ghost { background: transparent; color: var(--c-cream); border: 1px solid var(--c-line); }

/* ---- sommaire ---- */
.eks-c3d__index { position: fixed; z-index: 42; inset: 0; background: rgba(20,19,15,.96); backdrop-filter: blur(8px);
    padding: 78px clamp(18px,6vw,40px) 40px; overflow: auto; opacity: 0; pointer-events: none; transition: opacity .3s; }
.eks-c3d__index.is-on { opacity: 1; pointer-events: auto; }
.eks-c3d__index h3 { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--c-fruit); margin: 26px 0 12px; }
.eks-c3d__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.eks-c3d__idx { text-align: left; font: inherit; cursor: pointer; color: var(--c-cream); background: rgba(255,255,255,.03);
    border: 1px solid var(--c-line); border-radius: 14px; padding: 14px 16px; transition: border-color .2s, transform .15s; }
.eks-c3d__idx:hover { border-color: var(--c-fruit); transform: translateY(-2px); }
.eks-c3d__idx b { display: block; font-size: 16px; margin-bottom: 3px; }
.eks-c3d__idx small { color: var(--c-dim); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.eks-c3d__index-x { position: fixed; top: 14px; right: 16px; }

.eks-c3d__noscript { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; padding: 24px; text-align: center; }

/* desktop : la fiche devient une carte centrée */
@media (min-width: 560px) {
    .eks-c3d__sheet { bottom: auto; top: 50%; border-radius: 22px; border-bottom: 1px solid var(--c-line);
        transform: translate(-50%, -40%) scale(.96); opacity: 0;
        transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .35s; }
    .eks-c3d__sheet.is-on { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .eks-c3d__grip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .eks-c3d__hint { animation: none; }
    .eks-c3d__sprout { animation-duration: 2s; }
}
