/* ═══════════════════════════════════════════════════════════════
   SHISH KEBAK — style.css
   Styles partagés par toutes les pages du site
   Copyleft 2026 — Aucun droit réservé

   TABLE DES MATIÈRES :
   1.  Reset & Variables CSS
   2.  Base & Texture
   3.  Ticker (breaking news bar)
   4.  Navigation (retour aux recettes)
   5.  Footer
   6.  Toast (notification)
   7.  Animations & Keyframes
   8.  Utilitaires
   9.  Mobile partagé
   ═══════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────────
   1. RESET & VARIABLES CSS
   ───────────────────────────────────────────────────────────── */

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

:root {
    /* Palette principale */
    --black:        #0a0a0a;
    --red:          #ff0040;
    --green:        #007A3D;
    --green-light:  #009B4D;
    --yellow:       #ffed4e;
    --cream:        #fff8dc;

    /* Typographie */
    --font-display: 'Bebas Neue', sans-serif;
    --font-body:    'Space Mono', monospace;
    --font-accent:  'Permanent Marker', cursive;

    /* Espacements */
    --container-max: 1400px;
    --container-pad: 20px;
}


/* ─────────────────────────────────────────────────────────────
   2. BASE & TEXTURE
   ───────────────────────────────────────────────────────────── */

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--black);
    overflow-x: hidden;
}

/* Grille de fond subtile */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent, transparent 2px,
            rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent, transparent 2px,
            rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Désactiver la texture sur mobile (perf) */
@media (max-width: 768px) {
    body::before { display: none; }
}

/* Respecter les préférences d'animation */
@media (prefers-reduced-motion: reduce) {
    body::before { display: none; }

    .ticker-track,
    .recipe-header::before {
        animation: none !important;
    }

    .recipe-card-wrapper,
    .price-badge,
    .hero-info h1 {
        animation: none !important;
    }
}


/* ─────────────────────────────────────────────────────────────
   3. TICKER (barre défilante rouge en haut)
   ───────────────────────────────────────────────────────────── */

.ticker-wrap {
    background: var(--red);
    border-bottom: 3px solid var(--black);
    overflow: hidden;
    white-space: nowrap;
    padding: 6px 0;
    position: relative;
    z-index: 10;
}

.ticker-track {
    display: inline-block;
    animation: ticker 36s linear infinite;
}

.ticker-track span {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--yellow);
    padding: 0 2rem;
}

.ticker-track span.sep {
    color: rgba(255, 237, 78, 0.5);
    padding: 0 0.5rem;
}


/* ─────────────────────────────────────────────────────────────
   4. NAVIGATION (barre noire de retour — pages recettes)
   ───────────────────────────────────────────────────────────── */

.site-nav {
    background: var(--black);
    border-bottom: 4px solid var(--red);
    padding: 15px 20px;
    position: relative;
    z-index: 2;
}

.site-nav a {
    color: var(--yellow);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 16px;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: inline-block;
}

.site-nav a:hover {
    border-color: var(--yellow);
    background: rgba(255, 237, 78, 0.1);
}

.site-nav a:focus {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}


/* ─────────────────────────────────────────────────────────────
   5. FOOTER
   ───────────────────────────────────────────────────────────── */

footer {
    margin-top: 80px;
    background: var(--black);
    color: var(--cream);
    border-top: 4px solid var(--red);
}

/* ── Stats bar (index uniquement, mais le style est partagé) */
.stats-bar {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 12px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 0 28px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child { border-right: none; }

.stat-number {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #4CAF82;
    transition: all 0.3s;
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 237, 78, 0.4);
}

.stat-context {
    font-family: var(--font-body);
    font-size: 0.5rem;
    color: rgba(255, 237, 78, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    padding: 4px 0 8px;
}

/* ── Footer principal */
.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 36px 40px 28px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 40px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--yellow);
    letter-spacing: 0.05em;
    line-height: 1;
}

.footer-center {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.principles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.principle {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border: 1.5px solid rgba(0, 122, 61, 0.55);
    color: #4CAF82;
}

.footer-copy {
    font-family: var(--font-body);
    font-size: 0.68rem;
    color: rgba(255, 237, 78, 0.35);
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.15s;
}

.footer-links a:hover { color: #4CAF82; }

/* Footer simplifié (pages recettes) */
.footer-simple {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-back a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.15s;
}

.footer-back a:hover { color: #4CAF82; }

/* Bas de footer */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 40px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.18);
    letter-spacing: 0.08em;
}

/* Veggie Ring widget */
.veggie-ring-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.veggie-ring-divider {
    width: 80px;
    height: 1px;
    background: rgba(255, 237, 78, 0.12);
}

.veggie-ring-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 237, 78, 0.22);
    font-weight: 700;
}

.veggie-ring-frame {
    border: 2px solid rgba(0, 122, 61, 0.4);
    padding: 5px;
    background: rgba(0, 0, 0, 0.3);
    line-height: 0;
    display: inline-block;
}


/* ─────────────────────────────────────────────────────────────
   6. TOAST (notification favoris)
   ───────────────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--black);
    color: var(--yellow);
    padding: 14px 22px;
    border: 3px solid var(--green);
    box-shadow: 5px 5px 0 var(--red);
    font-weight: 700;
    font-size: 0.88rem;
    z-index: 1000;
    pointer-events: none;
    animation: slideInUp 0.3s ease-out, fadeOut 0.3s ease-out 2.7s forwards;
}


/* ─────────────────────────────────────────────────────────────
   7. ANIMATIONS & KEYFRAMES
   ───────────────────────────────────────────────────────────── */

@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.7) rotate(-4deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes cardPopIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.25); }
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 5px 5px 0 var(--black); }
    50%       { box-shadow: 5px 5px 0 var(--black), 0 0 0 4px rgba(0, 122, 61, 0.35); }
}

@keyframes slide {
    to { transform: translate(-50%, -50%); }
}

@keyframes slideInUp {
    from { transform: translateY(80px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}


/* ─────────────────────────────────────────────────────────────
   8. UTILITAIRES
   ───────────────────────────────────────────────────────────── */

/* Container générique */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 40px var(--container-pad) 60px;
    position: relative;
    z-index: 2;
}

/* Visually hidden (accessibilité) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ─────────────────────────────────────────────────────────────
   9. MOBILE PARTAGÉ
   ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
        padding: 28px 20px;
    }

    .footer-links { align-items: center; }

    .stats-bar {
        padding: 12px 20px;
    }

    .stat-item {
        border-right: none;
        padding: 4px 16px;
    }

    .footer-simple {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
