/* ============================================================
   APROPOS-STORY.CSS — Page À Propos L'Espace N.G.
   • Slider rotatif automatique (3 cartes) — 100 % CSS
   • Section "Mon Histoire" (nouvelle)
   • Correctif taille des icônes "À chaque collaboration, j'agis"
   ============================================================ */


/* ============================================================
   ★ FIX — Icônes section "À chaque collaboration, j'agis"
   ============================================================
   Les SVG s'affichaient à pleine largeur de la carte car
   .ap-what-icon était dimensionné pour des emojis (font-size).
   On les contraint à une taille raisonnable + on les colorise
   en rose dans un cercle pâle (cohérent avec la palette).
   ============================================================ */

.ap-what-icon {
    /* On remplace la règle "font-size: 2.2rem" héritée */
    font-size: 0 !important;
    width: 56px;
    height: 56px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem !important;
    background: linear-gradient(135deg, #FDF0F7 0%, #fff8f0 100%);
    border-radius: 16px;
    color: var(--pink-primary);
    transition: var(--transition);
}

.ap-what-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* Au survol de la carte, le badge devient rose plein avec icône blanche */
.ap-what-card:hover .ap-what-icon {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.05);
}



/* ============================================================
   ★ SLIDER ROTATIF — Section "Bonjour et bienvenue..."
   ============================================================
   Les 3 cartes se relaient automatiquement à l'avant-plan
   en boucle infinie. Cycle de 9 secondes (3s par carte).
   - Animation 100% CSS, démarre dès le chargement
   - Pause au survol
   - Respecte prefers-reduced-motion
   ============================================================ */

.ap-visual-wrap {
    position: relative;
    height: 500px;
    perspective: 1400px;          /* léger effet de profondeur 3D */
    /* Annule l'éventuel hover global d'origine */
}

/* On annule le hover global du wrap (qui redressait toutes les cartes) */
.ap-visual-wrap:hover .ap-card {
    /* La règle hover d'origine est neutralisée ici par notre animation */
}

/* Une carte = un slide */
.ap-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 340px;
    margin-top: -170px;
    margin-left: -130px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px -15px rgba(236, 64, 122, 0.35);
    /* Animation : 9s par cycle, infini, easing fluide */
    animation: apSlide 9s cubic-bezier(0.65, 0.05, 0.36, 1) infinite;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform, opacity;
    /* Désactive l'ancienne transition pour ne pas interférer */
    transition: box-shadow 0.4s ease;
}

/* Image qui remplit la carte */
.ap-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 24px;
}

/* Voile coloré pour conserver l'identité rose/or/foncée */
.ap-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: multiply;
    transition: opacity 0.5s ease;
}
.ap-card-1::after { background: var(--gradient-primary); opacity: 0.30; }
.ap-card-2::after { background: var(--gradient-gold);    opacity: 0.28; }
.ap-card-3::after {
    background: linear-gradient(135deg, rgba(50, 30, 60, 0.55), rgba(120, 50, 100, 0.30));
    opacity: 0.35;
}

/* Décalages d'animation : chaque carte démarre à un tiers
   différent du cycle, créant le mouvement de rotation */
.ap-card-1 { animation-delay: 0s; }
.ap-card-2 { animation-delay: -6s; }   /* commence en position arrière-droite */
.ap-card-3 { animation-delay: -3s; }   /* commence en position arrière-gauche */

/* Keyframes : la carte traverse 3 positions en boucle
   AVANT (centre, grosse, droite, en évidence)
   → ARRIÈRE-DROITE (plus petite, décalée, en retrait)
   → ARRIÈRE-GAUCHE (plus petite, de l'autre côté, en retrait)
   → revient AVANT */
@keyframes apSlide {
    /* AVANT : pleine taille, centre, opacité maximum */
    0%, 30% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
        z-index: 10;
        opacity: 1;
        filter: blur(0);
    }
    /* Transition vers l'arrière-droite */
    33%, 63% {
        transform: translate3d(110px, 30px, -100px) rotate(8deg) scale(0.82);
        z-index: 5;
        opacity: 0.75;
        filter: blur(1px);
    }
    /* Transition vers l'arrière-gauche */
    66%, 96% {
        transform: translate3d(-110px, 30px, -100px) rotate(-8deg) scale(0.82);
        z-index: 5;
        opacity: 0.75;
        filter: blur(1px);
    }
    /* Boucle : retour à AVANT */
    100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
        z-index: 10;
        opacity: 1;
        filter: blur(0);
    }
}

/* Pause au survol — l'utilisateur peut s'attarder sur une carte */
.ap-visual-wrap:hover .ap-card {
    animation-play-state: paused;
}

/* Indicateurs visuels (3 petits points sous le slider) */
.ap-visual-wrap::after {
    content: "";
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background:
        linear-gradient(90deg,
            var(--pink-primary) 0%, var(--pink-primary) 30%,
            #fde8f3 30%, #fde8f3 35%,
            var(--pink-primary) 35%, var(--pink-primary) 65%,
            #fde8f3 65%, #fde8f3 70%,
            var(--pink-primary) 70%, var(--pink-primary) 100%);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: apSliderDots 9s linear infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes apSliderDots {
    0%, 100% { background-position: 0% 0%; }
    50%      { background-position: 100% 0%; }
}

/* Accessibilité : si l'utilisateur préfère moins d'animations,
   on fige le slider sur la première position */
@media (prefers-reduced-motion: reduce) {
    .ap-card {
        animation: none;
    }
    .ap-card-1 { transform: translate3d(0, 0, 0); z-index: 10; }
    .ap-card-2 { transform: translate3d(110px, 30px, -100px) rotate(8deg) scale(0.82); z-index: 5; opacity: 0.75; }
    .ap-card-3 { transform: translate3d(-110px, 30px, -100px) rotate(-8deg) scale(0.82); z-index: 5; opacity: 0.75; }
    .ap-visual-wrap::after { animation: none; }
}

/* Responsive */
@media (max-width: 1024px) {
    .ap-visual-wrap {
        height: 460px;
        max-width: 520px;
        margin: 0 auto;
    }
}
@media (max-width: 600px) {
    .ap-visual-wrap {
        height: 400px;
    }
    .ap-card {
        width: 210px;
        height: 280px;
        margin-top: -140px;
        margin-left: -105px;
    }
    @keyframes apSlide {
        0%, 30% {
            transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
            z-index: 10; opacity: 1; filter: blur(0);
        }
        33%, 63% {
            transform: translate3d(70px, 20px, -80px) rotate(6deg) scale(0.85);
            z-index: 5; opacity: 0.75; filter: blur(1px);
        }
        66%, 96% {
            transform: translate3d(-70px, 20px, -80px) rotate(-6deg) scale(0.85);
            z-index: 5; opacity: 0.75; filter: blur(1px);
        }
        100% {
            transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
            z-index: 10; opacity: 1; filter: blur(0);
        }
    }
}


/* ============================================================
   ★ NOUVELLE SECTION — "Mon Histoire"
   ============================================================ */

.ap-story {
    position: relative;
    padding: 6rem 0;
    background: var(--white);
    overflow: hidden;
}

/* Watermark décoratif (signature de fond) */
.ap-story-watermark {
    position: absolute;
    top: 2rem;
    right: -1rem;
    font-family: 'Playfair Display', serif;
    font-size: clamp(7rem, 16vw, 14rem);
    font-style: italic;
    font-weight: 900;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.06;
    letter-spacing: -0.02em;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

/* Tache rose floutée en arrière-plan */
.ap-story::before {
    content: "";
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(253, 240, 247, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.ap-story .container {
    position: relative;
    z-index: 1;
}

/* ── Grille principale ── */
.ap-story-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 5rem;
    align-items: start;
}

/* ── Côté Portrait ── */
.ap-story-portrait {
    position: relative;
}

.ap-story-portrait-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 2;
}

.ap-story-portrait-frame:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px -10px rgba(236, 64, 122, 0.25);
}

.ap-story-portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Cadre décoratif rose en haut-droite */
.ap-story-portrait::before {
    content: "";
    position: absolute;
    top: -1.5rem;
    right: -1.5rem;
    width: 65%;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    background: var(--gradient-primary);
    opacity: 0.15;
    z-index: 0;
}

/* Touche dorée en bas-gauche */
.ap-story-portrait::after {
    content: "";
    position: absolute;
    bottom: -1.5rem;
    left: -1.5rem;
    width: 45%;
    height: 6rem;
    background: var(--gradient-gold);
    border-radius: 24px;
    opacity: 0.4;
    z-index: 0;
}

/* Signature sous la photo */
.ap-story-signature {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    position: relative;
    z-index: 2;
}

.ap-story-signature-line {
    flex: 1;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.ap-story-signature-name {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.6rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.ap-story-signature-role {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--gray);
    margin-top: 0.3rem;
    font-weight: 500;
}

/* ── Côté Contenu ── */
.ap-story-content {
    padding-top: 0.5rem;
}

.ap-story-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--pink-dark);
    margin-bottom: 1.3rem;
}

.ap-story-eyebrow::before {
    content: "";
    width: 2.5rem;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.ap-story-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3.8vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1.8rem;
    color: var(--black);
    letter-spacing: -0.01em;
}

.ap-story-content h2 em {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Phrase d'accroche en gros texte */
.ap-story-lead {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    line-height: 1.55;
    font-weight: 500;
    color: var(--gray-dark);
    margin: 0 0 1.8rem;
    padding-left: 1.25rem;
    border-left: 3px solid var(--pink-primary);
    font-style: italic;
}

/* Corps de texte */
.ap-story-text p {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--gray);
    margin: 0 0 1.3rem;
}

.ap-story-text p strong {
    color: var(--black);
    font-weight: 700;
}

/* Pilules de rôles */
.ap-story-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 2rem 0;
}

.ap-story-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1.2rem;
    background: #FDF0F7;
    border: 1px solid #fde8f3;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--pink-dark);
    transition: var(--transition);
}

.ap-story-pill:hover {
    background: var(--white);
    border-color: var(--pink-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.ap-story-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gradient-primary);
    flex-shrink: 0;
}

/* Bloc valeurs (3 colonnes) */
.ap-story-values {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    padding-top: 2rem;
    border-top: 2px solid #FDF0F7;
}

.ap-story-value {
    text-align: left;
    position: relative;
}

.ap-story-value-number {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.9rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.6rem;
}

.ap-story-value-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.ap-story-value-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--gray);
    margin: 0;
}

/* ── Responsive section Story ── */
@media (max-width: 1024px) {
    .ap-story {
        padding: 5rem 0;
    }
    .ap-story-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    .ap-story-portrait {
        max-width: 420px;
        margin: 0 auto;
    }
    .ap-story-watermark {
        font-size: clamp(5rem, 22vw, 9rem);
        top: 1rem;
    }
}

@media (max-width: 768px) {
    .ap-story {
        padding: 4rem 0;
    }
    .ap-story-grid {
        gap: 2.5rem;
    }
    .ap-story-lead {
        font-size: 1.2rem;
        padding-left: 1rem;
    }
    .ap-story-text p {
        font-size: 0.95rem;
        line-height: 1.75;
    }
    .ap-story-values {
        grid-template-columns: 1fr;
        gap: 1.3rem;
    }
    .ap-story-portrait::before,
    .ap-story-portrait::after {
        display: none;
    }
    .ap-story-portrait-frame {
        border-radius: 18px;
    }
}