/* ============================================================================
   gfaim-redesign.css — Polish layer for the homepage (Warm Luxury)
   Loads after gfaim-woo.css. Scoped overrides + a11y + section refonte.
   ============================================================================ */

/* ── Navbar : announce-bar retirée → top 0 + safe-area iPhone ─────────────── */
.gfaim-announce-bar { display: none !important; }
html { background: #1a1a1a; } /* iOS overscroll top → noir, pas gris */
body { padding-top: 0 !important; background-color: #FBF9F6; }
.navbar { top: env(safe-area-inset-top, 0) !important; padding-top: 1.5rem; }
.navbar.scrolled { padding-top: 1rem; }
@media (max-width: 768px) {
    .navbar { top: env(safe-area-inset-top, 0) !important; }
}

/* ── A11y: focus-visible ring (keyboard nav) ──────────────────────────────── */
:focus-visible {
    outline: 2px solid #ef3f4f;
    outline-offset: 3px;
    border-radius: 4px;
}
.btn:focus-visible,
.cart-btn:focus-visible,
.brand-logo:focus-visible {
    outline-offset: 4px;
}

/* ── Active/pressed feedback on interactive elements ───────────────────────── */
.btn:active,
.cart-btn:active,
.gfaim-cta-btn:active,
.gfaim-promo-cta:active,
.search-bar button:active {
    transform: scale(0.97);
    transition-duration: 80ms;
}

/* ── Typography polish ─────────────────────────────────────────────────────── */
.hero-title,
.section-title,
.gfaim-promo-card h2,
.gfaim-feature-hero h2,
.gfaim-testi-headline {
    text-wrap: balance;
}
.hero-desc,
.section-subtitle,
.gfaim-feature p,
.gfaim-testi-quote {
    text-wrap: pretty;
}

/* Tabular figures on prices so digits align across cards */
.price,
.gfaim-prod-price,
.gfaim-sr-price,
.amount {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* ── Warm-tinted shadows (replace generic black at low opacity) ───────────── */
.restaurant-card:hover {
    box-shadow: 0 18px 38px rgba(239, 63, 79, 0.10),
                0 4px 12px rgba(26, 26, 26, 0.06) !important;
}
.gfaim-prod-card:hover {
    box-shadow: 0 18px 38px rgba(239, 63, 79, 0.10),
                0 4px 12px rgba(26, 26, 26, 0.06) !important;
}
.gfaim-feature:hover,
.gfaim-feature-card:hover {
    box-shadow: 0 16px 32px rgba(239, 63, 79, 0.08),
                0 3px 10px rgba(26, 26, 26, 0.05) !important;
}
.gfaim-testi:hover,
.gfaim-testi-card:hover {
    box-shadow: 0 14px 28px rgba(239, 63, 79, 0.08),
                0 3px 8px rgba(26, 26, 26, 0.05) !important;
}

/* ============================================================================
   P2 — REFONTE: Bento "Pourquoi G Faim"
   1 large storytelling card + 3 supporting cards in asymmetric grid.
   ============================================================================ */

.gfaim-bento {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.25rem;
    margin: 0 auto;
    max-width: 1180px;
}

.gfaim-bento-hero {
    grid-column: 1;
    grid-row: 1 / span 3;
    background: linear-gradient(155deg, #1a1a1a 0%, #2a2018 100%);
    color: #fff;
    border-radius: 22px;
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(26, 26, 26, 0.18);
}
.gfaim-bento-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 80%;
    height: 140%;
    background: radial-gradient(circle at center, rgba(239, 63, 79, 0.22) 0%, transparent 60%);
    pointer-events: none;
}
.gfaim-bento-hero > * { position: relative; z-index: 1; }

.gfaim-bento-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #f58290;
    margin-bottom: 0.4rem;
}
.gfaim-bento-hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
    color: #fff;
}
.gfaim-bento-hero p {
    font-size: 1.02rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    max-width: 42ch;
    text-wrap: pretty;
}
.gfaim-bento-stats {
    display: flex;
    gap: 1.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.gfaim-bento-stat strong {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.85rem;
    color: #fff;
    line-height: 1;
}
.gfaim-bento-stat span {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.74);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.35rem;
}

.gfaim-bento-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem 1.5rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    border: 1px solid rgba(26, 26, 26, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gfaim-bento-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(239, 63, 79, 0.10),
                0 3px 10px rgba(26, 26, 26, 0.05);
}
.gfaim-bento-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 63, 79, 0.10);
    color: #ef3f4f;
    border-radius: 12px;
    flex-shrink: 0;
}
.gfaim-bento-icon svg { width: 22px; height: 22px; }
.gfaim-bento-card h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.01em;
}
.gfaim-bento-card p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #5a5a5a;
    margin: 0;
}

@media (max-width: 880px) {
    .gfaim-bento {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .gfaim-bento-hero {
        grid-column: 1;
        grid-row: auto;
        padding: 2rem 1.5rem;
    }
    .gfaim-bento-hero p { max-width: none; }
    .gfaim-bento-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        align-items: end;
    }
    .gfaim-bento-stat { min-width: 0; }
    .gfaim-bento-stat strong { font-size: 1.5rem; }
    .gfaim-bento-stat span {
        font-size: 0.66rem;
        letter-spacing: 0.06em;
        line-height: 1.25;
        margin-top: 0.4rem;
    }
}
@media (max-width: 380px) {
    .gfaim-bento-stats { gap: 0.5rem; }
    .gfaim-bento-stat strong { font-size: 1.35rem; }
    .gfaim-bento-stat span { font-size: 0.62rem; }
}

/* ============================================================================
   P2 — REFONTE: Témoignage hero (1 grand au lieu du 3-card-grid)
   ============================================================================ */

.gfaim-testi-hero {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    border-radius: 22px;
    padding: 3rem 3rem 2.5rem;
    position: relative;
    box-shadow: 0 16px 38px rgba(239, 63, 79, 0.06),
                0 4px 12px rgba(26, 26, 26, 0.05);
    border: 1px solid rgba(26, 26, 26, 0.05);
}
.gfaim-testi-mark {
    position: absolute;
    top: 1.25rem;
    left: 2rem;
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    line-height: 1;
    color: rgba(239, 63, 79, 0.16);
    pointer-events: none;
    user-select: none;
}
.gfaim-testi-quote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    line-height: 1.45;
    color: #1a1a1a;
    margin: 0 0 2rem;
    font-style: italic;
    position: relative;
    z-index: 1;
}
.gfaim-testi-byline {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.gfaim-testi-portrait {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #ef3f4f 0%, #d42a3a 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
}
.gfaim-testi-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 180px;
}
.gfaim-testi-name {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.98rem;
}
.gfaim-testi-where {
    color: #7a7a7a;
    font-size: 0.85rem;
}
.gfaim-testi-stars {
    display: inline-flex;
    gap: 2px;
    color: #f59e0b;
}
.gfaim-testi-stars svg { width: 16px; height: 16px; }
.gfaim-testi-source {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #5a5a5a;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    background: #faf6f0;
    transition: background 0.2s, color 0.2s;
}
.gfaim-testi-source:hover {
    background: rgba(239, 63, 79, 0.10);
    color: #ef3f4f;
}
.gfaim-testi-source svg { width: 14px; height: 14px; }

@media (max-width: 720px) {
    .gfaim-testi-hero { padding: 2.25rem 1.5rem 1.75rem; }
    .gfaim-testi-mark { font-size: 4.5rem; top: 0.75rem; left: 1.25rem; }
    .gfaim-testi-source { margin-left: 0; width: 100%; justify-content: center; }
}

/* ============================================================================
   APPLE-LIKE MOTION SYSTEM
   Curves : --ease-spring (expo-out façon Apple HIG)
   Tokens : durations 600/750/900ms ; translateY 28-36px ; scale 0.96 → 1
   Reveal : opacity + translateY + scale (parfumé "depth-aware")
   ============================================================================ */

:root {
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-soft:   cubic-bezier(0.32, 0.72, 0, 1);
    --reveal-distance: 32px;
    --reveal-duration: 1050ms;
}

/* Override des révélations existantes — courbe Apple, scale subtle, plus longues */
@keyframes gfaim-reveal {
    from { opacity: 0; transform: translateY(var(--reveal-distance)) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes gfaim-reveal-card {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-on-scroll.is-visible {
    animation-duration: var(--reveal-duration) !important;
    animation-timing-function: var(--ease-spring) !important;
}
.section-header.animate-on-scroll.is-visible {
    animation-duration: 850ms !important;
}
.restaurant-card.animate-on-scroll.is-visible,
.partner-card.animate-on-scroll.is-visible,
.gfaim-prod-card.animate-on-scroll.is-visible,
.gfaim-bento-card.animate-on-scroll.is-visible {
    animation-duration: 1100ms !important;
}

/* Stagger : chaque enfant de grille se révèle 100ms après le précédent (max 8) */
.gfaim-bento .gfaim-bento-card:nth-child(2) { animation-delay: 100ms; }
.gfaim-bento .gfaim-bento-card:nth-child(3) { animation-delay: 200ms; }
.gfaim-bento .gfaim-bento-card:nth-child(4) { animation-delay: 300ms; }

.restaurants-grid > .restaurant-card:nth-child(1),
.gfaim-products-grid > .gfaim-prod-card:nth-child(1) { animation-delay: 0ms; }
.restaurants-grid > .restaurant-card:nth-child(2),
.gfaim-products-grid > .gfaim-prod-card:nth-child(2) { animation-delay: 100ms; }
.restaurants-grid > .restaurant-card:nth-child(3),
.gfaim-products-grid > .gfaim-prod-card:nth-child(3) { animation-delay: 200ms; }
.restaurants-grid > .restaurant-card:nth-child(4),
.gfaim-products-grid > .gfaim-prod-card:nth-child(4) { animation-delay: 300ms; }
.restaurants-grid > .restaurant-card:nth-child(5),
.gfaim-products-grid > .gfaim-prod-card:nth-child(5) { animation-delay: 400ms; }
.restaurants-grid > .restaurant-card:nth-child(6),
.gfaim-products-grid > .gfaim-prod-card:nth-child(6) { animation-delay: 500ms; }
.restaurants-grid > .restaurant-card:nth-child(7),
.gfaim-products-grid > .gfaim-prod-card:nth-child(7) { animation-delay: 600ms; }
.restaurants-grid > .restaurant-card:nth-child(8),
.gfaim-products-grid > .gfaim-prod-card:nth-child(8) { animation-delay: 700ms; }

/* Hero parallax : layer JS-driven, transform 3D pour 60fps */
.hero {
    will-change: transform;
}
.hero-content {
    transform: translate3d(0, var(--gfaim-hero-shift, 0), 0);
    transition: transform 80ms linear;
}

/* Reveal-up : courbe upgradée + ajout micro-scale */
.reveal-up {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    transition:
        opacity   1050ms var(--ease-spring),
        transform 1050ms var(--ease-spring);
    will-change: opacity, transform;
}
.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Section title : underline qui se dessine de gauche à droite quand visible */
.section-header .section-title { position: relative; display: inline-block; }
.section-header .section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    height: 3px;
    width: 56px;
    background: #ef3f4f;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 900ms var(--ease-spring) 250ms;
}
.section-header.animate-on-scroll.is-visible .section-title::after,
.section-header.is-visible .section-title::after {
    transform: scaleX(1);
}

/* Card press feedback : scale spring back (Apple style) */
.restaurant-card,
.gfaim-prod-card,
.gfaim-cat-item,
.gfaim-bento-card,
.gfaim-feature-card {
    transition: transform 320ms var(--ease-spring),
                box-shadow 320ms var(--ease-spring);
}
.restaurant-card:active,
.gfaim-prod-card:active,
.gfaim-cat-item:active,
.gfaim-bento-card:active,
.gfaim-feature-card:active {
    transform: scale(0.985) !important;
    transition-duration: 90ms;
}

/* Hover lift uniforme (desktop only — pas de hover mobile) */
@media (hover: hover) and (pointer: fine) {
    .restaurant-card:hover,
    .gfaim-prod-card:hover {
        transform: translateY(-4px) scale(1.005);
    }
    .gfaim-bento-card:hover {
        transform: translateY(-3px);
    }
}

/* Respect prefers-reduced-motion : coupure totale du transform/scale */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll, .reveal-up, .hero-content {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    .section-header .section-title::after { transform: scaleX(1) !important; transition: none !important; }
}

/* ── Promo deco: SVG line-art instead of rotated emoji ─────────────────────── */
.gfaim-promo-deco {
    transform: none !important;
    font-size: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gfaim-promo-deco svg {
    width: clamp(140px, 18vw, 220px);
    height: auto;
    color: #fff;
    opacity: 0.65;
}

/* ============================================================================
   P2 — Break grid monotony: promo overlap + scroll-snap on plats
   ============================================================================ */

/* Promo card overlaps the testimonial section below for visual layering */
.gfaim-promo-section {
    position: relative;
    z-index: 2;
    padding-bottom: 0;
}
.gfaim-promo-section + .gfaim-testimonials-section {
    margin-top: -3rem;
    padding-top: 6rem;
    position: relative;
    z-index: 1;
}
.gfaim-promo-section .gfaim-promo-card {
    box-shadow: 0 24px 50px rgba(239, 63, 79, 0.22),
                0 6px 18px rgba(26, 26, 26, 0.10);
}

/* Optional horizontal scroll-snap for popular plats on narrow screens */
@media (max-width: 880px) {
    .gfaim-products-grid {
        display: flex !important;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 1rem;
        padding: 0.5rem 1rem 1.5rem;
        margin: 0 -1rem;
        scrollbar-width: none;
    }
    .gfaim-products-grid::-webkit-scrollbar { display: none; }
    .gfaim-products-grid > .gfaim-prod-card {
        flex: 0 0 78%;
        scroll-snap-align: start;
    }
}
