/* Barre de navigation, boutons, fenêtre de contact, police et transitions entre pages.
   Partagé par TOUTES les pages (accueil, pages générées, documentation).
   Utilise les variables --primary-color, etc. définies par la page. */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('/assets/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Police de secours calibrée sur les dimensions d'Inter : quand Inter arrive, le texte ne bouge plus
   (sans cela, la barre et les titres « sautent » à chaque changement de page). */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial'), local('Helvetica Neue'), local('Liberation Sans');
    size-adjust: 107.4%;
    ascent-override: 90.2%;
    descent-override: 22.5%;
    line-gap-override: 0%;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body > nav {
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Le logo ClicGoResto (assiette et couverts), sans son texte : illisible a 36 px. */
.logo-icon {
    width: 36px;
    height: 36px;
    display: block;
    flex-shrink: 0;
}

/* Menu de langue : le meme « FR | EN | NL | DE » que le formulaire de reservation des
   tenants (selecteurLangue.css de reserv_project). Toujours visible, y compris sur mobile. */
.langues {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    order: 3;
}

/* Grand ecran : logo a gauche, puis les liens, puis les langues tout a droite. */
.nav-links { order: 2; margin-left: auto; }
.nav-toggle { order: 4; }

.langues a {
    min-width: 36px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    color: #3a4f7a;
    background: transparent;
    border: 1px solid #d5deec;
    border-radius: 6px;
}

.langues a:hover {
    border-color: var(--primary-color);
}

.langues a[aria-current] {
    color: #ffffff;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.langues a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Proposition de la langue du navigateur (site.js), au-dessus de la barre. */
.suggestion-langue {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    padding: 0.6rem 1rem;
    background: #eef3fb;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.suggestion-langue a {
    font-weight: 600;
    color: var(--primary-color);
}

.suggestion-langue button {
    background: none;
    border: none;
    color: var(--text-light);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    padding: 0.25rem;
}

.nav-links {
    display: flex;
    gap: 1.1rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    white-space: nowrap;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-links .nav-cta {
    padding: 0.6rem 1.1rem;
    font-size: 0.9375rem;
    border-radius: 8px;
    width: auto;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    content: '';
    position: relative;
    transition: transform 0.2s, background 0.2s;
}

.nav-toggle span::before { position: absolute; top: -6px; }

.nav-toggle span::after { position: absolute; top: 6px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }

.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }

.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

.btn {
    padding: 0.95rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    background: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-dark);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 700;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-modal:hover {
    background: var(--bg-light);
    color: var(--text-dark);
    transform: rotate(90deg);
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.contact-info-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-info-text {
    flex: 1;
}

.contact-info-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.contact-info-value {
    font-size: 1.125rem;
    color: var(--text-dark);
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-modal {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9375rem;
    text-align: center;
}

.btn-modal-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-modal-secondary:hover {
    background: var(--border-color);
}

.btn-modal-primary {
    background: var(--primary-color);
    color: white;
}

.btn-modal-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Animations */

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

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

/* Pas de transition entre pages (View Transitions) : mesuree a +300 ms sur des clics enchaines,
   meme a duree nulle. Le prechargement (speculationrules) rend le changement de page rapide.
   Pour la remettre : @view-transition { navigation: auto; } et view-transition-name: site-nav sur la barre. */

@media (max-width: 1320px) {
    /* 1320 px : la barre la plus longue (allemand, avec le menu de langue) mesure 1290 px. */
    .nav-toggle {
        display: inline-flex;
    }

    /* Petit ecran : les langues restent visibles, a cote du bouton de menu. */
    .langues {
        margin-left: auto;
    }

    .js .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.5rem 1.25rem;
        background: white;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }

    .js .nav-links.ouvert {
        display: flex;
    }

    .js .nav-links a {
        display: block;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .js .nav-links .nav-cta {
        margin-top: 0.75rem;
        width: 100%;
        text-align: center;
    }

    .no-js .nav-container {
        flex-wrap: wrap;
    }

    .no-js .nav-links {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    /* Logo, langues et bouton de menu doivent tenir sur une ligne de 360 px. */
    .nav-container {
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.15rem;
        gap: 0.4rem;
    }

    .langues {
        gap: 2px;
    }

    .langues a {
        min-width: 30px;
        padding: 4px 5px;
        font-size: 0.75rem;
        letter-spacing: 0;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn-modal {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn {
        transition: none;
    }
}

/* Tres petit ecran : le logo seul ; le nom reste lu par les lecteurs d'ecran. */
@media (max-width: 380px) {
    .logo-texte {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}
