/* ═══════════════════════════════════════════════════════════
   HUB — LA FLAMME VIOLETTE
   hub-flamme-violette.css
   Mobile-first — breakpoints : 640px (tablette) / 1024px (desktop)
   ═══════════════════════════════════════════════════════════ */

/* ── VARIABLES ──────────────────────────────────────────── */
:root {
    /* Palette principale */
    --hub-violet-profond  : #3b0d6e;
    --hub-violet-moyen    : #6b2fa0;
    --hub-violet-clair    : #9f0070;
    --hub-violet-poudre   : #c9a0f5;
    --hub-or              : #c89b3c;
    --hub-or-clair        : #f0d080;
    --hub-rose            : #e07090;
    --hub-corail          : #e08050;
    --hub-lavande         : #8090e0;
    --hub-blanc           : #ffffff;

    /* Overlays par carte — très subtils, on laisse les dégradés natifs des images travailler */
    /* L'overlay sert uniquement à donner un peu de profondeur, pas à colorer */
    /* Carte 4 : overlay un peu plus marqué car image au dégradé natif plus clair */
    --overlay-fondations  : linear-gradient(100deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.05) 45%, transparent 70%);
    --overlay-transfo     : linear-gradient(100deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.02) 45%, transparent 70%);
    --overlay-pratique    : linear-gradient(100deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.05) 45%, transparent 70%);
    --overlay-parcours    : linear-gradient(100deg, rgba(0,0,0,.32) 0%, rgba(0,0,0,.10) 45%, transparent 72%);

    /* Couleur du liseret par carte */
    --liseret-fondations  : var(--hub-or);
    --liseret-transfo     : var(--hub-or-clair);
    --liseret-pratique    : var(--hub-lavande);
    --liseret-parcours    : var(--hub-corail);

    /* Couleur des titres par carte — fidèles à l'ambiance chromatique des images */
    --title-fondations    : #e8c96a;   /* or chaud — rappel pyramide */
    --title-transfo       : #f0c060;   /* or lumineux — rappel papillon doré */
    --title-pratique      : #c8d8ff;   /* lavande clair — rappel halo bleu/violet */
    --title-parcours      : #e8a070;   /* corail clair — harmonisé avec le bouton */

    /* Boutons pleins par carte — fond + border contrasté */
    --cta-bg-fondations   : rgba(255,255,255,.20);
    --cta-bd-fondations   : rgba(255,255,255,.85);
    --cta-cl-fondations   : #ffffff;
    --cta-bg-transfo      : rgba(195,135,35,.85);
    --cta-bd-transfo      : #f0d070;
    --cta-cl-transfo      : #ffffff;
    --cta-bg-pratique     : rgba(255,255,255,.20);
    --cta-bd-pratique     : rgba(255,255,255,.85);
    --cta-cl-pratique     : #ffffff;
    --cta-bg-parcours     : rgba(185,65,25,.85);
    --cta-bd-parcours     : #f0a060;
    --cta-cl-parcours     : #ffffff;

    /* Typo */
    --hub-font-title      : 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif;
    --hub-font-body       : 'Josefin Sans', 'Trebuchet MS', sans-serif;

    /* Rayons / ombres */
    --hub-radius          : 18px;
    --hub-shadow          : 0 12px 35px rgba(94,34,120,.12);
    --hub-shadow-hover    : 0 14px 34px rgba(94,34,120,.18), 0 0 18px rgba(255,255,255,.10);

    /* Transitions */
    --hub-transition      : 0.38s cubic-bezier(.25,.8,.25,1);
}

/* ── WRAPPER GLOBAL ─────────────────────────────────────── */
.hub-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 48px;
    box-sizing: border-box;
    font-family: var(--hub-font-body);
}

/* ══════════════════════════════════════════════════════════
   INTRO
   Mobile : empilé (texte puis déco cachée)
   Desktop : split 55% texte / 45% déco
   ══════════════════════════════════════════════════════════ */
.hub-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(159,0,112,.12);
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    padding: 32px 28px 28px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.hub-intro p{
		max-width:900px;
	}
	
/* halo de fond décoratif */
.hub-intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 80% 50%, rgba(180,125,250,.10) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Texte intro ────────────────────────────────────────── */
.hub-intro-text {
    position: relative;
    z-index: 1;
}

.hub-title {
    font-family: var(--hub-font-title);
    font-size: clamp(2rem, 5.5vw, 3rem);
    font-weight: 600;
    color: var(--hub-violet-profond);
    margin: 0 0 10px;
    letter-spacing: .02em;
    line-height: 1.15;
}

/* Liseret décoratif sous le titre */
.hub-liseret {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.hub-liseret::before,
.hub-liseret::after {
    content: '';
    display: block;
    height: 1px;
    width: 52px;
    background: linear-gradient(90deg, transparent, var(--hub-or), transparent);
}
.hub-liseret::before {
    background: linear-gradient(90deg, transparent, var(--hub-or));
}
.hub-liseret::after {
    background: linear-gradient(90deg, var(--hub-or), transparent);
}
/* petit emblème central */
.hub-liseret {
    position: relative;
}
.hub-liseret::before {
    content: '⁕';
    display: inline-block;
    color: var(--hub-or);
    font-size: .85rem;
    width: auto;
    height: auto;
    background: none;
    letter-spacing: 0;
}
/* Remplacement propre : deux traits + icône centrale */
.hub-liseret {
    display: block;
    position: relative;
    height: 16px;
    margin-bottom: 18px;
}
.hub-liseret::before,
.hub-liseret::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
    width: 60px;
    background: var(--hub-or);
    opacity: .7;
}
.hub-liseret::before { left: 0; }
.hub-liseret::after  { left: 76px; }
/* pastille centrale */
.hub-liseret {
    padding-left: 0; /* reset */
}
/* On utilise un background-image SVG inline pour l'emblème central */
.hub-liseret {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='16'%3E%3Cline x1='0' y1='8' x2='56' y2='8' stroke='%23c89b3c' stroke-width='1' opacity='.7'/%3E%3Ctext x='70' y='12' text-anchor='middle' font-size='11' fill='%23c89b3c' font-family='serif'%3E✾%3C/text%3E%3Cline x1='84' y1='8' x2='140' y2='8' stroke='%23c89b3c' stroke-width='1' opacity='.7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 140px 16px;
    background-position: left center;
    width: 140px;
    /* override les pseudo */
}
.hub-liseret::before,
.hub-liseret::after { display: none; }

.hub-intro-body {
    font-size: clamp(.88rem, 2.2vw, 1rem);
    color: #4a3060;
    line-height: 1.7;
    margin: 0 0 14px;
}

.hub-intro-phrase {
    font-family: var(--hub-font-title);
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--hub-violet-clair);
    line-height: 1.65;
    margin: 0;
}

/* ── Déco SVG ───────────────────────────────────────────── */
.hub-intro-deco {
    display: none; /* cachée mobile — apparaît desktop */
    flex-shrink: 0;
    align-self: center;
}

.hub-deco-svg {
    width: 100%;
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 4px 18px rgba(180,125,250,.25));
}

/* ══════════════════════════════════════════════════════════
   GRILLE CARTES
   Mobile   : 1 colonne
   Tablette : 2 colonnes (≥ 640px)
   ══════════════════════════════════════════════════════════ */
.hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* ══════════════════════════════════════════════════════════
   CARTES
   ══════════════════════════════════════════════════════════ */
.hub-card {
    position: relative;
    display: block;
    border-radius: var(--hub-radius);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--hub-shadow);
    border: 1px solid rgba(255,255,255,.35);
    /* ratio légèrement plus haut que le natif 2:1 pour donner de l'air au texte */
    /* mobile : ratio plus vertical (1.05/1) pour laisser assez de hauteur au texte centré, voir .hub-card-content */
    aspect-ratio: 1.05 / 1;
    transition: box-shadow var(--hub-transition), transform var(--hub-transition);
    background: var(--hub-violet-profond); /* fond pendant le chargement image */
}

.hub-card:hover,
.hub-card:focus-visible {
    box-shadow: var(--hub-shadow-hover);
    transform: translateY(-1px);
    outline: none;
}

/* ── Image ──────────────────────────────────────────────── */
.hub-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center; /* images 1800×900 — on garde le centre */
    display: block;
    transition: transform var(--hub-transition);
}

.hub-card:hover .hub-card-img,
.hub-card:focus-visible .hub-card-img {
    transform: scale(1.018);
}

/* ── Overlay gradienté ──────────────────────────────────── */
.hub-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;     /* contenu centré verticalement — pas de débordement */
    padding: 30px 34px;
    transition: background var(--hub-transition);
}


/* overlays par carte */
.hub-card--fondations   .hub-card-overlay { background: var(--overlay-fondations); }
.hub-card--transformation .hub-card-overlay { background: var(--overlay-transfo); }
.hub-card--pratique     .hub-card-overlay { background: var(--overlay-pratique); }
.hub-card--parcours     .hub-card-overlay { background: var(--overlay-parcours); }

/* ── Contenu texte ──────────────────────────────────────── */
.hub-card-content {
    position: relative;
    z-index: 2;
    max-width: 82%;    /* mobile : texte large pour éviter le débordement vertical (contenu centré dans une boîte à ratio fixe) — l'asymétrie texte/image revient au breakpoint tablette */
    color: var(--hub-blanc);
    text-align: left;  /* override d'un éventuel justify hérité */
}

.hub-card-title {
    font-family: var(--hub-font-title);
    font-size: clamp(1.7rem, 3vw, 2.15rem);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 8px;
    letter-spacing: .03em;
    text-shadow: 0 1px 8px rgba(0,0,0,.55), 0 2px 20px rgba(0,0,0,.35);
}

.hub-card--fondations   .hub-card-title { color: var(--title-fondations); }
.hub-card--transformation .hub-card-title { color: var(--title-transfo); }
.hub-card--pratique     .hub-card-title { color: var(--title-pratique); }
.hub-card--parcours     .hub-card-title { color: var(--title-parcours); }

/* Liseret des cartes */
.hub-card-liseret {
    display: block;
    height: 14px;
    margin-bottom: 10px;
    background-repeat: no-repeat;
    background-size: 110px 14px;
    background-position: left center;
}

.hub-card--fondations   .hub-card-liseret { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='14'%3E%3Cline x1='0' y1='7' x2='44' y2='7' stroke='%23c89b3c' stroke-width='1' opacity='.85'/%3E%3Ctext x='55' y='11' text-anchor='middle' font-size='9' fill='%23c89b3c' font-family='serif'%3E✾%3C/text%3E%3Cline x1='66' y1='7' x2='110' y2='7' stroke='%23c89b3c' stroke-width='1' opacity='.85'/%3E%3C/svg%3E"); }
.hub-card--transformation .hub-card-liseret { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='14'%3E%3Cline x1='0' y1='7' x2='44' y2='7' stroke='%23f0c060' stroke-width='1' opacity='.85'/%3E%3Ctext x='55' y='11' text-anchor='middle' font-size='9' fill='%23f0c060' font-family='serif'%3E✾%3C/text%3E%3Cline x1='66' y1='7' x2='110' y2='7' stroke='%23f0c060' stroke-width='1' opacity='.85'/%3E%3C/svg%3E"); }
.hub-card--pratique     .hub-card-liseret { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='14'%3E%3Cline x1='0' y1='7' x2='44' y2='7' stroke='%238090e0' stroke-width='1' opacity='.85'/%3E%3Ctext x='55' y='11' text-anchor='middle' font-size='9' fill='%238090e0' font-family='serif'%3E✾%3C/text%3E%3Cline x1='66' y1='7' x2='110' y2='7' stroke='%238090e0' stroke-width='1' opacity='.85'/%3E%3C/svg%3E"); }
.hub-card--parcours     .hub-card-liseret { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='14'%3E%3Cline x1='0' y1='7' x2='44' y2='7' stroke='%23e8a070' stroke-width='1' opacity='.85'/%3E%3Ctext x='55' y='11' text-anchor='middle' font-size='9' fill='%23e8a070' font-family='serif'%3E✾%3C/text%3E%3Cline x1='66' y1='7' x2='110' y2='7' stroke='%23e8a070' stroke-width='1' opacity='.85'/%3E%3C/svg%3E"); }

.hub-card-text {
	font-size: .98rem;
    font-weight: 400;
    line-height: 1.55;
    margin: 0 0 14px;
    color: #ffffff;
    text-align: left;           /* override d'un éventuel justify global */
    text-shadow: 0 1px 6px rgba(0,0,0,.55), 0 2px 14px rgba(0,0,0,.35);
}

/* ── Bouton CTA ─────────────────────────────────────────── */
.hub-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 20px;
    border-radius: 100px;
    border: 1.5px solid;
    font-family: var(--hub-font-body);
    font-size: .76rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    transition: background var(--hub-transition), border-color var(--hub-transition), transform var(--hub-transition), box-shadow var(--hub-transition);
}

.hub-card--fondations   .hub-card-cta { background: var(--cta-bg-fondations); border-color: var(--cta-bd-fondations); color: var(--cta-cl-fondations); }
.hub-card--transformation .hub-card-cta { background: var(--cta-bg-transfo);  border-color: var(--cta-bd-transfo);  color: var(--cta-cl-transfo); }
.hub-card--pratique     .hub-card-cta { background: var(--cta-bg-pratique);   border-color: var(--cta-bd-pratique); color: var(--cta-cl-pratique); }
.hub-card--parcours     .hub-card-cta { background: var(--cta-bg-parcours);   border-color: var(--cta-bd-parcours); color: var(--cta-cl-parcours); }

.hub-card:hover .hub-card-cta,
.hub-card:focus-visible .hub-card-cta {
    filter: brightness(1.03);
}

/* ══════════════════════════════════════════════════════════
   BREAKPOINT TABLETTE — ≥ 640px
   ══════════════════════════════════════════════════════════ */
@media (min-width: 640px) {

    .hub-intro {
        padding: 36px 36px 32px;
    }

    .hub-grid {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
    }

    /* tablette : ratio plus vertical (grille 2 colonnes = cartes plus étroites qu'en desktop,
       le texte centré a besoin de plus de hauteur pour ne pas déborder en haut/bas) */
    .hub-card {
        aspect-ratio: 0.62 / 1;
    }

    .hub-card-overlay {
        padding: 22px 26px 22px 24px;
    }

    .hub-card-content {
        max-width: 85%;
    }
}

/* ══════════════════════════════════════════════════════════
   BREAKPOINT DESKTOP — ≥ 1024px
   ══════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {

    .hub-wrapper {
    padding: 0 24px 64px;
	}

    /* Intro split 55 / 45 */
    .hub-intro {
        flex-direction: row;
        align-items: center;
        gap: 40px;
        padding: 44px 48px 40px;
    }

    .hub-intro-text {
        flex: 0 0 55%;
    }

    .hub-intro-deco {
        display: flex;
        flex: 1;
        justify-content: flex-end;
    }

    /* Cartes desktop : ratio légèrement plus haut */
    .hub-card {
        aspect-ratio: 1.8 / 1;
    }

    .hub-card-overlay {
        padding: 26px 30px 26px 28px;
    }

    .hub-card-content {
        max-width: 62%; /* desktop : plus d'espace, image respire mieux à droite */
    }

    .hub-card-title {
        font-size: 1.75rem;
    }

    .hub-card-text {
        font-size: .9rem;
    }
}

/* ══════════════════════════════════════════════════════════
   ACCESSIBILITÉ — respect préférence mouvement réduit
   ══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .hub-card,
    .hub-card-img,
    .hub-card-overlay::after,
    .hub-card-cta {
        transition: none;
    }
    .hub-card:hover {
        transform: none;
    }
    .hub-card:hover .hub-card-img {
        transform: none;
    }
}