/**
 * Cooppère — Page d'accueil & Cinétique d'ouverture
 * Palette : Vert forêt (#1b4332), Or (#d4af37), Parchemin (#f7f5ee) & Accents Argentés (#cfd8e0 / #9aa8b5)
 */
:root {
    --hm-green-dark: #1b4332;
    --hm-green: #2d6a4f;
    --hm-green-soft: #e9f3ec;
    --hm-gold: #c8a236;
    --hm-silver-light: #eef2f6;
    --hm-silver: #cbd4dc;
    --hm-silver-deep: #8b99a6;
    --hm-amber-bg: #fef5e7;
    --hm-amber-txt: #8a5300;
    --hm-bg: #f7f5ee;
    --hm-surface: rgba(255, 255, 255, 0.94);
    --hm-border: #dce1e5;
    --hm-text: #1f2933;
    --hm-muted: #52606d;
    --hm-radius: 14px;
}

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

body.home-page {
    margin: 0;
    padding-top: 64px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--hm-bg);
    color: var(--hm-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CINÉTIQUE D'OUVERTURE — Mouvement lent, continu et apaisant (Plénitude)
   Aucun bond, aucune cassure de vitesse : une seule glissade fluide qui
   vient se déposer exactement à l'emplacement du filigrane de fond.
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes cinematicGlide {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.44);
        filter: drop-shadow(0 0 0 rgba(215, 224, 232, 0));
    }
    22% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 32px rgba(215, 224, 232, 0.28)) drop-shadow(0 0 14px rgba(212, 175, 55, 0.18));
    }
}

@keyframes cinemaHaloBreath {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.65);
    }
    45% {
        opacity: 0.95;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.25);
    }
}

@keyframes cinemaCurtainDissolve {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes siteCalmReveal {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.cinema-intro {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle at 50% 50%,
        #163326 0%,
        #0c1e16 58%,
        #06100b 100%
    );
    z-index: 2000;
    cursor: pointer;
    /* Reste calme pendant 2,7 s puis se dissout très lentement sur 1,8 s (total 4,5 s) */
    animation: cinemaCurtainDissolve 1.8s cubic-bezier(0.4, 0, 0.2, 1) 2.7s both;
}

.cinema-halo {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(76vw, 640px);
    height: min(76vw, 640px);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(218, 226, 234, 0.18) 0%,
        rgba(212, 175, 55, 0.10) 42%,
        rgba(27, 67, 50, 0) 72%
    );
    border: 1px solid rgba(208, 217, 226, 0.18);
    box-shadow: 0 0 70px rgba(208, 217, 226, 0.10), inset 0 0 40px rgba(212, 175, 55, 0.06);
    pointer-events: none;
    animation: cinemaHaloBreath 4.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.cinema-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: min(84vw, 860px);
    height: auto;
    /* Une seule courbe continue de décélération douce sur 3,9 s : zéro bond */
    animation: cinematicGlide 3.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Filigrane permanent posé exactement aux mêmes coordonnées et à la même taille que l'arrivée du logo */
.background-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.075;
    z-index: 0;
    pointer-events: none;
    background-image: url('../../../logo-cooppere-text.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: min(84vw, 860px);
    height: 75vh;
}

.home-main {
    position: relative;
    z-index: 2;
    display: block;
    /* Révélation en pur fondu d'opacité apaisant (sans saut vertical translateY) */
    animation: siteCalmReveal 1.6s ease-out 2.7s both;
}

/* Mode sans cinématique (visites suivantes ou ?skip=1) */
.no-cinema .cinema-intro {
    display: none !important;
}
.no-cinema .background-logo {
    animation: none !important;
    opacity: 0.075 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}
.no-cinema .home-main {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STRUCTURE DE LA PAGE D'ACCUEIL (Accents Argentés, Or & Vert Forêt)
   ═══════════════════════════════════════════════════════════════════════════ */
.home-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* 1. HERO */
.home-hero {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 245, 238, 0.84) 100%);
    border-bottom: 1px solid var(--hm-silver);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 3rem 1.25rem 2.85rem;
    text-align: center;
}

.home-hero__inner {
    max-width: 740px;
    margin: 0 auto;
}

.home-hero__logo {
    max-width: 260px;
    height: auto;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 6px 18px rgba(27, 67, 50, 0.12));
}

/* Filet décoratif Argent & Or sous le logo */
.home-hero__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin: 0 auto 1.15rem;
    max-width: 240px;
}

.home-hero__divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hm-silver-deep), var(--hm-gold), var(--hm-silver-deep), transparent);
}

.home-hero__divider-gem {
    font-size: 0.75rem;
    color: var(--hm-silver-deep);
}

.home-hero__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.85rem, 3.8vw, 2.65rem);
    font-weight: 700;
    color: var(--hm-green-dark);
    line-height: 1.22;
    margin: 0 0 1rem;
}

.home-hero__lead {
    font-size: 1.08rem;
    color: var(--hm-muted);
    max-width: 640px;
    margin: 0 auto 1.85rem;
    line-height: 1.65;
}

.home-hero__greeting {
    font-size: 1.05rem;
    color: var(--hm-green-dark);
    margin: 0 0 1rem;
}

.home-hero__actions {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1.55rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.home-btn--primary {
    background-color: var(--hm-green-dark);
    color: #ffffff;
    border: 1.5px solid var(--hm-green-dark);
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.18), inset 0 1px 0 rgba(215, 224, 232, 0.25);
}

.home-btn--primary:hover {
    background-color: var(--hm-green);
    border-color: var(--hm-green);
}

.home-btn--secondary {
    background: linear-gradient(180deg, #ffffff 0%, var(--hm-silver-light) 100%);
    color: var(--hm-green-dark);
    border: 1.5px solid var(--hm-silver);
    box-shadow: 0 2px 6px rgba(31, 41, 51, 0.05);
}

.home-btn--secondary:hover {
    background: #ffffff;
    border-color: var(--hm-green-dark);
}

.home-hero__helper {
    font-size: 0.94rem;
    color: var(--hm-muted);
    margin: 0;
}

.home-hero__helper a {
    color: var(--hm-green-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-dot {
    margin: 0 0.45rem;
    color: var(--hm-silver-deep);
}

/* TITRES DE SECTIONS */
.home-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.45rem, 2.6vw, 1.9rem);
    color: var(--hm-green-dark);
    text-align: center;
    margin: 0 0 0.4rem;
}

.home-section-title--left {
    text-align: left;
}

.home-section-sub {
    text-align: center;
    color: var(--hm-muted);
    font-size: 0.98rem;
    margin: 0 auto 2rem;
    max-width: 600px;
}

.home-section-sub--left {
    text-align: left;
    margin: 0;
}

/* 2. COMMENT ÇA MARCHE (3 ÉTAPES — Médaillons Argentés & Vert Forêt) */
.home-steps {
    padding: 3rem 0;
}

.home-steps__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.home-step {
    background: var(--hm-surface);
    border: 1px solid var(--hm-silver);
    border-top: 3px solid var(--hm-silver-deep);
    border-radius: var(--hm-radius);
    padding: 1.5rem 1.4rem;
    box-shadow: 0 6px 18px rgba(31, 41, 51, 0.04);
    backdrop-filter: blur(4px);
}

.home-step__num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f7fa 0%, #dce3ea 100%);
    border: 1.5px solid var(--hm-silver-deep);
    color: var(--hm-green-dark);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    box-shadow: inset 0 1px 0 #ffffff, 0 2px 5px rgba(31, 41, 51, 0.08);
}

.home-step__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hm-green-dark);
    margin: 0 0 0.45rem;
}

.home-step__text {
    font-size: 0.94rem;
    color: var(--hm-muted);
    margin: 0;
}

.home-step__text code {
    background: var(--hm-silver-light);
    border: 1px solid var(--hm-silver);
    color: var(--hm-green-dark);
    padding: 0.1rem 0.38rem;
    border-radius: 4px;
    font-size: 0.88em;
}

/* 3. EN DIRECT DU CARNET */
.home-live {
    padding: 2.75rem 0;
    background: rgba(255, 255, 255, 0.88);
    border-top: 1px solid var(--hm-silver);
    border-bottom: 1px solid var(--hm-silver);
    backdrop-filter: blur(4px);
}

.home-live__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.home-link-more {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--hm-green-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.home-link-more:hover {
    text-decoration: underline;
}

.home-live__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
}

.home-listing-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--hm-silver);
    border-radius: 12px;
    padding: 1.2rem 1.3rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-listing-card:hover {
    border-color: var(--hm-green);
    box-shadow: 0 6px 16px rgba(27, 67, 50, 0.08);
}

.home-listing-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.home-badge {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.home-badge--offre {
    background: var(--hm-green-soft);
    color: var(--hm-green-dark);
}

.home-badge--demande {
    background: var(--hm-amber-bg);
    color: var(--hm-amber-txt);
}

.home-listing-card__mode {
    font-size: 0.78rem;
    color: #475569;
    background: var(--hm-silver-light);
    border: 1px solid var(--hm-silver);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.home-listing-card__title {
    font-size: 1.04rem;
    font-weight: 700;
    color: var(--hm-green-dark);
    margin: 0 0 0.4rem;
}

.home-listing-card__desc {
    font-size: 0.9rem;
    color: var(--hm-muted);
    margin: 0 0 0.9rem;
    flex: 1;
}

.home-listing-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
    color: var(--hm-muted);
    padding-top: 0.65rem;
    border-top: 1px solid var(--hm-silver-light);
}

.home-listing-card__cta {
    font-weight: 600;
    color: var(--hm-green-dark);
}

/* 4. TROIS PORTES D'ENTRÉE */
.home-pillars {
    padding: 3rem 0;
}

.home-pillars__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.home-pillar {
    background: var(--hm-surface);
    border: 1px solid var(--hm-silver);
    border-radius: var(--hm-radius);
    padding: 1.6rem 1.45rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(31, 41, 51, 0.04);
    backdrop-filter: blur(4px);
}

.home-pillar__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--hm-silver-light) 0%, #dfe6ed 100%);
    border: 1px solid var(--hm-silver);
    color: var(--hm-green-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 0.9rem;
    box-shadow: inset 0 1px 0 #ffffff;
}

.home-pillar__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hm-green-dark);
    margin: 0 0 0.5rem;
}

.home-pillar__desc {
    font-size: 0.93rem;
    color: var(--hm-muted);
    margin: 0 0 1.15rem;
    flex: 1;
}

.home-pillar__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.home-pillar__link {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--hm-green-dark);
    text-decoration: none;
}

.home-pillar__link:hover {
    text-decoration: underline;
}

.home-pillar__link--muted {
    color: var(--hm-muted);
    font-weight: 500;
}

/* 5. REPÈRES DU RÉSEAU (Bandeau Vert Forêt, Chiffres Or & Encadrement Argenté) */
.home-stats {
    padding: 2rem 0 2.75rem;
}

.home-stats__grid {
    background: linear-gradient(135deg, #163829 0%, #23533d 100%);
    color: #ffffff;
    border: 1.5px solid rgba(203, 212, 220, 0.45);
    box-shadow: 0 10px 28px rgba(22, 56, 41, 0.16), inset 0 1px 0 rgba(238, 242, 246, 0.25);
    border-radius: var(--hm-radius);
    padding: 1.6rem 1.25rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.home-stat {
    position: relative;
}

.home-stat + .home-stat {
    border-left: 1px solid rgba(203, 212, 220, 0.25);
}

.home-stat__num {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.95rem;
    font-weight: 700;
    color: #f3e3b2;
    line-height: 1.15;
}

.home-stat__lbl {
    font-size: 0.86rem;
    color: #dde5ec;
    font-weight: 500;
}

/* RESPONSIVE MOBILE */
@media (max-width: 860px) {
    .home-steps__grid,
    .home-pillars__grid {
        grid-template-columns: 1fr;
    }
    .home-live__grid {
        grid-template-columns: 1fr;
    }
    .home-stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    .home-stat + .home-stat {
        border-left: none;
    }
}

@media (max-width: 520px) {
    .home-hero {
        padding: 2.25rem 1rem 2rem;
    }
    .home-btn {
        width: 100%;
    }
    .background-logo {
        width: 96vw;
        opacity: 0.055;
    }
}
