:root {
    --background: #11100e;
    --background-soft: #181512;
    --red: #a32025;
    --red-bright: #bd292d;
    --red-dark: #681519;
    --cream: #e1c8a8;
    --cream-light: #f0ddc1;
    --muted: #a99a88;
    --border: rgba(163, 32, 37, 0.65);
    --max-width: 760px;
}

/* Base */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #1c1915 0, var(--background) 45%);
    color: var(--cream);
    font-family: "Oswald", Arial, sans-serif;
}

button {
    font: inherit;
}

.hidden {
    display: none !important;
}

/* Écran de sélection de langue */

.language-screen {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 12px;
    background: radial-gradient(circle at 50% 25%, rgba(120, 35, 30, 0.12), transparent 35%), var(--background);
}

.decorative-border {
    width: 100%;
    max-width: 620px;
    min-height: calc(100vh - 24px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 22px;
    border: 2px solid var(--red-dark);
}

.decorative-border::before,
.decorative-border::after {
    content: "◆";
    position: absolute;
    color: var(--red);
    font-size: 13px;
}

.decorative-border::before {
    top: 8px;
    left: 10px;
}

.decorative-border::after {
    right: 10px;
    bottom: 8px;
}

.welcome {
    width: 100%;
    text-align: center;
}

.bar-label {
    margin: 0;
    color: var(--red);
    font-family: "Rye", serif;
    font-size: clamp(1.2rem, 5vw, 1.7rem);
    letter-spacing: 0.08em;
}

.logo-title {
    margin: 3px 0 4px;
    color: var(--cream-light);
    font-family: "Rye", serif;
    font-size: clamp(3rem, 13vw, 5.7rem);
    font-weight: normal;
    line-height: 0.95;
    text-shadow: 1px 1px 0 #4e3b2e;
}

.tagline {
    margin: 14px 0;
    color: var(--red-bright);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.fire-symbol {
    margin: 30px auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--red);
}

.fire-symbol::before,
.fire-symbol::after {
    content: "";
    width: min(80px, 18vw);
    height: 1px;
    background: var(--red-dark);
}

.welcome h2 {
    margin: 0 0 10px;
    color: var(--cream-light);
    font-family: "Rye", serif;
    font-size: clamp(1.25rem, 5vw, 1.8rem);
    font-weight: normal;
    line-height: 1.6;
}

.language-subtitle {
    margin: 0 0 25px;
    color: var(--muted);
    font-size: 0.95rem;
}

.language-buttons {
    width: 100%;
    max-width: 370px;
    margin: auto;
    display: grid;
    gap: 11px;
}

.language-button {
    width: 100%;
    padding: 15px 20px;
    appearance: none;
    border: 1px solid var(--red);
    background: linear-gradient(90deg, rgba(104, 21, 25, 0.18), rgba(163, 32, 37, 0.07));
    color: var(--cream-light);
    cursor: pointer;
    font-family: "Oswald", sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    transition: background 0.15s ease, transform 0.15s ease;
}

.language-button:active {
    transform: scale(0.98);
    background: var(--red-dark);
}

/* En-tête de la carte */

.menu-screen {
    min-height: 100vh;
}

.menu-header {
    padding: 25px 18px 15px;
    text-align: center;
}

.header-inner {
    max-width: var(--max-width);
    margin: auto;
}

.menu-logo {
    margin: 2px 0;
    color: var(--cream-light);
    font-family: "Rye", serif;
    font-size: clamp(2.7rem, 12vw, 5rem);
    font-weight: normal;
    line-height: 1;
}

.menu-banner {
    max-width: 480px;
    margin: 22px auto 0;
    padding: 9px 30px;
    position: relative;
    background: var(--red-dark);
    color: #0d0c0b;
    font-family: "Rye", serif;
    font-size: clamp(1.4rem, 6vw, 2rem);
    letter-spacing: 0.05em;
}

/* Navigation des langues */

/* Navigation sticky : langues + catégories */

.sticky-navigation {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(17, 16, 14, 0.97);
    border-top: 1px solid var(--red-dark);
    border-bottom: 1px solid var(--red-dark);
    backdrop-filter: blur(8px);
}

.language-nav {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 8px 9px 6px;
}

.language-nav button {
    padding: 6px 13px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.language-nav button.active {
    background: var(--red-dark);
    color: var(--cream-light);
}

/* Catégories */

.category-nav {
    display: flex;
    gap: 7px;
    padding: 6px 12px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-button {
    flex: 0 0 auto;
    padding: 7px 13px;
    border: 1px solid rgba(163, 32, 37, 0.65);
    border-radius: 2px;
    background: rgba(104, 21, 25, 0.12);
    color: var(--cream);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.category-button:active {
    background: var(--red-dark);
}

/* Allergènes sous les plats */

.item-allergens {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
}

.item-allergens img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

/* Légende allergènes */

.allergen-legend {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 20px auto 50px;
    padding: 22px 0;
    border-top: 1px solid var(--red-dark);
    border-bottom: 1px solid var(--red-dark);
}

.allergen-legend h2 {
    margin: 0 0 18px;
    color: var(--red-bright);
    font-family: "Rye", serif;
    font-size: 1.35rem;
    font-weight: normal;
}

.allergen-legend-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cream);
    font-size: 0.9rem;
}

.legend-item img {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    object-fit: contain;
}

@media (min-width: 600px) {
    .allergen-legend-content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Contenu de la carte */

.menu-content {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 28px auto 60px;
}

.menu-category {
    margin-bottom: 38px;
}

.category-title {
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--red-bright);
    font-family: "Rye", serif;
    font-size: clamp(1.4rem, 6vw, 1.9rem);
    font-weight: normal;
    text-transform: uppercase;
}

.category-title::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(to right, var(--red-dark), transparent);
}

.menu-item {
    padding: 11px 0 13px;
    border-bottom: 1px dotted rgba(225, 200, 168, 0.22);
}

.item-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.item-name {
    color: var(--cream-light);
    font-size: 1.08rem;
    font-weight: 500;
    line-height: 1.25;
}

.item-dots {
    min-width: 12px;
    flex: 1;
    border-bottom: 2px dotted rgba(225, 200, 168, 0.35);
}

.item-price {
    flex-shrink: 0;
    color: var(--cream-light);
    font-size: 1.05rem;
    white-space: nowrap;
}

.item-description {
    max-width: 90%;
    margin: 5px 0 0;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.82rem;
    line-height: 1.45;
}

/* Chargement et erreur */

.status-message {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--muted);
    text-align: center;
}

.loader {
    width: 34px;
    height: 34px;
    border: 2px solid var(--red-dark);
    border-top-color: var(--cream);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.retry-button {
    margin-top: 15px;
    padding: 10px 20px;
    border: 1px solid var(--red);
    background: transparent;
    color: var(--cream);
    cursor: pointer;
}

/* Pied de page */

.footer {
    max-width: var(--max-width);
    margin: auto;
    padding: 35px 20px 50px;
    border-top: 1px solid var(--red-dark);
    text-align: center;
}

.footer-fire {
    margin-bottom: 10px;
    color: var(--red);
}

.footer-logo {
    margin: 0;
    color: var(--cream-light);
    font-family: "Rye", serif;
    font-size: 1.5rem;
}

#footer-message {
    color: var(--red);
    font-weight: 600;
    letter-spacing: 0.12em;
}

/* Écrans plus larges */

@media (min-width: 750px) {
    .menu-content {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 45px;
        align-items: start;
    }

    .menu-category {
        break-inside: avoid;
    }
}

button:focus-visible {
    outline: 2px solid var(--cream-light);
    outline-offset: 3px;
}
