/* =====================================================
   GREEN SUSHI V2 - STYLES COMMUNS
   Fichier CSS externe partagé par toutes les pages
   ===================================================== */

/* =====================================================
   1. VARIABLES CSS
   ===================================================== */
:root {
    /* Couleurs principales */
    --vert-principal: #A8C83E;
    --vert-fonce: #8CB82B;
    --vert-clair: #C5E063;

    /* Tailles de titres standardisées */
    --font-size-h1: clamp(2rem, 5vw, 3.5rem);
    --font-size-h2: clamp(1.5rem, 4vw, 2.5rem);
    --font-size-h3: clamp(1.2rem, 3vw, 1.8rem);
    --font-size-h4: clamp(1rem, 2.5vw, 1.4rem);

    /* Couleurs base */
    --blanc: #FFFFFF;
    --noir: #2b3825;
    --gris-texte: #556168;
    --gris-clair: #f8f9f5;

    /* Background pattern */
    --bg-pattern: url('assets/bg_wave_pattern.svg');

    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);

    /* Border radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;

    /* Espacements standardisés */
    --spacing-section: 60px;
    --spacing-section-mobile: 40px;
    --spacing-block: 30px;
    --spacing-element: 15px;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* =====================================================
   2. RESET & BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fredoka', sans-serif;
    color: var(--noir);
    background: var(--blanc);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.font-display {
    font-family: 'Amatic SC', cursive;
    font-weight: 700;
}

/* =====================================================
   3. TOP BAR
   ===================================================== */
.topbar {
    background: var(--vert-principal);
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: var(--blanc);
    gap: 15px;
}

.topbar-horaires {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.topbar-horaires i {
    font-size: 14px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse-led 2s infinite;
}

.status-led.open {
    background: #2ECC71;
    box-shadow: 0 0 8px #2ECC71;
}

.status-led.closed {
    background: #E74C3C;
    box-shadow: 0 0 8px #E74C3C;
}

@keyframes pulse-led {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* --- 3.1 BANNIÈRE FERMETURE TEMPORAIRE --- */
.topbar-fermeture {
    display: none; /* Masquée par défaut, affichée via JS */
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 50%, #c0392b 100%);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease-in-out infinite;
    padding: 12px 0;
    overflow: hidden;
    position: relative;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.fermeture-marquee {
    display: flex;
    width: max-content;
    animation: marquee 20s linear infinite;
}

.fermeture-marquee-content {
    display: flex;
    white-space: nowrap;
    padding-right: 60px;
}

.fermeture-text {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.fermeture-text i.fa-snowflake {
    font-size: 16px;
    animation: snowflake-spin 4s linear infinite;
    margin-right: 8px;
}

@keyframes snowflake-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fermeture-separator {
    opacity: 0.6;
    margin: 0 10px;
}

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

/* Mobile - bannière plus compacte */
@media (max-width: 768px) {
    .topbar-fermeture {
        padding: 10px 0;
    }

    .fermeture-text {
        font-size: 13px;
        gap: 10px;
    }

    .fermeture-marquee {
        animation-duration: 15s;
    }
}

/* =====================================================
   4. NAVIGATION
   ===================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--blanc);
    box-shadow: var(--shadow-sm);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Pour le centrage absolu du menu */
}

.navbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Logo desktop - caché sur mobile */
.navbar-logo-img {
    height: 70px;
    width: auto;
    max-width: 100%;
}

/* Mascotte animée - visible uniquement sur mobile/tablette */
.navbar-mascot-container {
    display: none;
    width: 100%;
    height: 70px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #f8f9f5 0%, #fff 50%, #f8f9f5 100%);
    border-radius: 8px;
    cursor: pointer;
}

.navbar-mascot {
    height: 60px;
    width: auto;
    position: absolute;
    top: 50%;
    left: 0; /* Position fixe, mouvement via transform */
    animation: mascot-walk 8s ease-in-out infinite;
    will-change: transform; /* Hint GPU */
}

/* Animation GPU-accelerated (transform uniquement, pas de left) */
/* Pleine largeur: de 10px à (largeur viewport - 130px) */
@keyframes mascot-walk {
    0% {
        transform: translateX(10px) translateY(-50%) scaleX(1) rotate(-5deg);
    }
    25% {
        transform: translateX(calc(50vw - 80px)) translateY(-50%) scaleX(1) rotate(5deg);
    }
    49% {
        transform: translateX(calc(100vw - 130px)) translateY(-50%) scaleX(1) rotate(-5deg);
    }
    50% {
        transform: translateX(calc(100vw - 130px)) translateY(-50%) scaleX(-1) rotate(-5deg);
    }
    75% {
        transform: translateX(calc(50vw - 80px)) translateY(-50%) scaleX(-1) rotate(5deg);
    }
    99% {
        transform: translateX(10px) translateY(-50%) scaleX(-1) rotate(-5deg);
    }
    100% {
        transform: translateX(10px) translateY(-50%) scaleX(1) rotate(-5deg);
    }
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 35px;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-menu a {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--noir);
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 5px;
    background: var(--vert-principal);
    border-radius: 3px;
    transition: var(--transition);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 100%;
}

.navbar-menu a.active {
    color: var(--vert-fonce);
    font-weight: 600;
}

.navbar-cta {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a4e !important;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    margin-left: auto; /* Pousse le bouton à droite */
    flex-shrink: 0;
}

.navbar-cta:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* BURGER MENU - SUPPRIMÉ (remplacé par bottom tab bar)
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background: var(--noir);
    border-radius: 2px;
    transition: var(--transition);
}
*/

/* Easter Egg */
.navbar-mascot-container .easter-egg-message {
    display: none;
    position: absolute;
    inset: 0;
    background: transparent;
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: #1a1a4e;
    font-size: 0.8rem;
    text-align: center;
    padding-left: 70px;
    animation: fadeIn 0.3s ease;
}

.navbar-mascot-container .easter-egg-message.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.navbar-mascot.dancing {
    animation: mascot-dance 0.5s ease-in-out infinite !important;
}

/* Animation danse GPU-accelerated */
@keyframes mascot-dance {
    0%, 100% { transform: translateX(5px) translateY(-50%) rotate(-15deg) scale(1.1); }
    50% { transform: translateX(5px) translateY(-50%) rotate(15deg) scale(1.1); }
}

/* =====================================================
   5. FOOTER
   ===================================================== */
.footer {
    background: #97C12F;  /* Vert charte */
    color: var(--blanc);
    padding: 60px 20px 30px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/bg_wave_pattern.svg');
    background-size: 250px auto;
    background-repeat: repeat;
    opacity: 0.03;
    pointer-events: none;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    text-align: center;
}

.footer-logo {
    height: 160px;
    width: auto;
    /* filter retiré car logo a fond blanc */
}

.footer-brand-text {
    color: rgba(255,255,255,0.95);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-row {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-nav a {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--vert-principal);
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-contact a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--vert-principal);
}

.footer-contact i {
    font-size: 1.1rem;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-socials a {
    width: 45px;
    height: 45px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanc);
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--vert-principal);
    border-color: var(--vert-principal);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    display: flex;
    flex-direction: column;  /* Empilement vertical */
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
}

.footer-legal a:hover {
    color: var(--vert-principal);
}

.footer-europe {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;  /* Espace entre les 2 logos */
    flex-wrap: wrap;
    margin-top: 20px;
}

.footer-europe img {
    height: 70px;  /* Taille augmentée */
    width: auto;
}

/* =====================================================
   6. BOUTON WHATSAPP FLOTTANT
   ===================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanc);
    font-size: 32px;
    box-shadow: 0 4px 25px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 35px rgba(37, 211, 102, 0.6);
}

/* RÉSERVATION FLOAT supprimée - règles retirées */

/* =====================================================
   7. BOTTOM TAB BAR (MOBILE)
   ===================================================== */
.bottom-tab-bar {
    display: none; /* Caché par défaut, visible sur mobile */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--blanc);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom)); /* iOS safe area */
}

.bottom-tab-bar-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.bottom-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    text-decoration: none;
    color: var(--gris-texte);
    transition: var(--transition);
    min-width: 60px;
    border-radius: 8px;
}

.bottom-tab-item i {
    font-size: 24px;
}

.bottom-tab-item span {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.bottom-tab-item.active {
    color: var(--vert-principal);
}

.bottom-tab-item:active {
    background: rgba(168, 200, 62, 0.1);
}

/* =====================================================
   8. SKIP LINK - ACCESSIBILITÉ (WCAG 2.2)
   ===================================================== */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--vert-principal);
    color: var(--blanc);
    padding: 12px 24px;
    z-index: 10000;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0 0 var(--radius-sm) 0;
    transition: top 0.3s ease;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--noir);
    outline-offset: 2px;
}

/* =====================================================
   9. RESPONSIVE - MOBILE & TABLET
   ===================================================== */

/* Tablette et en-dessous */
@media (max-width: 843px) {
    .topbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 15px;
    }

    .navbar {
        padding: 10px 15px;
    }

    /* MASCOTTE MOBILE - affichée sur tablette/mobile */
    .navbar-logo {
        width: 100%;
        justify-content: center;
    }

    .navbar-logo-img {
        display: none !important;
    }

    .navbar-mascot-container {
        display: block !important;
        width: calc(100% - 30px); /* Pleine largeur avec marges */
        max-width: 100%;
        height: 70px;
        margin: 0 auto;
        background: #ffffff;
    }

    /* CACHER LE MENU BURGER ET LE TOGGLE */
    .navbar-menu {
        display: none !important; /* Toujours caché sur mobile */
    }

    .navbar-cta {
        display: none; /* Remplacé par le FAB */
    }

    .navbar-toggle {
        display: none; /* Plus besoin du burger */
    }

    /* AFFICHER LA BOTTOM TAB BAR */
    .bottom-tab-bar {
        display: block;
    }

    /* AJUSTER WHATSAPP FLOAT AU-DESSUS DE LA BOTTOM BAR */
    .whatsapp-float {
        bottom: 85px; /* Au-dessus de la bottom bar */
    }

    /* Bouton de réservation retiré */

    /* Ajouter du padding en bas du body pour compenser la bottom bar */
    body {
        padding-bottom: 70px;
    }

    .footer-contact {
        flex-direction: column;
        gap: 12px;
    }

    .footer-nav-row {
        gap: 20px;
    }
}

/* Mobile petit */
@media (max-width: 500px) {
    .footer-nav-row {
        flex-direction: column;
        gap: 10px;
    }
}

/* =====================================================
   10. FOCUS STATES - ACCESSIBILITÉ (WCAG 2.1 AA)
   Ajouté par ui-ux-corrections.sh
   ===================================================== */

/* Focus visible pour éléments interactifs */
.bottom-tab-item:focus-visible,
.slider-arrow:focus-visible,
.navbar-menu a:focus-visible,
.navbar-cta:focus-visible,
.footer-nav a:focus-visible,
.footer-socials a:focus-visible,
.whatsapp-float:focus-visible {
    outline: 3px solid var(--vert-principal);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Focus pour boutons et liens génériques */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--vert-principal);
    outline-offset: 2px;
}

/* Supprimer outline par défaut quand focus-visible non supporté */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* =====================================================
   11. REDUCED MOTION - ACCESSIBILITÉ
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =====================================================
   12. STYLES D'IMPRESSION
   ===================================================== */

@media print {
    /* Masquer les éléments non imprimables */
    .navbar,
    .topbar,
    .bottom-tab-bar,
    .whatsapp-float,
    .skip-link {
        display: none !important;
    }

    /* Reset du body */
    body {
        padding: 0 !important;
        background: white !important;
        color: black !important;
    }

    /* Afficher les URLs des liens */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    /* Éviter les coupures de page dans les éléments */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}
