/* =============================================
   DESIGN SIGNATURE JAROD — BAR MITZVAH 2026
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600;700&family=Cinzel:wght@400;700&family=Assistant:wght@200;400;700&family=Great+Vibes&display=swap');

:root {
    --or-mat: #9E7B50;
    --texte-brun: #3D3834;
    --beige-fond: #FDFBF8;
}

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

html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
}

body {
    background-color: var(--beige-fond);
    color: var(--texte-brun);
    font-family: 'Inter', 'Assistant', sans-serif;
}

/* --- FONDS FIXES --- */
#bg-psagot {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 50%;
    background: url('assets/psagot.jpg') no-repeat bottom center;
    background-size: cover; opacity: 0.07; z-index: -2;
    mask-image: linear-gradient(to top, black 30%, transparent 100%);
}

.rabbi-sky {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; max-width: 500px; height: 80%;
    background: url('assets/rabbi.png') no-repeat center center;
    background-size: contain; opacity: 0.10; z-index: 0;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at 50% 50%, black 10%, transparent 72%);
}

/* =============================================
   PAGE — s'adapte à l'écran
   ============================================= */
.page-section {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 6px 12px 1px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* exactement 1 écran, rien de plus */
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;  /* scroll interne si écran trop petit */
    overflow-x: hidden;
    z-index: 1;
}
.rabbi-quote-container {
    margin: clamp(10px, 2vh, 20px) 0;
    text-align: center;
    width: 100%;
}

.rabbi-quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1rem, 1.5vh, 1.3rem);
    color: var(--or-mat);
    line-height: 1.4;
    margin-bottom: 5px;
}

.rabbi-signature {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.5rem, 1.0vh, 0.65rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #9a9088; /* Un gris-brun noble et discret */
    opacity: 0.8;
}


.hommage-section {
    margin-top: clamp(20px, 4vh, 35px);
    padding-top: 15px;
    border-top: 1px solid rgba(158, 123, 80, 0.2);
    width: 100%;
    text-align: center;
}

.hommage-section i {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(0.75rem, 1.8vh, 0.95rem);
    color: #8c8279;
    display: block;
    margin-bottom: 10px;
}

.grands-parents-noms {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.55rem, 1.3vh, 0.7rem);
    letter-spacing: 1.2px;
    color: var(--texte-brun);
    line-height: 1.8;
    text-transform: uppercase;
    opacity: 0.85;
}

.nom-couple {
    margin-bottom: 2px;
}
/* =============================================
   CARTE D'INVITATION
   ============================================= */
.invitation-card {
    background: rgba(253, 251, 248, 0.92);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(158, 123, 80, 0.20);
    box-shadow:
        0 4px 40px rgba(0, 0, 0, 0.07),
        0 0 0 1px rgba(158, 123, 80, 0.06);

    padding: clamp(10px, 2vh, 22px) clamp(14px, 4vw, 28px) 0;
    width: 100%;
    max-width: 460px;

    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: clamp(4px, 1vh, 12px);
    text-align: center;

    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
}

/* Tous les enfants directs au-dessus de l'effet parchemin */
.invitation-card > * {
    position: relative;
    z-index: 1;
}

/* Rabbi en haut au centre, très léger */
.rabbi-card-left {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(80px, 50vw, 150px);
    height: auto;
    opacity: 0.12;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 55%, transparent 100%);
    z-index: 1;
}

/* ב"ה */
.bh {
    font-family: 'Assistant', sans-serif;
    font-size: clamp(0.6rem, 1.5vh, 0.9rem);
    letter-spacing: 5px;
    color: var(--or-mat);
    font-weight: bold;
    width: 100%;
    text-align: right;
}

.audio-control {
    position: fixed;
    top: 14px; right: 60px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(158,123,80,0.25);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 1999;
    color: #c0a878;
    transition: 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.audio-control:hover { color: var(--or-mat); border-color: var(--or-mat); }
.audio-control.playing { color: var(--or-mat); border-color: var(--or-mat); animation: pulse 2s infinite; }
.audio-control .menu-icon { width: 14px; height: 14px; }
@keyframes pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* --- TITRE BAR MITZVAH — même ligne, classe --- */
.stm-header {
    width: 100%;
}

.stm-title-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.5vw, 20px);
}

.stm-bar-word {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 2.5vh, 2.4rem);
    letter-spacing: clamp(0.25em, 0.4em, 0.55em);
    color: #2e2520;
    font-weight: 300;
    text-transform: uppercase;
}

/* Séparateur vertical doré */
.stm-title-sep {
    display: block;
    width: 1px;
    height: clamp(1.8rem, 5vh, 3.2rem);
    background: linear-gradient(to bottom, transparent, var(--or-mat) 25%, var(--or-mat) 75%, transparent);
    flex-shrink: 0;
}

.stm-mitzvah-word {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 2.5vh, 2.4rem);
    letter-spacing: clamp(0.25em, 0.4em, 0.55em);
    color: var(--or-mat);
    font-weight: 300;
    text-transform: uppercase;
}

/* --- TEXTE D'INVITATION — manuscrit léger --- */
.stm-invite-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(0.85rem, 2vh, 1.15rem);
    letter-spacing: 0.3px;
    color: #6a6258;
    line-height: 1.75;
}

/* --- 770 EN FOND DE CARTE — grand --- */
.logo-770-bg {
    position: absolute;
    width: clamp(290px, 100%, 420px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.11;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
}

/* --- NOM EN SCRIPT DORÉ --- */
.stm-name-block {
    line-height: 1;
}

.stm-script-name {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2rem, 6vh, 3.8rem);
    color: var(--or-mat);
    line-height: 1.1;
}

.stm-family-name {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.65rem, 1.8vh, 0.95rem);
    letter-spacing: 8px;
    color: #5a5249;
    margin-top: 1px;
}

/* --- BLOC DATE --- */
.stm-date-block {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.5rem, 1.3vh, 0.68rem);
    letter-spacing: 2px;
    color: #5a5249;
    padding: clamp(6px, 1.5vh, 12px) 0;
    border-top: 1px solid rgba(158, 123, 80, 0.30);
    border-bottom: 1px solid rgba(158, 123, 80, 0.30);
    line-height: 2.2;
    text-transform: uppercase;
    width: 100%;
}

/* --- COMPTE À REBOURS --- */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 2.5vw, 16px);
}

body.lang-he .countdown-container {
    flex-direction: row-reverse;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
}

.countdown-val {
    font-family: 'Cinzel', serif;
    font-size: clamp(1rem, 3vh, 1.5rem);
    color: var(--or-mat);
    display: block;
}

.countdown-label {
    font-size: clamp(0.42rem, 1vh, 0.58rem);
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 1px;
    margin-top: 2px;
    font-family: 'Cinzel', serif;
}

/* --- PIED DE CARTE --- */
.stm-footer-text {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.42rem, 1vh, 0.56rem);
    letter-spacing: 2px;
    color: #9a9088;
    text-transform: uppercase;
    line-height: 1.8;
}

/* =============================================
   BOUTON OR
   ============================================= */
.btn-gold {
    width: 100%; max-width: 280px;
    background: var(--or-mat); color: white;
    padding: clamp(9px, 1.8vh, 15px);
    border: none;
    letter-spacing: 3px; font-family: 'Cinzel';
    font-weight: bold; cursor: pointer;
    transition: 0.3s;
    font-size: clamp(0.55rem, 1.2vh, 0.7rem);
}
.btn-gold:hover { background: #7a5e39; letter-spacing: 4px; }

/* =============================================
   SALUTATION INVITÉ (récupérée via URL/token)
   ============================================= */
.guest-greeting {
    width: 100%;
    text-align: center;
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.1rem, 2.6vh, 1.6rem);
    color: var(--or-mat);
    line-height: 1.2;
    margin: clamp(2px, 0.5vh, 6px) 0 clamp(2px, 0.4vh, 4px);
}
.guest-greeting.hidden { display: none; }
.guest-greeting-name {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
}
body.lang-he .guest-greeting {
    font-family: 'Assistant', sans-serif;
    font-size: clamp(0.85rem, 1.9vh, 1.15rem);
    letter-spacing: 0.5px;
}
body.lang-he .guest-greeting-name {
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
}

/* =============================================
   FOOTER SAVE THE DATE
   ============================================= */
.save-date-footer {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    width: calc(100% + clamp(28px, 8vw, 56px));
    margin-left: calc(-1 * clamp(14px, 4vw, 28px));
    margin-right: calc(-1 * clamp(14px, 4vw, 28px));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
    background: var(--or-mat);
    flex-shrink: 0;
    z-index: 10;
    box-shadow: 0 -2px 12px rgba(158, 123, 80, 0.18);
}
.save-date-text {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.85rem, 2.4vw, 1.1rem);
    letter-spacing: clamp(4px, 1.2vw, 8px);
    color: #FDFBF8;
    font-weight: 500;
    text-transform: uppercase;
}

/* =============================================
   MENU ORBITAL — 5 ITEMS
   ============================================= */
.menu-770-container {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    width: calc(100% + clamp(28px, 8vw, 56px));
    margin-left: calc(-1 * clamp(14px, 4vw, 28px));
    margin-right: calc(-1 * clamp(14px, 4vw, 28px));
    display: flex; justify-content: space-around; align-items: center;
    gap: 4px;
    padding: 14px 12px calc(22px + env(safe-area-inset-bottom));
    background: rgba(253, 251, 248, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(158, 123, 80, 0.25);
    flex-shrink: 0;
    z-index: 10;
}
.bar-770 {
    width: 42px; height: 42px; border-radius: 50%; background: white;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 1px solid rgba(158, 123, 80, 0.2); cursor: pointer; transition: 0.35s;
    position: relative;
    color: var(--or-mat);
}
.bar-770:hover, .bar-770.active {
    background: var(--or-mat); color: white;
    transform: translateY(-5px); border-color: var(--or-mat);
}
.bar-text {
    position: absolute; bottom: -18px; font-size: 7px;
    font-weight: bold; color: var(--or-mat);
    font-family: 'Cinzel'; letter-spacing: 0.5px;
    white-space: nowrap;
}
.bar-770.active .bar-text { color: var(--or-mat); }
.menu-icon {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none;
    overflow: visible;
}

/* =============================================
   BILINGUE
   ============================================= */
body.lang-fr .he-text { display: none !important; }
body.lang-he .fr-text { display: none !important; }
body.lang-he { direction: rtl; text-align: right; }
body.lang-he .invitation-card { text-align: right; }
body.lang-he .stm-header,
body.lang-he .stm-invite-text,
body.lang-he .stm-name-block,
body.lang-he .stm-date-block,
body.lang-he .stm-footer-text,
body.lang-he .bh,
body.lang-he .inner-page { text-align: center; }
/* BAR MITZVAH — jamais inversé en RTL */
.stm-title-line { direction: ltr; }

/* =============================================
   PAGES INTERNES (Mitsva, RSVP, Photos, Repas)
   ============================================= */
.inner-page {
    width: 100%;
    max-width: 460px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: clamp(6px, 1.5vh, 18px);
    padding: clamp(10px, 2vh, 22px) clamp(14px, 4vw, 28px);
    background: rgba(253, 251, 248, 0.92);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(158, 123, 80, 0.20);
    box-shadow: 0 4px 40px rgba(0,0,0,0.07), 0 0 0 1px rgba(158,123,80,0.06);
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    text-align: center;
}

.page-title {
    text-align: center;
    width: 100%;
    padding-bottom: clamp(8px, 1.5vh, 14px);
    position: relative;
}
.page-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 1px;
    background: var(--or-mat);
    margin: 10px auto 0;
    opacity: 0.5;
}
.page-title h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1rem, 3.2vh, 1.55rem);
    letter-spacing: clamp(3px, 1.2vw, 8px);
    color: var(--or-mat);
    font-weight: 400;
}

.thin-divider {
    width: 60%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--or-mat) 30%, var(--or-mat) 70%, transparent);
    opacity: 0.4;
}

/* --- RSVP --- */
#rsvp-form-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    gap: clamp(20px, 3.5vh, 32px);
    padding: clamp(8px, 2vh, 18px) 0 0;
}
.rsvp-fields {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
    gap: clamp(18px, 3vh, 28px);
}
.rsvp-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.rsvp-submit {
    margin-top: auto;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 8px 0 16px;
}
.qty-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 6px 4px 14px;
    border-bottom: 1px solid rgba(158, 123, 80, 0.18);
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
}
.qty-label {
    font-size: clamp(0.7rem, 1.6vh, 0.85rem);
    letter-spacing: 2px;
    color: var(--texte-brun);
}
.qty-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}
.qty-selector button {
    width: 34px; height: 34px;
    border: 1px solid var(--or-mat);
    background: white; color: var(--or-mat);
    font-size: 1.15rem; cursor: pointer;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
    line-height: 1;
}
.qty-selector button:hover {
    background: var(--or-mat); color: white;
    transform: scale(1.05);
}
.qty-selector button:active {
    transform: scale(0.95);
}
.qty-selector #display-adults,
.qty-selector #display-children {
    font-size: 1.25rem; font-family: 'Cinzel', serif;
    min-width: 28px; text-align: center;
    color: var(--or-mat); font-weight: 600;
}
.section-label {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.62rem, 1.5vh, 0.78rem);
    letter-spacing: 2px; color: #6a6258;
    text-transform: uppercase; text-align: center;
    display: block;
}
.radio-group {
    display: flex; gap: 20px; justify-content: center;
    font-family: 'Cinzel'; font-size: 0.75rem; letter-spacing: 1px;
}
.radio-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.select-gold {
    width: 100%;
    border: 1px solid rgba(158, 123, 80, 0.4); border-radius: 2px;
    background: white; color: var(--texte-brun);
    padding: 12px 14px; font-family: 'Inter', 'Assistant', sans-serif;
    font-size: 0.92rem;
    letter-spacing: 0.3px; cursor: pointer; outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.select-gold:focus {
    border-color: var(--or-mat);
    box-shadow: 0 0 0 3px rgba(158, 123, 80, 0.12);
}
.input-gold {
    width: 100%;
    border: none; border-bottom: 1.5px solid rgba(158, 123, 80, 0.35);
    background: transparent; color: var(--texte-brun);
    padding: 12px 6px;
    font-family: 'Inter', 'Assistant', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.3px; outline: none; text-align: left;
    transition: border-color 0.25s, transform 0.25s;
}
body.lang-he .input-gold { text-align: right; }
.input-gold:focus {
    border-bottom-color: var(--or-mat);
    border-bottom-width: 2px;
}
.input-gold::placeholder { color: #c4b59a; font-style: italic; font-weight: 300; }
.input-gold.input-error { border-bottom-color: #c0392b; animation: shake 0.3s; }
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}
.rsvp-confirm-msg {
    font-family: 'Inter', 'Assistant', sans-serif;
    font-size: clamp(0.95rem, 2.5vh, 1.1rem);
    color: var(--texte-brun); text-align: center;
    padding: 32px 16px;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.confirm-icon {
    font-size: clamp(2.4rem, 7vh, 3.4rem);
    color: var(--or-mat);
    width: 78px; height: 78px;
    border: 1.5px solid var(--or-mat);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 4px;
}

/* --- MITSVA --- */
/* Mitsva : aucun scroll, tout tient dans la hauteur visible */
body[data-page="mitsva"] .inner-page {
    overflow-y: hidden;
    gap: clamp(4px, 1vh, 10px);
    padding-top: clamp(8px, 1.5vh, 16px);
}
body[data-page="mitsva"] .page-title { padding-bottom: clamp(2px, 0.8vh, 8px); }
body[data-page="mitsva"] .page-title h2 {
    font-size: clamp(0.95rem, 2.6vh, 1.35rem);
    letter-spacing: clamp(2px, 1vw, 6px);
}
body[data-page="mitsva"] .page-title::after { margin: 5px auto 0; width: 32px; }

.mitsva-logo { width: clamp(38px, 7vh, 60px); }
.mitsva-770-img { width: 100%; mix-blend-mode: multiply; opacity: 0.7; }

.mitsva-table {
    width: calc(100% + clamp(28px, 8vw, 56px)) !important;
    max-width: none !important;
    margin-left: calc(-1 * clamp(14px, 4vw, 28px)) !important;
    margin-right: calc(-1 * clamp(14px, 4vw, 28px)) !important;
    align-self: stretch !important;
    display: grid !important;
    grid-template-columns: 1fr;
    border-top: 1px solid rgba(158, 123, 80, 0.25);
    border-bottom: 1px solid rgba(158, 123, 80, 0.25);
    background: rgba(255, 255, 255, 0.35);
}
.mitsva-row {
    display: grid !important;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: center;
    padding: clamp(7px, 1.3vh, 12px) clamp(14px, 4vw, 24px);
    border-bottom: 1px solid rgba(158, 123, 80, 0.16);
    text-align: initial;
}
.mitsva-row:last-child { border-bottom: none; }

.mitsva-row--stacked {
    grid-template-columns: 1fr;
    row-gap: 8px;
}

.mitsva-block { text-align: center; }
.mitsva-block .mitsva-label {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.5rem, 1.2vh, 0.65rem);
    letter-spacing: 3px; color: var(--or-mat);
    text-transform: uppercase; margin-bottom: 3px;
}
.mitsva-block .mitsva-value {
    font-family: 'Inter', 'Assistant', sans-serif;
    font-size: clamp(0.85rem, 2vh, 1.1rem);
    color: #3a302a; font-style: italic;
}
.mitsva-row .mitsva-label {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.62rem, 1.45vh, 0.78rem);
    letter-spacing: 2.5px;
    color: var(--or-mat);
    text-transform: uppercase;
    text-align: left;
}
.mitsva-row .mitsva-value {
    font-family: 'Inter', 'Assistant', sans-serif;
    font-size: clamp(0.92rem, 2vh, 1.08rem);
    color: var(--texte-brun);
    text-align: right;
    line-height: 1.4;
}
.mitsva-row--stacked .mitsva-label { text-align: left; }
.mitsva-row--stacked .mitsva-value {
    text-align: left !important;
    font-style: italic;
    color: #5a5048;
}
body.lang-he .mitsva-row .mitsva-label { text-align: right; }
body.lang-he .mitsva-row .mitsva-value { text-align: left; }
body.lang-he .mitsva-row--stacked .mitsva-label,
body.lang-he .mitsva-row--stacked .mitsva-value { text-align: right !important; }

/* --- PHOTOS --- */
.photo-instructions {
    font-family: 'Inter', 'Assistant', sans-serif;
    font-style: italic; font-size: clamp(0.85rem, 2vh, 1.05rem);
    color: #6a6258; line-height: 1.7; text-align: center;
}
.qr-placeholder { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-box {
    width: clamp(90px, 22vw, 130px); height: clamp(90px, 22vw, 130px);
    border: 1px solid rgba(158,123,80,0.3);
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
}
.qr-icon { width: 100%; height: 100%; color: var(--or-mat); }
.qr-text {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.5rem, 1.2vh, 0.62rem);
    letter-spacing: 1.5px; color: #9a9088;
    text-transform: uppercase;
}

/* --- LIEU --- */
/* Lieu : aucun scroll, contenu réparti sur la hauteur dispo */
body[data-page="lieu"] .inner-page {
    overflow-y: hidden;
    gap: clamp(8px, 1.5vh, 18px);
    padding-top: clamp(10px, 1.8vh, 18px);
}
body[data-page="lieu"] .page-title { padding-bottom: clamp(2px, 0.8vh, 8px); }

/* Particules dorées flottantes en arrière-plan */
body[data-page="lieu"] .inner-page,
body[data-page="mitsva"] .inner-page {
    background-color: rgba(253, 251, 248, 0.92);
    background-image:
        radial-gradient(circle, rgba(158,123,80,0.55) 2px, transparent 2.5px),
        radial-gradient(circle, rgba(158,123,80,0.4) 1.5px, transparent 2px);
    background-size: 130px 130px, 90px 90px;
    background-position: 20px 35px, 65px 80px;
    background-repeat: repeat, repeat;
}

.lieu-table {
    width: calc(100% + clamp(28px, 8vw, 56px));
    margin-left: calc(-1 * clamp(14px, 4vw, 28px));
    margin-right: calc(-1 * clamp(14px, 4vw, 28px));
    align-self: stretch;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(158, 123, 80, 0.25);
    border-bottom: 1px solid rgba(158, 123, 80, 0.25);
    background: rgba(255, 255, 255, 0.35);
}
.lieu-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: clamp(8px, 1.5vh, 18px) clamp(16px, 4vw, 28px);
    border-bottom: 1px solid rgba(158, 123, 80, 0.16);
    text-align: center;
}
.lieu-row:last-child { border-bottom: none; }

.lieu-icon {
    flex-shrink: 0;
    width: clamp(26px, 4.5vh, 34px);
    height: clamp(26px, 4.5vh, 34px);
    display: flex; align-items: center; justify-content: center;
    color: var(--or-mat);
}
.lieu-svg { width: 100%; height: 100%; stroke: currentColor; fill: none; }
.lieu-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
}
.lieu-label {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.62rem, 1.4vh, 0.78rem);
    letter-spacing: 2.5px; color: var(--or-mat);
    text-transform: uppercase;
}
.lieu-value {
    font-family: 'Inter', 'Assistant', sans-serif;
    font-size: clamp(0.85rem, 1.9vh, 1.05rem);
    color: var(--texte-brun);
    line-height: 1.4;
}

.lieu-action {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: clamp(4px, 1vh, 10px) 0;
}
.lieu-action .btn-gold {
    max-width: none;
    width: 100%;
}

.hidden { display: none !important; }

/* =============================================
   APP SHELL — LAYOUT NATIF (4 pages internes)
   header sticky · main scrollable · footer fixe
   ============================================= */
body.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
}

.app-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) 16px 10px;
    background: rgba(253, 251, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(158, 123, 80, 0.12);
    position: relative;
    z-index: 100;
}

.app-header .lang-toggle {
    background: none;
    border: none;
    border-bottom: 1px solid var(--or-mat);
    color: var(--or-mat);
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 2px 4px;
    flex-shrink: 0;
}

.app-header .header-brand {
    text-decoration: none;
    text-align: center;
    color: var(--or-mat);
    line-height: 1;
    flex: 1;
}
.app-header .header-name {
    display: block;
    font-family: 'Great Vibes', cursive;
    font-size: 22px;
    color: var(--or-mat);
}
.app-header .header-date {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 8px;
    letter-spacing: 2.5px;
    margin-top: 2px;
    color: #9a9088;
    text-transform: uppercase;
}
.app-header .bh {
    width: auto;
    text-align: right;
    font-size: 11px;
    letter-spacing: 3px;
    flex-shrink: 0;
}

.app-main {
    flex: 1;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) 12px;
}

/* Rectangle plein-écran : prend toute la hauteur dispo, menu intégré en footer */
body.app-shell .inner-page {
    flex: 1;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(8px, 1.8vh, 18px);
    padding: clamp(14px, 2.5vh, 22px) clamp(14px, 4vw, 28px) 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-footer {
    flex-shrink: 0;
    pointer-events: none; /* le menu et l'audio gèrent leurs propres pointer-events */
}

/* Audio control : en haut à droite, hors menu */
body.app-shell .audio-control {
    top: calc(env(safe-area-inset-top) + 14px);
    pointer-events: auto;
}

/* En RTL, on inverse l'ordre du header */
body.lang-he.app-shell .app-header { flex-direction: row-reverse; }

/* =============================================
   VERROU DE SÉCURITÉ
   ============================================= */
.menu-770-container, .hidden-secure { display: none !important; }
body.unlocked .menu-770-container { display: flex !important; }

/* ── Welcome Overlay ─────────────────────────────────── */
#welcome-overlay {
    position: fixed; inset: 0; z-index: 8000;
    background: var(--beige-fond);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.7s ease;
    cursor: pointer;
}
.welcome-card {
    text-align: center;
    padding: clamp(30px,6vh,50px) clamp(20px,6vw,40px);
    max-width: 340px; width: 90%;
}
.welcome-greeting {
    font-family: 'Inter', 'Assistant', sans-serif;
    font-style: italic;
    font-size: clamp(1rem, 3vh, 1.5rem);
    color: #6a6258; line-height: 1.5; margin: 8px 0;
}
.welcome-nom {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2rem, 6vh, 3rem);
    color: var(--or-mat);
    display: block; margin-top: 4px;
}
.welcome-sub {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.45rem, 1.1vh, 0.6rem);
    letter-spacing: 2px; text-transform: uppercase;
    color: #9a9088; margin-top: 6px;
}
.welcome-sep {
    width: 50px; height: 1px;
    background: var(--or-mat); opacity: 0.35;
    margin: 12px auto;
}
.welcome-770 {
    width: 70px; opacity: 0.13;
    mix-blend-mode: multiply; margin-top: 12px;
}

/* ── Rabbi Quote ─────────────────────────────────────── */
.rabbi-quote-container {
    border-left: 2px solid rgba(158,123,80,0.25);
    padding: 2px 10px; margin: 0 4px; text-align: left;
}
body.lang-he .rabbi-quote-container { border-left: none; border-right: 2px solid rgba(158,123,80,0.25); text-align: right; }
.rabbi-quote p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(0.6rem, 1.4vh, 0.78rem);
    color: #7a6e65; line-height: 1.65;
}
.rabbi-signature p {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.42rem, 0.95vh, 0.55rem);
    letter-spacing: 1.5px; color: var(--or-mat);
    margin-top: 3px;
}

/* ── Paracha ─────────────────────────────────────────── */
.stm-paracha {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.42rem, 0.95vh, 0.56rem);
    letter-spacing: 2px; color: var(--or-mat);
    opacity: 0.85; text-transform: uppercase;
}

/* ── Hommage ─────────────────────────────────────────── */
.hommage-section {
    border-top: 1px solid rgba(158,123,80,0.12);
    padding-top: 6px; text-align: center;
}
.hommage-section > p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(0.55rem, 1.2vh, 0.68rem);
    color: #9a9088; margin-bottom: 4px;
}
.grands-parents-noms { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; }
.nom-couple {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.38rem, 0.85vh, 0.5rem);
    letter-spacing: 0.4px; color: #b8a98a;
}

/* ── Mitsva choice grid ──────────────────────────────── */
#mitsva-choice-section {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.6vh, 16px);
}
.mitsva-sub {
    font-family: 'Inter', 'Assistant', sans-serif; font-style: italic;
    font-size: clamp(0.65rem, 1.4vh, 0.82rem); color: #9a9088; margin-top: 2px;
}
.mitsva-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(158, 123, 80, 0.3);
    width: 100%;
    max-width: none;
}
.mitsva-option {
    border: none;
    border-radius: 0;
    padding: clamp(8px, 1.6vh, 16px) 4px;
    text-align: center; cursor: pointer;
    transition: background 0.22s, color 0.22s;
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.55rem, 1.15vh, 0.7rem);
    letter-spacing: 0.8px; color: #6a6258;
    background: rgba(253, 251, 248, 0.95);
}
.mitsva-opt-icon { font-size: clamp(1.1rem, 2.4vh, 1.5rem); }
.mitsva-option:hover {
    background: rgba(158,123,80,0.08);
    color: var(--or-mat);
}
.mitsva-option.selected {
    background: var(--or-mat); color: white;
}
#mitsva-choice-section .btn-gold {
    max-width: none;
    width: 100%;
    padding: clamp(10px, 1.6vh, 14px) 16px;
}
#mitsva-choice-section .mitsva-block .mitsva-label {
    font-size: clamp(0.62rem, 1.4vh, 0.78rem);
    margin-bottom: 0;
}

/* =============================================
   PAGE HOME — Save the Date : tout dans la hauteur, distribué
   ============================================= */
body[data-page="home"] #page-save-the-date {
    overflow: hidden;
    padding: 4px 12px 0;
}
body[data-page="home"] .invitation-card {
    flex: 1;
    justify-content: space-between;
    gap: clamp(2px, 0.6vh, 8px);
    padding: clamp(4px, 1vh, 10px) clamp(14px, 4vw, 28px) clamp(4px, 1vh, 10px);
    background-color: rgba(253, 251, 248, 0.92);
}

/* Photo du Rabbi en haut, bien visible */
.rabbi-top-img {
    width: clamp(75px, 12vh, 110px);
    height: auto;
    margin: clamp(4px, 1vh, 12px) auto 0;
    opacity: 0.92;
    -webkit-mask-image: radial-gradient(ellipse at center top, rgba(0,0,0,1) 60%, transparent 100%);
    mask-image: radial-gradient(ellipse at center top, rgba(0,0,0,1) 60%, transparent 100%);
    display: block;
}

/* Citation du Rabbi en bas */
body[data-page="home"] .rabbi-quote-container {
    margin: 0;
    padding: clamp(4px, 0.8vh, 10px) clamp(8px, 2vw, 14px) 0;
    border: none;
    text-align: center;
    width: 100%;
}
body[data-page="home"] .rabbi-quote p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.9vh, 1.05rem);
    line-height: 1.5;
    margin-bottom: 6px;
    color: #9a9088;
}
body[data-page="home"] .rabbi-signature p {
    font-size: clamp(0.42rem, 0.9vh, 0.55rem);
    letter-spacing: 1.5px;
    color: #9a9088;
}

body[data-page="home"] .stm-header { margin: 0; }
body[data-page="home"] .stm-title-line { font-size: clamp(1.4rem, 4vh, 2rem); }

body[data-page="home"] .stm-invite-text { font-size: clamp(0.92rem, 2vh, 1.15rem); line-height: 1.5; }
body[data-page="home"] .stm-name-block { gap: 2px; margin: 0; }
body[data-page="home"] .stm-script-name { font-size: clamp(2.1rem, 5.7vh, 3.1rem); line-height: 1; }
body[data-page="home"] .stm-family-name { font-size: clamp(0.8rem, 1.8vh, 1.05rem); }

body[data-page="home"] .stm-date-block { padding: clamp(4px, 1vh, 9px) 0; }
body[data-page="home"] .stm-date-block p { font-size: clamp(0.64rem, 1.35vh, 0.8rem); margin: 0; line-height: 1.7; }
body[data-page="home"] .stm-paracha { font-size: clamp(0.56rem, 1.15vh, 0.7rem) !important; margin-top: 2px !important; }

body[data-page="home"] .countdown-container { gap: clamp(8px, 1.8vh, 16px); margin: 0; }
body[data-page="home"] .countdown-val { font-size: clamp(1rem, 2.7vh, 1.4rem); }
body[data-page="home"] .countdown-label { font-size: clamp(0.4rem, 0.9vh, 0.54rem); }

body[data-page="home"] .stm-footer-text { font-size: clamp(0.58rem, 1.25vh, 0.74rem); margin: 0; }

body[data-page="home"] .hommage-section { padding: clamp(4px, 0.9vh, 10px) 0 0; margin: 0; }
body[data-page="home"] .hommage-section > p { font-size: clamp(0.62rem, 1.4vh, 0.8rem); margin-bottom: 4px; }
body[data-page="home"] .nom-couple { font-size: clamp(0.46rem, 1vh, 0.6rem); line-height: 1.45; }

body[data-page="home"] .save-date-footer {
    margin-top: clamp(4px, 0.9vh, 10px);
    padding: clamp(10px, 1.7vh, 14px) 16px calc(clamp(10px, 1.7vh, 14px) + env(safe-area-inset-bottom));
}
body[data-page="home"] .save-date-text {
    font-size: clamp(0.7rem, 1.7vh, 0.95rem);
    letter-spacing: clamp(3px, 0.9vw, 6px);
}
