/**
 * GHA Homepage Styles — V4
 * Global Health Academy — front-page.php
 * Hero split, formations Tutor loop, stats animées,
 * formats de formation.
 * All classes prefixed gha-hp-
 * Breakpoints: 991px (tablet), 600px (mobile)
 */


/* ==========================================================================
   0. CSS VARIABLES
   ========================================================================== */

:root {
    --gha-primary: #1e40af;
    --gha-primary-hover: #1e3a8a;
    --gha-primary-light: #dbeafe;
    --gha-primary-dark: #1e3a8a;
    --gha-text: #1e293b;
    --gha-text-secondary: #64748b;
    --gha-text-light: #94a3b8;
    --gha-border: #e2e8f0;
    --gha-border-hover: #cbd5e1;
    --gha-bg: #f8fafc;
    --gha-bg-hover: #f1f5f9;
    --gha-white: #ffffff;
    --gha-radius: 12px;
    --gha-radius-sm: 8px;
    --gha-radius-xs: 6px;
    --gha-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --gha-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --gha-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --gha-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --gha-focus-ring: 0 0 0 3px rgba(30, 64, 175, 0.1);
}


/* ==========================================================================
   0b. TYPOGRAPHY & RESETS
   ========================================================================== */

.gha-hp {
    --gha-hp-home-edge: max(16px, (100vw - 1140px) / 2 - 85px);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--gha-text-secondary);
    background: var(--gha-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.gha-hp h1,
.gha-hp h2,
.gha-hp h3 {
    font-family: 'Sora', sans-serif;
    color: var(--gha-text);
    line-height: 1.2;
    margin-top: 0;
}

.gha-hp p,
.gha-hp span,
.gha-hp a,
.gha-hp blockquote,
.gha-hp button {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Les liens dans les titres h1-h3 héritent Sora du parent */
.gha-hp h1 a,
.gha-hp h2 a,
.gha-hp h3 a {
    font-family: inherit;
}

.gha-hp blockquote {
    border: none;
    border-left: none;
    padding: 0;
    margin: 0;
    quotes: none;
    background: none;
}
.gha-hp blockquote::before,
.gha-hp blockquote::after {
    content: none;
    display: none;
}

/* Utility classes */
.gha-hp-text-center { text-align: center; }
.gha-hp-hide-mobile { display: flex; }
.gha-hp-show-mobile { display: none; }


/* ==========================================================================
   0c. HERO CARD WRAPPER
   ========================================================================== */

.gha-hp-hero-wrapper {
    padding: 40px var(--gha-hp-home-edge) 0;
    background: var(--gha-bg);
}

.gha-hp-hero-wrapper .gha-hp-hero {
    border-radius: 20px;
    overflow: hidden;
}


/* ==========================================================================
   1. HERO — SPLIT LAYOUT
   ========================================================================== */

.gha-hp-hero {
    background: linear-gradient(135deg, #0f2a6e 0%, #1e40af 40%, #1e3a8a 70%, #0c1d54 100%);
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}

/* Grid layout */
.gha-hp-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.gha-hp-hero-content {
    text-align: left;
}

/* Floating PQK badge */
.gha-hp-hero-badge-float {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 100px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 24px;
    position: relative;
}

.gha-hp-hero-badge-pulse {
    position: absolute;
    inset: -2px;
    border-radius: 100px;
    border: 2px solid rgba(255,255,255,0.3);
    animation: ghaPulse 2.5s ease-in-out infinite;
}

@keyframes ghaPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* Hero title */
.gha-hp-hero .gha-hp-hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(32px, 4.2vw, 44px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 0 0 20px;
}

.gha-hp-hero-subtitle {
    font-size: 17px;
    color: rgba(255,255,255,0.75);
    max-width: 520px;
    margin: 0 0 36px;
    line-height: 1.65;
}

/* CTA buttons */
.gha-hp-hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gha-hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--gha-radius-sm);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

.gha-hp-btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.gha-hp-btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

.gha-hp-btn-primary {
    background: #ffffff;
    color: var(--gha-primary);
    border-color: #ffffff;
}
.gha-hp-btn-primary:hover {
    background: rgba(255,255,255,0.92);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    color: var(--gha-primary);
    text-decoration: none;
}

.gha-hp-btn-ghost {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255,255,255,0.3);
}
.gha-hp-btn-ghost:hover {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    text-decoration: none;
}

.gha-hp-btn-outline {
    background: transparent;
    color: var(--gha-primary);
    border-color: var(--gha-primary);
}
.gha-hp-btn-outline:hover {
    background: var(--gha-primary);
    color: #ffffff;
    text-decoration: none;
}

.gha-hp-btn-white {
    background: #ffffff;
    color: var(--gha-primary);
    border-color: #ffffff;
}
.gha-hp-btn-white:hover {
    background: rgba(255,255,255,0.92);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    color: var(--gha-primary);
    text-decoration: none;
}

/* Hero social proof */
.gha-hp-hero-proof {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.gha-hp-hero-proof-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
}

.gha-hp-hero-proof-item svg { opacity: 0.7; }

.gha-hp-hero-proof-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
}

.gha-hp-icon { flex-shrink: 0; }


/* ==========================================================================
   1b. HERO VISUAL — CSS MOCKUP
   ========================================================================== */

.gha-hp-hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.gha-hp-hero-mockup {
    width: 100%;
    max-width: 480px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: ghaMockupIn 0.8s ease 0.3s both;
}

@keyframes ghaMockupIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.gha-hp-hero-mockup-bar {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.gha-hp-mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}
.gha-hp-mockup-dot:first-child { background: rgba(239,68,68,0.5); }
.gha-hp-mockup-dot:nth-child(2) { background: rgba(234,179,8,0.5); }
.gha-hp-mockup-dot:nth-child(3) { background: rgba(34,197,94,0.5); }

.gha-hp-hero-mockup-body {
    display: flex;
    min-height: 260px;
}

.gha-hp-mockup-sidebar {
    width: 50px;
    background: rgba(255,255,255,0.03);
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gha-hp-mockup-nav-item {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
}

.gha-hp-mockup-nav-active {
    background: rgba(255,255,255,0.25);
}

.gha-hp-mockup-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gha-hp-mockup-header-line {
    height: 10px;
    width: 60%;
    background: rgba(255,255,255,0.12);
    border-radius: 5px;
}

.gha-hp-mockup-cards {
    display: flex;
    gap: 12px;
}

.gha-hp-mockup-card {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.gha-hp-mockup-card-img {
    height: 60px;
    background: linear-gradient(135deg, rgba(30,64,175,0.3), rgba(59,130,246,0.2));
}

.gha-hp-mockup-card-lines {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gha-hp-mockup-line {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
}

.gha-hp-mockup-line-w80 { width: 80%; }
.gha-hp-mockup-line-w70 { width: 70%; }
.gha-hp-mockup-line-w60 { width: 60%; }
.gha-hp-mockup-line-w50 { width: 50%; }

.gha-hp-mockup-progress {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-top: auto;
}

.gha-hp-mockup-progress-bar {
    height: 100%;
    width: 65%;
    background: linear-gradient(90deg, rgba(59,130,246,0.6), rgba(99,102,241,0.6));
    border-radius: 3px;
    animation: ghaProgress 3s ease-in-out infinite alternate;
}

@keyframes ghaProgress {
    from { width: 25%; }
    to { width: 75%; }
}

/* Floating cards */
.gha-hp-hero-float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 2;
}

.gha-hp-hero-float-pqk {
    top: 20%;
    right: -20px;
    animation: ghaFloatCard 4s ease-in-out infinite;
}

.gha-hp-hero-float-cert {
    bottom: 15%;
    left: -10px;
    animation: ghaFloatCard 4s ease-in-out infinite 2s;
}

@keyframes ghaFloatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.gha-hp-float-icon {
    width: 36px;
    height: 36px;
    background: var(--gha-primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gha-hp-float-icon-green {
    background: #dcfce7;
}

.gha-hp-float-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--gha-text-light);
}

.gha-hp-float-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--gha-primary);
}

.gha-hp-float-value-green {
    color: #16a34a;
}


/* ==========================================================================
   2. STATS — ANIMATED COUNTERS
   ========================================================================== */

.gha-hp-stats {
    background: var(--gha-bg);
    padding: 32px 0;
    position: relative;
}

/* Subtle dot pattern */
.gha-hp-stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--gha-border) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.4;
    pointer-events: none;
}

.gha-hp-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
    z-index: 1;
}

.gha-hp-stat {
    text-align: center;
    padding: 10px 16px;
}

.gha-hp-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: var(--gha-primary);
}

.gha-hp-stat-number {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--gha-text);
    line-height: 1.1;
    margin-bottom: 6px;
}

.gha-hp-stat-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gha-text-secondary);
}


/* ==========================================================================
   3. SECTION SHARED STYLES
   ========================================================================== */

.gha-hp-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    gap: 16px;
}

.gha-hp-section-title {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gha-text);
    margin-bottom: 6px;
}

.gha-hp-section-subtitle {
    font-size: 15px;
    color: var(--gha-text-secondary);
    margin: 0;
    max-width: 560px;
}

.gha-hp-section-footer {
    text-align: center;
    margin-top: 32px;
}


/* ==========================================================================
   4. COURSE CARDS
   ========================================================================== */

.gha-hp-courses {
    background: transparent;
    padding: 0 0 24px;
    overflow: visible;
}

/* Homepage only: align courses horizontal frame with hero edges */
.gha-hp-courses .gha-courses-archive .gha-archive-wrap {
    max-width: none;
    padding-left: calc(var(--gha-hp-home-edge) + 10px);
    padding-right: calc(var(--gha-hp-home-edge) + 10px);
}

/* Homepage courses carousel (cards are styled by gha-courses-archive.css) */
.gha-hp-courses .gha-hp-courses-carousel-wrap {
    --gha-hp-fade-width: 90px;
    position: relative;
    overflow: hidden;
}

.gha-hp-courses .gha-hp-courses-carousel-wrap.has-overflow {
    mask-image: linear-gradient(
        to right,
        transparent 0,
        transparent 40px,
        black var(--gha-hp-fade-width),
        black calc(100% - var(--gha-hp-fade-width)),
        transparent calc(100% - 40px),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0,
        transparent 40px,
        black var(--gha-hp-fade-width),
        black calc(100% - var(--gha-hp-fade-width)),
        transparent calc(100% - 40px),
        transparent 100%
    );
}

.gha-hp-courses .gha-hp-courses-carousel-wrap.is-static {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: none;
    -webkit-mask-image: none;
}

.gha-hp-courses .gha-hp-courses-carousel-wrap.is-static::-webkit-scrollbar {
    display: none;
}

.gha-hp-courses .gha-hp-courses-carousel {
    --gha-hp-card-width: 270px;
    display: flex;
    gap: 24px;
    padding-bottom: 4px;
    align-items: stretch;
    width: max-content;
    will-change: transform;
}

.gha-hp-courses .gha-hp-courses-carousel .gha-course-card {
    flex: 0 0 var(--gha-hp-card-width);
    min-width: var(--gha-hp-card-width);
    display: flex;
    flex-direction: column;
}

.gha-hp-courses .gha-hp-courses-carousel .gha-course-card-footer {
    margin-top: auto;
}

/*
 * Homepage only: align event card footers (visio/peer-review) with e-learning
 * footer height while redistributing extra space above CTA.
 */
.gha-hp-courses .gha-hp-courses-carousel {
    --gha-hp-footer-target-height: auto;
}

.gha-hp-courses .gha-hp-courses-carousel .gha-course-card--event .gha-course-card-footer {
    min-height: var(--gha-hp-footer-target-height, 70px);
    display: flex;
    flex-direction: column;
}

.gha-hp-courses .gha-hp-courses-carousel .gha-course-card--event .gha-footer-date--event {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gha-hp-courses .gha-hp-courses-carousel.is-marquee {
    animation: ghaHpCarouselScroll var(--gha-hp-carousel-duration, 56s) linear infinite;
}

.gha-hp-courses .gha-hp-courses-carousel:not(.is-marquee) .gha-hp-card-clone {
    display: none;
}

.gha-hp-courses .gha-hp-courses-carousel-wrap.is-static .gha-hp-courses-carousel {
    animation: none !important;
    transform: none !important;
}

@keyframes ghaHpCarouselScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.gha-hp-courses .gha-hp-courses-carousel-wrap:hover .gha-hp-courses-carousel.is-marquee {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .gha-hp-courses .gha-hp-courses-carousel.is-marquee {
        animation: none;
        transform: none;
    }
}

/* Empty state */
.gha-hp-empty-state {
    text-align: center;
    padding: 48px 20px;
    background: var(--gha-white);
    border-radius: var(--gha-radius);
    color: var(--gha-text-secondary);
    font-size: 15px;
    box-shadow: var(--gha-shadow);
}


/* ==========================================================================
   6. FORMAT CARDS — IMMERSIVE
   ========================================================================== */

.gha-hp-formats {
    background: var(--gha-bg);
    padding: 24px 0 80px;
}

/* Titre "Les formats" — visible mobile uniquement */
.gha-hp-formats-mobile-title {
    display: none;
}

.gha-hp-formats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.gha-hp-format-card {
    background: var(--gha-white);
    border-radius: var(--gha-radius);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid var(--gha-border);
    position: relative;
    overflow: hidden;
}

/* Subtle top gradient accent per format */
.gha-hp-format-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transition: height 0.25s ease;
}

.gha-hp-format-elearning::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.gha-hp-format-visio::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.gha-hp-format-peerreview::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.gha-hp-format-card:hover::before {
    height: 4px;
}

.gha-hp-format-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    border-color: transparent;
}

.gha-hp-format-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.gha-hp-format-elearning .gha-hp-format-icon {
    background: #eff6ff;
    color: #3b82f6;
}

.gha-hp-format-visio .gha-hp-format-icon {
    background: #fef2f2;
    color: #ef4444;
}

.gha-hp-format-peerreview .gha-hp-format-icon {
    background: #f5f3ff;
    color: #7c3aed;
}

.gha-hp-format-card:hover .gha-hp-format-icon {
    transform: scale(1.08) rotate(-3deg);
}

.gha-hp-format-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gha-text);
    margin-bottom: 4px;
}

.gha-hp-format-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.gha-hp-format-elearning .gha-hp-format-label { color: #3b82f6; }
.gha-hp-format-visio .gha-hp-format-label { color: #ef4444; }
.gha-hp-format-peerreview .gha-hp-format-label { color: #7c3aed; }

.gha-hp-format-desc {
    font-size: 14px;
    color: var(--gha-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.gha-hp-format-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--gha-border);
}

.gha-hp-format-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gha-primary-light);
    color: var(--gha-primary-dark);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.gha-hp-format-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--gha-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.gha-hp-format-link:hover {
    gap: 8px;
    text-decoration: none;
}


/* ==========================================================================
   7. SCROLL REVEAL & STAGGER
   ========================================================================== */

.gha-hp-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gha-hp-reveal.gha-hp-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.gha-hp-stagger {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--gha-stagger, 0) * 0.12s);
}

.gha-hp-visible .gha-hp-stagger {
    opacity: 1;
    transform: translateY(0);
}

/* No-JS fallback */
.no-js .gha-hp-reveal,
.no-js .gha-hp-stagger {
    opacity: 1;
    transform: none;
}


/* ==========================================================================
   9. RESPONSIVE — Tablet (max-width: 991px)
   ========================================================================== */

@media (max-width: 991px) {

    .gha-hp {
        --gha-hp-home-edge: 16px;
    }

    .gha-hp-hero-wrapper {
        padding: 16px 16px 0;
    }

    .gha-hp-hero { padding: 48px 0 40px; }

    .gha-hp-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .gha-hp-hero-content { text-align: center; }
    .gha-hp-hero-subtitle { margin-left: auto; margin-right: auto; }
    .gha-hp-hero-cta { justify-content: center; }
    .gha-hp-hero-proof { justify-content: center; }
    .gha-hp-hero-title { font-size: 40px; }

    .gha-hp-hero-visual { display: none; }

    .gha-hp-section-title { font-size: 24px; }

    .gha-hp-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .gha-hp-stats-grid .gha-hp-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }

    .gha-hp-formats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gha-hp-courses,
    .gha-hp-formats,
    .gha-hp-stats {
        padding: 60px 0;
    }

    .gha-hp-courses .gha-hp-courses-carousel {
        --gha-hp-card-width: 280px;
    }
}


/* ==========================================================================
   10. RESPONSIVE — Mobile (max-width: 600px)
   ========================================================================== */

@media (max-width: 600px) {

    .gha-hp {
        --gha-hp-home-edge: 12px;
    }

    .gha-hp-hero-wrapper {
        padding: 12px 12px 0;
    }

    .gha-hp-hero-wrapper .gha-hp-hero {
        border-radius: 16px;
    }

    .gha-hp-hero { padding: 40px 0 32px; }
    .gha-hp-hero-title { font-size: 28px; }
    .gha-hp-hero-subtitle { font-size: 15px; }

    .gha-hp-hero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .gha-hp-hero-cta .gha-hp-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .gha-hp-hero-proof {
        flex-direction: column;
        gap: 6px;
    }

    .gha-hp-hero-proof-dot { display: none; }

    .gha-hp-hide-mobile { display: none !important; }
    .gha-hp-show-mobile { display: block; }

    .gha-hp-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .gha-hp-stats-grid .gha-hp-stat:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .gha-hp-stat {
        padding: 6px 2px;
    }

    .gha-hp-stat-icon {
        margin-bottom: 4px;
    }

    .gha-hp-stat-icon svg {
        width: 16px;
        height: 16px;
    }

    .gha-hp-stat-number {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .gha-hp-stat-label {
        font-size: 10px;
        line-height: 1.2;
    }

    /* --- Formats : rangées compactes colorées --- */

    .gha-hp-formats-mobile-title {
        display: none;
    }

    .gha-hp-formats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 0;
    }

    .gha-hp-format-card {
        flex-direction: row;
        align-items: center;
        padding: 14px 16px;
        gap: 14px;
        border: none;
        border-radius: var(--gha-radius);
        box-shadow: none;
    }

    .gha-hp-format-card::before {
        display: none;
    }

    /* Fond teinté par format */
    .gha-hp-format-elearning { background: #eff6ff; }
    .gha-hp-format-visio { background: #fef2f2; }
    .gha-hp-format-peerreview { background: #f5f3ff; }

    .gha-hp-format-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 12px;
        margin-bottom: 0;
    }

    .gha-hp-format-icon svg {
        width: 22px;
        height: 22px;
    }

    .gha-hp-format-title {
        font-size: 15px;
        margin-bottom: 1px;
    }

    .gha-hp-format-label {
        font-size: 12px;
        margin-bottom: 0;
    }

    .gha-hp-format-desc,
    .gha-hp-format-footer {
        display: none;
    }

    .gha-hp-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gha-hp-stats {
        padding: 12px 0 8px;
        margin-top: 8px;
    }

    /* Mobile: place "Heures de formation suivies" in the center slot. */
    .gha-hp-stats-grid .gha-hp-stat:nth-child(2) {
        order: 3;
    }

    .gha-hp-stats-grid .gha-hp-stat:nth-child(3) {
        order: 2;
    }

    .gha-hp-courses {
        padding: 0 0 16px;
    }

    .gha-hp-formats {
        padding: 16px 0 48px;
    }

    .gha-hp-section-title { font-size: 22px; }

    /* Animations : tout visible immédiatement sur mobile */
    .gha-hp-reveal,
    .gha-hp-stagger {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .gha-hp-section-footer .gha-hp-btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Homepage courses: 2 cartes par ligne sur mobile --- */
    .gha-hp-courses .gha-hp-courses-carousel-wrap {
        overflow: visible;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .gha-hp-courses .gha-hp-courses-carousel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        overflow: visible;
        padding-bottom: 0;
        width: auto;
        will-change: auto;
        animation: none !important;
        transform: none !important;
    }

    .gha-hp-courses .gha-hp-courses-carousel .gha-course-card {
        flex: none;
        width: 100%;
        min-width: 0;
    }

    /* Homepage mobile only: hide event duration pill to avoid line-wrap imbalance. */
    .gha-hp-courses .gha-hp-courses-carousel .gha-course-card--event .gha-footer-duration-pill {
        display: none;
    }

    .gha-hp-courses .gha-hp-courses-carousel .gha-hp-card-clone {
        display: none;
    }
}
