/* ============================================================
   FEUILLE DE STYLE � Menu du restaurant Le Saladin
   ------------------------------------------------------------
   Style �ditorial moderne, pens� mobile d'abord.

   POLICES (� charger dans le <head> du HTML) :
     - Sansita Swashed (700)    ? titres de cat�gories / sous-cat�gories
     - Yanone Kaffeesatz (600)  ? noms des plats / sandwichs
     - Inter (400/500/600/700)  ? texte courant et prix

   Lien Google Fonts � utiliser dans chaque menu-xx.html :
   <link href="https://fonts.googleapis.com/css2?family=Sansita+Swashed:wght@700&family=Yanone+Kaffeesatz:wght@600&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
   ============================================================ */

/* ------------------------------------------------------------
   1. VARIABLES
   ------------------------------------------------------------ */
:root {
    /* Couleurs */
    --couleur-fond:       #f4efe6;   /* cr�me chaud           */
    --couleur-texte:      #1a1a1a;   /* quasi-noir            */
    --couleur-texte-doux: #7a7565;   /* gris chaud            */
    --couleur-accent:     #d6451f;   /* terracotta vif        */
    --couleur-separateur: #d9d2c3;   /* beige pour les lignes */

    /* Fonds altern�s des lignes � rotation sur 3 lignes
       blanc ? gris 3 % ? gris 5 % */
    --row-blanc: #FFFFFF;
    --row-gris3: #F7F7F7;
    --row-gris5: #F2F2F2;

    /* Fonds des titres de sections */
    --cat-fond:     #C04100;   /* orange un peu fonc� */
    --cat-texte:    #FFFFFF;
    --subcat-fond:  #7B1F2B;   /* rouge bordeaux      */
    --subcat-texte: #FFFFFF;

    /* Ligne de s�paration entre les plats */
    --ligne-plat:   #b8b0a0;

    /* Polices */
    --police-titre: 'Sansita Swashed', serif;
    --police-plat:  'Sofia Sans Extra Condensed', sans-serif;
    --police-texte: 'Inter', sans-serif;

    /* Mesures */
    --rayon:       8px;
    --ombre-douce: 0 2px 8px rgba(0,0,0,0.04);
}

/* ------------------------------------------------------------
   2. R�INITIALISATION
   ------------------------------------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--police-texte);
    background-color: var(--couleur-fond);
    color: var(--couleur-texte);
    line-height: 1.5;
    min-height: 100vh;
    background-image: radial-gradient(circle at top, #ffffff 0%, transparent 60%);
    background-repeat: no-repeat;
}

/* ------------------------------------------------------------
   3. CONTENEUR PRINCIPAL
   ------------------------------------------------------------ */
.menu-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* ------------------------------------------------------------
   4. EN-T�TE � logo + s�lecteur de langue
   ------------------------------------------------------------ */
.menu-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 20px;
    border-bottom: 2px solid var(--couleur-separateur);
    margin-bottom: 28px;
}

.header-logo {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 16px;
}

/* S�lecteur FR / EN / DE */
.lang-switch {
    display: flex;
    gap: 6px;
    align-items: center;
    font-family: var(--police-texte);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lang-switch span,
.lang-switch a {
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--couleur-texte-doux);
    transition: background-color 0.2s, color 0.2s;
}

.lang-switch a:hover {
    color: var(--couleur-accent);
    background-color: rgba(214, 69, 31, 0.08);
}

/* La langue active */
.lang-switch .active {
    background-color: var(--couleur-accent);
    color: #ffffff;
}

/* ------------------------------------------------------------
   5. CAT�GORIES
   ------------------------------------------------------------ */
.categorie {
    margin-bottom: 36px;
    border: 2px solid #C5A059;
    border-radius: 12px;
    padding: 16px;
}

/* Titre de cat�gorie : Sansita Swashed Bold */
.cat-title {
    font-family: var(--police-titre);
    font-weight: 700;
    font-size: 1.14rem;
    line-height: 1.05;
    color: var(--couleur-texte);
    margin-bottom: 24px;
}

.cat-title .cat-detail {
    display: block;
    font-size: 0.8rem;
    color: var(--couleur-accent);
    margin-top: 6px;
}


/* Petit trait terracotta sous le titre */
.cat-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: var(--couleur-accent);
    border-radius: 2px;
    margin-top: 10px;
}

/* Sous-cat�gorie : m�me famille, plus petite */
.sub-cat-title {
    font-family: var(--police-titre);
    font-weight: 700;
    font-size: 1.14rem;
    line-height: 1.1;
    color: var(--couleur-accent);
    margin: 28px 0 14px;
}

/* ------------------------------------------------------------
   6. UN PLAT (une ligne du menu)
   ------------------------------------------------------------ */
.plat {
    padding: 18px 16px;
    border-radius: var(--rayon);
    margin-bottom: 4px;
}

/* Rotation � 3 fonds : blanc ? gris 3 % ? gris 5 %
   :nth-of-type compte chaque <div class="plat">.
   Le rythme repart � 1 apr�s 3. Les titres (h2/h3) ne
   sont pas compt�s car ce ne sont pas des <div>. */
.plat:nth-of-type(3n+1) { background: var(--row-blanc); }
.plat:nth-of-type(3n+2) { background: var(--row-gris3); }
.plat:nth-of-type(3n+3) { background: var(--row-gris5); }

/* Ligne de s�paration entre chaque plat et le suivant.
   Le s�lecteur � .plat + .plat � ne dessine la ligne
   qu'entre deux plats cons�cutifs : le premier plat
   d'une s�rie n'a pas de ligne au-dessus de lui. */
.plat + .plat {
    border-top: 2px solid var(--ligne-plat);
    margin-top: 6px;
    padding-top: 22px;
}

/* Ligne du haut : nom � gauche, prix � droite */
.plat-ligne {
    display: flex;
    align-items: center;
    gap: 14px;
}

.plat-texte {
    flex: 1;
    min-width: 0;
}

.plat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

/* Nom du plat : Yanone Kaffeesatz SemiBold, 2.2rem */
.plat-nom {
    font-family: var(--police-plat);
    font-weight: 300;
    font-size: 1.60rem;
    line-height: 1.1;
    letter-spacing: 0.005em;
    color: var(--couleur-texte);
    flex: 1;
}

/* Prix : Inter r�gulier, chiffres align�s */
.plat-prix {
    font-family: var(--police-texte);
    font-weight: 600;
    font-size: 1.0125rem;
    color: var(--couleur-accent);
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* Description sous le nom */
.plat-desc {
    font-family: var(--police-texte);
    font-size: 0.85rem;
    color: var(--couleur-texte-doux);
    margin-top: 6px;
    line-height: 1.4;
    max-width: 95%;
}

/* ------------------------------------------------------------
   7. ENCADR� DE REMARQUE
   ------------------------------------------------------------ */
.remark-box {
    margin: 20px 0;
    padding: 14px 18px;
    background-color: var(--row-gris3);
    border-left: 3px solid var(--couleur-accent);
    border-radius: 6px;
    color: var(--couleur-texte-doux);
    font-size: 0.9rem;
    text-align: center;
}

.remark-box p {
    line-height: 1.4;
    margin: 0;
}

/* ------------------------------------------------------------
   8. PIED DE PAGE
   ------------------------------------------------------------ */
.menu-footer {
    text-align: center;
    padding: 40px 0 10px;
    margin-top: 20px;
    border-top: 2px solid var(--couleur-separateur);
    color: var(--couleur-texte-doux);
    font-size: 0.85rem;
}

.btn-retour {
    display: inline-block;
    padding: 10px 22px;
    margin-bottom: 14px;
    background-color: var(--couleur-accent);
    color: #ffffff;
    text-decoration: none;
    border-radius: 24px;
    font-family: var(--police-texte);
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 6px rgba(214, 69, 31, 0.25);
}

.btn-retour:hover {
    background-color: #b03a19;
}

.btn-retour:active {
    transform: scale(0.98);
}

/* ------------------------------------------------------------
   9. PETITS �CRANS (< 360 px)
   ------------------------------------------------------------ */
@media (max-width: 360px) {
    .menu-container { padding: 0 12px 30px; }
    .plat           { padding: 16px 12px; }
    .cat-title      { font-size: 0.95rem; }
    .sub-cat-title  { font-size: 0.95rem; }
    .plat-nom       { font-size: 1.4rem; }
    .plat-prix      { font-size: 1.15rem; }
}

/* ------------------------------------------------------------
   10. �CRANS LARGES (tablette, desktop)
   ------------------------------------------------------------ */
@media (min-width: 700px) {
    .menu-container { padding: 0 24px 50px; }
    .menu-header    { padding: 36px 0 28px; }
    .header-logo    { max-width: 260px; }
    .cat-title      { font-size: 1.22rem; }
    .plat-nom       { font-size: 1.75rem; }
}

/* ------------------------------------------------------------
   11. IMPRESSION
   ------------------------------------------------------------ */
@media print {
    body {
        background: #ffffff;
        background-image: none;
    }

    .menu-container { max-width: 100%; }

    /* On neutralise les fonds color�s pour �conomiser l'encre */
    .plat {
        background: transparent !important;
        padding: 12px 0;
        border-bottom: 1px dashed #ccc;
    }

    .cat-title,
    .sub-cat-title {
        background: transparent !important;
        color: #000 !important;
        border-left: 3px solid #000;
        padding: 10px 0;
    }

    .cat-title::after { background-color: #000; }

    .lang-switch,
    .btn-retour { display: none; }

    .categorie {
        page-break-inside: avoid;
    }
}

/* ------------------------------------------------------------
   12. BOUTON "VISUALISER"
   ------------------------------------------------------------ */
.photo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 24px;
    background: #ffffff;
    border: 2px solid #d6451f;   /* ? contour rouge */
    color: #000000;
    border-radius: 999px;
    font-family: var(--police-texte);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .2s ease, background-color .2s ease;
}
.photo-toggle:active {
    background: #f7f4ee;
}

.photo-toggle-eye {
    flex-shrink: 0;
    width: auto;
    height: 1.5em;
    display: block;
}

.photo-toggle-text {
    flex: 1;
    text-align: left;
    color: #000000;
}
.photo-toggle-arrow {
    flex-shrink: 0;
    color: #000000;
    transition: transform .3s ease;
}
.photo-toggle.is-open .photo-toggle-arrow {
    transform: rotate(90deg);
}

/* Bascule des libell�s */
.toggle-close-label                        { display: none !important; }
.photo-toggle.is-open .toggle-open-label   { display: none !important; }
.photo-toggle.is-open .toggle-close-label  { display: inline !important; }


/* ------------------------------------------------------------
   13. LE RIDEAU � accord�on inline
   ------------------------------------------------------------ */

/*  La grille anim�e : 0fr = ferm�, 1fr = ouvert (hauteur naturelle).
    Aucune valeur en pixels, aucune d�pendance � la taille de l'image.
    Le reste du menu est pouss� par le flux normal du document.     */
.photo-panel {
    display: grid;
    grid-template-rows: minmax(0, 0fr);
    transition: grid-template-rows .4s cubic-bezier(.32, .72, 0, 1);
}
.photo-panel.is-open {
    grid-template-rows: minmax(0, 1fr);

}
.photo-panel-inner {
    overflow: hidden;
    min-height: 0;
    margin-top: 0;
    transition: margin-top .4s cubic-bezier(.32, .72, 0, 1);
}
.photo-panel.is-open .photo-panel-inner {
    margin-top: 14px;
}
.cta-photo{flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:none;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent;}
.cta-vignette{position:relative;width:84px;aspect-ratio:3/2;display:block;border:1px solid rgba(197,160,89,.55);border-radius:8px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.13);}
.cta-vignette img{width:100%;height:100%;object-fit:cover;display:block;}
.ico-expand{position:absolute;right:5px;bottom:5px;width:20px;height:20px;border-radius:5px;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;}
.ico-expand svg{width:12px;height:12px;fill:#fff;}
.cta-label{font-size:.7rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--couleur-accent);white-space:nowrap;}
.cta-photo.is-open .cta-label{display:none;}
.photo-panel-inner{position:relative;}
.fermer-photo{position:absolute;top:10px;right:10px;display:flex;flex-direction:column;align-items:center;gap:3px;border:0;background:none;padding:0;cursor:pointer;color:#fff;}
.fermer-photo svg{width:30px;height:30px;fill:none;stroke:#fff;stroke-width:2.5;stroke-linecap:round;filter:drop-shadow(0 1px 3px rgba(0,0,0,.65));}
.fermer-photo span{font-size:.68rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;text-shadow:0 1px 3px rgba(0,0,0,.65);}

.photo-panel img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 12px;
    background: var(--row-gris3);
}

/* ------------------------------------------------------------
   14. IMPRESSION : on masque tout ce qui est photo
   ------------------------------------------------------------ */
@media print {
    .cta-photo,
    .photo-panel { display: none !important; }
}

/* ------------------------------------------------------------
   15. Accessibilit� : pr�f�rence "moins d'animations"
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .photo-panel,
    .photo-panel-inner { transition: none; }
}

/* ------------------------------------------------------------
   16. FONDS DES TITRES DE SECTIONS
   ------------------------------------------------------------ */
.cat-title {
    background: var(--cat-fond);
    color: var(--cat-texte);
    padding: 14px 16px;
    border-radius: 10px;
    border-left: 4px solid #8F3000;
}

/* Le petit trait sous le titre passe en blanc translucide
   (l'ancien terracotta serait invisible sur orange) */
.cat-title::after {
    background: rgba(255, 255, 255, 0.6);
}

/* Le sous-titre � .cat-detail � doit rester lisible sur orange */
.cat-title .cat-detail {
    color: rgba(255, 255, 255, 0.9);
}

.sub-cat-title {
    background: var(--subcat-fond);
    color: var(--subcat-texte);
    padding: 8px 14px;
    border-radius: 8px;
    border-left: 3px solid #4E1019;
    margin-left: 32px;
    margin-right: 32px;
}
