/* ===========================================================
   HOME — Layout · Hero slider · Cards
   =========================================================== */


/* -----------------------------------------------------------
   1. BODY (.main-page)
   On supprime le verrou 100svh et l'overflow:hidden
   mais on garde display:flex pour que footer margin-top:auto
   continue de fonctionner.
   ----------------------------------------------------------- */

.main-page {
    display: flex;
    flex-direction: column;
    /* Supprimé : min-height: 100svh  — la page scrolle librement */
    /* Supprimé : overflow: hidden     — était le verrou du scroll */
    background-color: rgb(var(--textColor));
}


/* -----------------------------------------------------------
   2. HERO — slider plein écran
   ----------------------------------------------------------- */

.hero {
    position: relative;
    /* Hauteur explicite : viewport - header (header home est en flux, pas fixed) */
    flex: 0 0 calc(100svh);
    overflow: hidden;
    /* confine le slider (était sur .main-page avant) */
}

.hero-slider {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: block;

    opacity: 0;
    transition: opacity var(--fade-ms, 1200ms) ease-in-out;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
}


/* -----------------------------------------------------------
   3. HERO FOOTER — H1 + excerpt + bouton scroll
   Overlay absolu collé en bas du slider, avec dégradé.
   ----------------------------------------------------------- */

.hero-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;

    padding: var(--s12) var(--s5) var(--s10);
    background: linear-gradient(to top,
            rgb(var(--textColor) / 0.85) 0%,
            rgb(var(--textColor) / 0.30) 60%,
            transparent 100%);

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    /* géré par les marges individuelles */
}

/* H1 — DM Serif Display italic : élégant, cohérent avec la marque */
.hero-title {
    font-family: var(--fontAccent);
    font-style: italic;
    font-size: clamp(1.7rem, 4.2vw, 3.4rem);
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: rgb(var(--backgroundLight));
    max-width: 760px;
    text-shadow: 0 2px 28px rgb(0 0 0 / 0.45);
    margin: 0;
}

/* Filet accent entre le H1 et l'excerpt */
.hero-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: rgb(var(--accentColor) / 0.70);
    margin: var(--s4) auto 0;
}

/* Excerpt — Inter regular, lisible sans dominer le H1 */
.hero-excerpt {
    font-family: var(--fontText);
    font-size: clamp(0.82rem, 1.6vw, 1rem);
    line-height: 1.65;
    letter-spacing: 0.02em;
    color: rgb(var(--backgroundLight));
    max-width: 500px;
    margin: var(--s3) 0 var(--s6);
    text-shadow: 0 1px 10px rgb(0 0 0 / 0.30);
}

/* Bouton scroll — réutilise .icon-btn (glass pill, border accentColor) */
.hero-scroll-btn {
    animation: hero-bounce 2.6s ease-in-out infinite;
}

.hero-scroll-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: block;
}

@keyframes hero-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(7px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-scroll-btn {
        animation: none;
    }
}


/* -----------------------------------------------------------
   4. HOME INTRO — panel the_content() en tête de home-sections
   Intégré dans le grainient, même style apple-ish que les cards.
   ----------------------------------------------------------- */

.home-intro {
    margin-top: var(--s6);
    margin-bottom: var(--s7);
}

.home-intro__panel {
    /* Tokens Apple-ish : même style que les hero cards (about, portfolio) */
    --glassRadius: 34px;
    --glassBlur: 18px;
    --glassAlpha: 0.035;
    --glassSat: 1.12;
    --glassCaustics:
        radial-gradient(60% 55% at 20% 25%, rgb(255 255 255 / 0.075) 0%, transparent 70%),
        radial-gradient(60% 55% at 80% 35%, rgb(255 255 255 / 0.050) 0%, transparent 72%);
    --glassBorder: rgb(255 255 255 / 0.14);
    --glassShadow:
        0 28px 80px rgb(0 0 0 / 0.14),
        inset 0 1px 0 rgb(255 255 255 / 0.16),
        inset 0 -1px 0 rgb(0 0 0 / 0.10),
        inset 0 0 0 1px rgb(255 255 255 / 0.06);

    padding: clamp(var(--s6), 5vw, var(--s9));
}

/* Typographie du contenu WordPress */
.home-intro__content {
    font-family: var(--fontText);
    font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
    line-height: 1.75;
    color: rgb(var(--backgroundLight));
    margin-inline: auto;
}

.home-intro__content p {
    margin-bottom: var(--s4);
}

.home-intro__content p:last-child {
    margin-bottom: 0;
}

.home-intro__content h2,
.home-intro__content h3 {
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--accentColor));
    margin-top: var(--s6);
    margin-bottom: var(--s3);
}

.home-intro__content h2 {
    font-size: 0.9rem;
}

.home-intro__content h2:first-child {
    margin-top: 0;
}

.home-intro__content h3 {
    font-size: 0.82rem;
}

.home-intro__content strong {
    font-family: var(--fontText);
    font-weight: 400;
    color: rgb(var(--backgroundLight));
}

.home-intro__content em {
    font-family: var(--fontAccent);
    font-style: italic;
    color: rgb(var(--backgroundLight));
}

.home-intro__content a {
    color: rgb(var(--accentColor));
    border-bottom: 1px solid rgb(var(--accentColor) / 0.35);
    padding-bottom: 1px;
    transition: border-color 0.2s ease;
}

.home-intro__content a:hover {
    border-color: rgb(var(--accentColor));
}


/* -----------------------------------------------------------
   5. HOME SECTIONS — conteneur des cards
   Utilise .grainient-section défini dans global.css
   ----------------------------------------------------------- */

.home-sections {
    padding-block: var(--s9) var(--s10);
}


/* -----------------------------------------------------------
   6. GRILLE DES CARDS
   ----------------------------------------------------------- */

.home-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s4);
}

@media (min-width: 640px) {
    .home-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .home-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* -----------------------------------------------------------
   7. CARD — utilise .glass-panel de global.css
   On surcharge uniquement les tokens nécessaires.
   ----------------------------------------------------------- */

.home-card {
    --glassRadius: 24px;
    --glassBlur: 16px;
    --glassAlpha: 0.055;
    --glassBorder: rgb(255 255 255 / 0.12);
    --glassShadow:
        0 20px 52px rgb(0 0 0 / 0.22),
        inset 0 1px 0 rgb(255 255 255 / 0.13),
        inset 0 -1px 0 rgb(0 0 0 / 0.16),
        inset 0 0 0 1px rgb(255 255 255 / 0.055);

    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Pas de transition sur le composant lui-même (convention du site) */
}

/* Image */
.home-card__media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--glassRadius) var(--glassRadius) 0 0;
}

.home-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.55s cubic-bezier(.16, 1, .3, 1);
}

.home-card:hover .home-card__img {
    transform: scale(1.06);
}

/* Corps */
.home-card__body {
    padding: var(--s5);
    display: flex;
    flex-direction: column;
    gap: var(--s3);
    flex: 1;
}

/* Label / titre de section — Montserrat 900, uppercase, accent color */
.home-card__label {
    font-family: var(--fontTitle);
    font-weight: 900;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(var(--accentColor));
    margin: 0;
}

/* Résumé — Inter regular */
.home-card__text {
    font-family: var(--fontText);
    font-size: 0.9375rem;
    line-height: 1.65;
    color: rgb(var(--backgroundLight));
    flex: 1;

    /* 3 lignes max pour l'alignement visuel entre cards */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lien CTA avec flèche */
.home-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    margin-top: var(--s2);
    padding-top: var(--s3);
    border-top: 1px solid rgb(255 255 255 / 0.10);

    font-family: var(--fontTitle);
    font-weight: 900;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgb(var(--backgroundLight));

    transition: gap 0.22s ease, color 0.22s ease;
}

.home-card__cta:hover {
    gap: var(--s3);
    color: rgb(var(--accentColor));
}

.home-card__arrow {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    flex-shrink: 0;
    display: block;
    transition: transform 0.22s ease;
}

.home-card__cta:hover .home-card__arrow {
    transform: translateX(3px);
}


/* -----------------------------------------------------------
   8. CTA CONTACT — glass-panel pleine largeur
   ----------------------------------------------------------- */

.home-contact-cta {
    --glassRadius: 24px;
    --glassBlur: 16px;
    --glassAlpha: 0.055;
    --glassBorder: rgb(255 255 255 / 0.12);
    --glassShadow:
        0 20px 52px rgb(0 0 0 / 0.22),
        inset 0 1px 0 rgb(255 255 255 / 0.13),
        inset 0 -1px 0 rgb(0 0 0 / 0.16),
        inset 0 0 0 1px rgb(255 255 255 / 0.055);

    margin: var(--s6) auto 0;
    padding: var(--s8) var(--s5);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s4);
    max-width: 800px;
}

/* Titre — DM Serif Display italic, comme les autres hero titles du site */
.home-contact-cta__title {
    font-family: var(--fontAccent);
    font-style: italic;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgb(var(--backgroundLight));
    margin: 0;
}

/* Sous-titre — Inter regular */
.home-contact-cta__subtitle {
    font-family: var(--fontText);
    font-size: 1rem;
    line-height: 1.6;
    color: rgb(var(--backgroundLight) / 0.60);
    max-width: 480px;
    margin: 0;
}

/* Bouton — .btn--on-dark est déjà défini dans global.css */
/* (backgroundLight fond / textColor texte, glass + shine au hover) */


/* -----------------------------------------------------------
   9. Scroll doux (ancre #home-sections)
   ----------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}