@font-face {
    font-family: 'Envelope Calligraphy';
    src: url('fonts/greatvibes-regular.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Invitation Arabic';
    src: url('fonts/amiri-regular.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
:root {
    --paper: #fcf5eb;
    --ink: #3e3026;
    --gold: #98723b;
    --burgundy: #6c233b;
    --ivory: #f8f6f1;
    --soft-brown: #796653;
    --champagne: #b7aa98;
    --muted-brown: #88765f;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --script: 'Great Vibes', 'Cormorant Garamond', cursive;
    --button-radius: 999px;
    --sans: 'Jost', Arial, sans-serif;
    /* Une écriture Naskh classique pour le faire-part et les versets. */
    --arabic: 'Invitation Arabic', 'Amiri', serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: #f3efe7 url('arabesque.svg') center / 130px;
    font: 21px/1.7 var(--serif);
    -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, a { touch-action: manipulation; }
button { font: inherit; }
/* Une même silhouette arrondie pour toutes les actions du faire-part. */
button:not(.envelope-open-button), .reception-route, .calendar-link {
    border-radius: var(--button-radius);
}
button:focus-visible, a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 6px;
}
.eyebrow {
    color: var(--gold);
    font: 400 10px/1.8 var(--sans);
    letter-spacing: .25em;
    text-transform: uppercase;
}
h2 {
    font: italic 400 clamp(32px, 5vw, 45px)/1.25 var(--serif);
    margin: 18px 0 30px;
}
.signature {
    color: var(--gold);
    font: 400 clamp(42px, 6vw, 62px)/1.4 var(--script);
    margin: 24px 0;
}
.divider {
    display: block;
    width: 140px;
    height: 26px;
    margin: 18px auto;
    color: var(--gold);
}
.blessing { font: 34px/1.8 var(--arabic); color: var(--gold); }
.secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    background: transparent;
    color: #795b33;
    border: 1px solid #a9834d;
    padding: 14px 20px;
    text-decoration: none;
    font: 400 10px/1.6 var(--sans);
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.secondary:hover { background: #efe0c7; transform: translateY(-2px); }

/* Deux tiges dans les coins opposés laissent l’enveloppe seule au centre. */
.envelope-cover {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(56px, 9svh, 100px) 28px clamp(64px, 9svh, 100px);
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 40%, #fffefa 15%, var(--ivory) 65%, #eeeae2 100%);
}
.envelope-cover:before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url('arabesque.svg') center / 150px;
    opacity: .18;
    mask-image: radial-gradient(ellipse at center, transparent 25%, #000 85%);
    pointer-events: none;
}
.envelope-cover:after { content: ''; position: absolute; inset: 0; z-index: -1; background: url('paper-grain.svg'); opacity: .45; pointer-events: none; }
.envelope-heading { position: relative; z-index: 3; width: min(100%, 620px); margin-bottom: 32px; }
.envelope-heading h2 { font: 400 clamp(38px, 4.5vw, 50px)/1.25 'Envelope Calligraphy', var(--script); color: var(--soft-brown); letter-spacing: 0; margin: 14px 0 12px; overflow-wrap: anywhere; }
.envelope-heading .eyebrow, #envelope-title {
    background: transparent;
    padding-inline: 0;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.envelope-heading .eyebrow { display: inline; color: var(--soft-brown); font-size: 16px; font-weight: 400; letter-spacing: .18em; }
.envelope-heading .eyebrow strong { font-weight: 700; }
.envelope-couple { margin: 0; color: var(--burgundy); font: 500 clamp(28px, 4.3vw, 36px)/1.2 var(--serif); }
.envelope-couple span { color: var(--muted-brown); font-style: italic; }
.envelope-date { margin: 8px 0 14px; color: var(--soft-brown); font: 400 14px/1.6 var(--sans); letter-spacing: .025em; }
.envelope-ornament { display: block; width: 145px; height: 24px; margin: 0 auto; color: var(--champagne); }
.envelope-scene { position: relative; z-index: 2; width: min(480px, 100%, 46svh); --scene-ratio: 4 / 3; --reflection-ratio: 8; }
.envelope-arrangement { position: relative; width: 100%; aspect-ratio: var(--scene-ratio); }
.envelope-arrangement .paper-envelope { position: absolute; inset: 0; z-index: 1; width: 100%; }
.envelope-orchid { position: absolute; z-index: 1; width: min(24vw, 19svh, 180px); height: auto; object-fit: contain; transform-origin: 50% 95%; pointer-events: none; filter: drop-shadow(0 5px 5px #5e243b14); }
.orchid-left { --orchid-flip: -1; --orchid-duration: 9s; --orchid-delay: -2s; top: -10px; left: -16px; transform: scaleX(-1); }
.orchid-right { --orchid-flip: 1; --orchid-duration: 10s; --orchid-delay: -5s; bottom: -14px; right: -16px; }
.motion-active .envelope-orchid { animation: orchid-sway var(--orchid-duration) var(--orchid-delay) ease-in-out infinite; }
.unsealed .envelope-orchid { animation-play-state: paused; }
@keyframes orchid-sway {
    0%, 100% { transform: scaleX(var(--orchid-flip)) rotate(-.6deg); }
    50% { transform: scaleX(var(--orchid-flip)) rotate(.9deg); }
}
.envelope-reflection {
    position: relative;
    width: 100%;
    aspect-ratio: var(--reflection-ratio);
    overflow: hidden;
    opacity: .2;
    filter: blur(.7px);
    -webkit-mask-image: linear-gradient(transparent, #000 10%, #0005 40%, transparent 92%);
    mask-image: linear-gradient(transparent, #000 10%, #0005 40%, transparent 92%);
    pointer-events: none;
}
.envelope-reflection > .envelope-arrangement { position: absolute; top: 0; left: 0; transform: scaleY(-1); }
/* Une pluie douce de pétales clairs reste dans la scène, à l’écart des textes. */
.falling-petals {
    display: none;
    position: absolute;
    inset: -10% -6% 0;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
    opacity: 1;
    transition: opacity .2s ease;
}
.motion-active .falling-petals { display: block; }
.falling-petal {
    position: absolute;
    top: 0;
    left: var(--x);
    height: 100%;
    width: calc(clamp(13px, 2.5vw, 21px) * var(--scale));
    opacity: 0;
}
.falling-petal > span {
    display: block;
    width: 100%;
    aspect-ratio: .8;
    border-radius: 75% 25% 65% 35% / 65% 35% 65% 35%;
    background: radial-gradient(ellipse at 30% 25%, #fffef7 10%, #f2e0d9 65%, #d9bdb5 100%);
    box-shadow: inset 1px 1px 2px #ffffffcc, 1px 2px 3px #815b551f;
    transform-origin: 50% 60%;
}
.falling-petal:nth-child(3n) > span { background: radial-gradient(ellipse at 30% 25%, #fffdf4 10%, #f7ead7 65%, #ddcdb7 100%); }
.motion-active .falling-petal { animation: petal-fall var(--duration) var(--delay) linear infinite; }
.motion-active .falling-petal > span { animation: petal-flutter 4s var(--delay) ease-in-out infinite alternate; }
.motion-active .falling-petal:nth-child(even) > span { animation-direction: alternate-reverse; animation-duration: 5s; }
.unsealed .falling-petals { opacity: 0; }
@keyframes petal-fall {
    0% { opacity: 0; transform: translate3d(0, -30px, 0); }
    12% { opacity: .8; }
    80% { opacity: .7; }
    100% { opacity: 0; transform: translate3d(var(--drift), 100%, 0); }
}
@keyframes petal-flutter {
    from { transform: translateX(-8px) rotate(-35deg) rotateY(15deg); }
    to { transform: translateX(8px) rotate(65deg) rotateY(55deg); }
}
/* L’enveloppe fermée conserve le papier, les roses et la dentelle du modèle. */
.paper-envelope {
    position: relative;
    isolation: isolate;
    width: min(580px, 100%);
    aspect-ratio: 4 / 3;
    filter: drop-shadow(0 12px 16px #65584622);
}
.envelope-closed { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .4s ease; }
.envelope-open-button {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.envelope-heading, .envelope-actions { transition: opacity .2s ease; }
.unsealed .envelope-heading, .unsealed .envelope-actions { opacity: 0; }
.unsealed .envelope-open-button, .unsealed .envelope-cta { pointer-events: none; }
.envelope-actions { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; width: min(100%, 420px); gap: 12px; margin-top: 8px; }
.envelope-hint { font: 400 13px/1.6 var(--sans); color: var(--soft-brown); letter-spacing: .015em; margin: 0; }
.hint-touch { display: none; }
.envelope-cta {
    min-width: 220px;
    min-height: 48px;
    padding: 12px 26px;
    border: 1px solid var(--champagne);
    background: #fffdf7;
    color: var(--soft-brown);
    font: 500 14px/1.5 var(--sans);
    letter-spacing: .025em;
    box-shadow: 0 4px 14px #7050390d;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
}
.envelope-cta:hover { background: #efeae0; transform: translateY(-2px); box-shadow: 0 6px 18px #70503916; }
.envelope-cta:active { transform: translateY(0); }
@media (hover: none) and (pointer: coarse) {
    .hint-click { display: none; }
    .hint-touch { display: inline; }
}

/* Une arche ivoire ton sur ton et des orchidées encadrent les textes. */
#wedding-page { width: min(100%, 760px); margin: auto; container-type: inline-size; box-shadow: 0 20px 85px #4c352820; }
.cover {
    --gold: var(--soft-brown);
    position: relative;
    color: var(--soft-brown);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 900px;
    height: clamp(900px, 100svh, 1100px);
    padding: 80px 0 100px;
    overflow: hidden;
    background: var(--ivory) url('arche-dentelle-ivoire-orchidees.png') center / 100% 100% no-repeat;
}
.cover-inner {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    row-gap: clamp(18px, 3cqw, 26px);
    width: 80%;
    max-width: 600px;
    flex: none;
    margin: auto;
    padding: 0 16px;
}
.bismillah { font: 29px/1.6 var(--arabic); color: var(--gold); margin: 0 0 14px; }
.cover-inner .bismillah { font-family: var(--arabic); font-size: clamp(26px, 4.6cqw, 36px); margin: 0; }
.cover-divider { display: block; width: 115px; height: 18px; margin: 0 auto; color: var(--champagne); }
.cover-divider-names { margin-block: 8px; }
.quran-verse { max-width: 100%; min-width: 0; margin: 0; color: var(--soft-brown); font: clamp(22px, 3.8cqw, 28px)/2 var(--arabic); }
.quran-verse span { display: block; }
.cover h1 {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: clamp(5px, 1.2cqw, 9px);
    min-width: 0;
    font: 400 clamp(34px, 10cqw, 76px)/1.18 'Envelope Calligraphy', var(--script);
    color: var(--burgundy);
    margin: 0;
}
h1 small { font: 13px var(--serif); margin-left: -6px; }
.cover h1 em { font: italic clamp(19px, 3.6cqw, 28px) var(--serif); color: var(--muted-brown); }
h1:focus { outline: none; }
.cover-inner .divider { margin: 15px auto; }
.date { font-size: clamp(20px, 3.25cqw, 25px); margin: 0; }
.cover-link {
    position: relative;
    flex: none;
    min-height: 48px;
    margin: 34px auto 0;
    z-index: 4;
    display: flex;
    gap: 15px;
    align-items: center;
    white-space: nowrap;
    font: 10px var(--sans);
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: 12px 20px;
    border: 1px solid var(--champagne);
    background: #fffdf7ed;
    color: var(--soft-brown);
    cursor: pointer;
}
.cover-link span { font-size: 17px; }
main { text-align: center; background: var(--paper); }

/* L’annonce reprend l’ivoire, le bordeaux et des arabesques légères. */
.intro { --gold: var(--soft-brown); position: relative; isolation: isolate; overflow: hidden; padding: 80px 65px 65px; color: var(--soft-brown); background: #fffdf7; }
.intro:before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('fond-annonce-fourni.png') center / 300% 300% no-repeat; pointer-events: none; }
.intro > :not(.intro-corner) { position: relative; z-index: 1; }
.intro-corner { position: absolute; width: 31.25%; max-width: 240px; aspect-ratio: 1; background-image: url('fond-annonce-fourni.png'); background-size: 320% 320%; background-repeat: no-repeat; pointer-events: none; }
.corner-top-left { top: 0; left: 0; background-position: left top; -webkit-mask-image: linear-gradient(135deg, #000 60%, transparent); mask-image: linear-gradient(135deg, #000 60%, transparent); }
.corner-bottom-right { bottom: 0; right: 0; background-position: right bottom; -webkit-mask-image: linear-gradient(315deg, #000 60%, transparent); mask-image: linear-gradient(315deg, #000 60%, transparent); }
.intro h2 { font: 45px/1.4 'Envelope Calligraphy', var(--script); color: var(--soft-brown); margin: 0 35px 44px; }
.intro p { font-size: 25px; font-style: italic; line-height: 2; margin: 25px 0; }
.intro .signature { font-family: 'Envelope Calligraphy', var(--script); margin: 28px 0; color: var(--burgundy); }
.intro .signature-connector { font: italic 400 max(14px, .4em)/1.4 var(--serif); color: var(--soft-brown); }
.intro p.families { margin-top: -6px; color: var(--soft-brown); font-size: 21px; letter-spacing: .02em; }
.intro > .divider { color: var(--champagne); }
.intro:focus-visible { outline: 2px solid var(--gold); outline-offset: -12px; }

/* Quatre grands chiffres alignés sur un bordeaux cerise lumineux. */
.count-section {
    --count-ivory: #fcf6ee;
    --count-champagne: #e7d1bf;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 64px 36px 66px;
    color: var(--count-ivory);
    background: linear-gradient(115deg, #a31b46, #951638 55%, #861132);
}
.count-section:before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('paper-grain.svg'); opacity: .12; pointer-events: none; }
.count-inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
}
.count-inner h2 { color: var(--count-champagne); font: 400 13px/1.6 var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 36px; }
.countdown { display: flex; justify-content: center; margin: 0; }
.countdown > div { flex: 1; min-width: 0; padding: 0 12px; }
.countdown > div + div { border-left: 1px solid #e7d1bf55; }
.countdown b {
    display: block;
    font: 300 clamp(42px, 12cqw, 82px)/1.1 var(--sans);
    font-variant-numeric: tabular-nums;
    color: var(--count-ivory);
}
.countdown small { display: block; color: var(--count-champagne); font: 10px/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin-top: 14px; }

/* La réception se pose directement sur l’ivoire, avec des accents bordeaux. */
.event { position: relative; isolation: isolate; overflow: hidden; padding: 70px 35px 76px; color: var(--ink); background: #fffdf7; }
.event:before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('paper-grain.svg'); opacity: .35; pointer-events: none; }
.event-corner { position: absolute; width: 25%; max-width: 170px; aspect-ratio: 1; background: url('fond-annonce-fourni.png') right bottom / 320% 320% no-repeat; opacity: .45; pointer-events: none; }
.event > h2 { position: relative; z-index: 1; color: var(--burgundy); font: 400 clamp(46px, 7cqw, 56px)/1.3 'Envelope Calligraphy', var(--script); margin: 0 0 36px; }
.reception-card {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto;
}
.courtyard { width: min(100%, 390px); aspect-ratio: 1.2; overflow: hidden; margin: 0 auto 40px; border-radius: 200px 200px 14px 14px; }
.courtyard img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.event-details { display: grid; gap: 28px; width: min(100%, 360px); margin: 0 auto; }
.event-row { display: flex; align-items: flex-start; gap: 16px; }
.detail-icon { flex: 0 0 28px; width: 28px; height: 28px; margin-top: 3px; stroke: var(--burgundy); stroke-width: 1.5; }
.event-row p { flex: 1; min-width: 0; text-align: left; font-size: clamp(23px, 3.5cqw, 26px); line-height: 1.35; margin: 0; }
.event-row p span { display: block; }
.event-time, .event-row .event-address { display: block; margin-top: 7px; color: var(--soft-brown); font: 400 18px/1.5 var(--sans); }
.event-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 34px; }
.reception-route { display: inline-flex; justify-content: center; align-items: center; gap: 18px; min-width: 230px; min-height: 50px; padding: 15px 28px; border: 1px solid var(--burgundy); background: var(--burgundy); color: var(--ivory); font: 500 11px/1.6 var(--sans); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; transition: background .2s; }
.reception-route span { font-size: 16px; }
.reception-route:hover { background: #842d48; }
.calendar-link { min-height: 48px; padding: 12px 24px; border: 1px solid var(--champagne); background: transparent; color: var(--soft-brown); font: 400 13px/1.6 var(--sans); text-decoration: none; cursor: pointer; }
.calendar-choice { width: min(100%, 280px); text-align: center; }
.calendar-link { list-style: none; }
.calendar-link::-webkit-details-marker { display: none; }
.calendar-options { display: grid; gap: 4px; padding: 8px; margin-top: 4px; border: 1px solid #d7c09b; border-radius: 5px; background: var(--ivory); }
.calendar-options a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 12px; color: var(--soft-brown); font: 400 13px/1.6 var(--sans); text-decoration: none; border-radius: var(--button-radius); }
.calendar-options a:hover { color: var(--burgundy); background: #ead8bb55; }
.calendar-options a:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.calendar-help { padding: 6px 12px; text-align: left; color: var(--soft-brown); font: 400 12px/1.6 var(--sans); }
.calendar-help summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.calendar-help summary:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 4px; }
.calendar-help p { margin: 10px 0 4px; font: inherit; }
.calendar-help p a { display: inline; min-height: auto; padding: 0; font: inherit; text-decoration: underline; }
.calendar-link:hover { color: var(--burgundy); }
.reception-route:focus-visible, .calendar-link:focus-visible { outline-color: var(--burgundy); }
/* Une signature bordeaux mate pour conclure le faire-part. */
.closing {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 68px 32px 64px;
    border-top: 1px solid #d9c8b35c;
    color: #faf5ec;
    background: radial-gradient(ellipse at 50% 15%, #862c49 0, #70223c 58%, #5c1b32 100%);
}
.closing:before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('paper-grain.svg'); opacity: .2; pointer-events: none; }
.closing > .blessing { margin: 0 0 28px; color: #faf5ec; font-family: var(--arabic); }
.closing > p:not(.blessing):not(#notice) { margin: 0; font-size: 27px; font-style: italic; line-height: 1.5; }
.closing .signature { margin: 30px 0 12px; color: #faf5ec; font-family: 'Envelope Calligraphy', var(--script); font-size: clamp(44px, 8cqw, 64px); }
.closing .divider { color: #d9c8b3; margin: 18px auto 28px; width: 120px; }
.closing #share { min-height: 48px; max-width: 100%; padding: 14px 24px; border: 1px solid #faf5ec99; color: #faf5ec; background: transparent; font-size: 11px; transition: background .2s, border-color .2s; }
.closing #share:hover { background: #faf5ec10; border-color: #faf5ec; }
.closing #share:focus-visible { outline-color: #faf5ec; }
.closing #notice { margin: 20px 0 0; color: #faf5ec; font: 13px/1.6 var(--sans); }
.closing #notice:empty { display: none; }
@media (max-width: 600px) {
    .closing { padding: 56px 24px 60px; }
    .closing > p:not(.blessing):not(#notice) { font-size: 25px; }
}
.reveal { animation: rise .8s both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
    .envelope-cover { padding: clamp(52px, 9svh, 76px) 24px clamp(64px, 9svh, 76px); }
    .envelope-heading { margin-bottom: 24px; }
    .envelope-heading h2 { font-size: clamp(34px, 9.8vw, 44px); }
    .envelope-couple { font-size: clamp(28px, 8.3vw, 34px); }
    .envelope-ornament { width: 120px; height: 20px; }
    .envelope-heading .eyebrow { font-size: 14px; letter-spacing: .1em; }
    .envelope-hint { font-size: 12px; }
    .envelope-date { font-size: 13px; }
    .hint-click { display: none; }
    .hint-touch { display: inline; }
    /* Les textes respirent dans l’arche et restent dans le flux sur mobile. */
    .cover {
        height: auto;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: clamp(32px, 6svh, 56px) 0 76px;
    }
    .cover-inner { width: 78%; padding: 0; row-gap: clamp(14px, 2.4svh, 22px); }
    .cover-inner .bismillah { font-size: 26px; }
    .quran-verse { max-width: 100%; font-size: 18px; line-height: 1.95; text-wrap: balance; }
    .quran-verse span { display: inline; }
    .cover-divider { width: 88px; height: 14px; margin: 0 auto; }
    .cover-divider-names { margin-block: 6px; }
    .cover h1 {
        flex-direction: row;
        align-items: baseline;
        font-size: clamp(32px, 9.8cqw, 58px);
        line-height: 1.1;
        margin: 0;
    }
    .cover h1 em { font-size: clamp(16px, 4.7cqw, 22px); line-height: 1.1; }
    .date { font-size: 20px; }
    .cover-link {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        flex: none;
        margin: 24px auto 0;
        min-height: 44px;
        font-size: 11px;
        padding: 12px 18px;
    }
    .intro { padding: 62px 45px 45px; }
    .intro h2 { font-size: clamp(30px, 8.6vw, 36px); margin: 0 0 36px; }
    .intro p { font-size: 21px; }
    .intro .signature { font-size: clamp(31px, 9.7vw, 45px); white-space: nowrap; }
    .intro-corner { max-width: 160px; }
    .count-section { padding: 44px 20px 48px; }
    .count-inner h2 { font-size: 11px; letter-spacing: .14em; margin-bottom: 28px; }
    .countdown > div { padding-inline: 4px; }
    .countdown b { font-size: clamp(38px, 12cqw, 56px); }
    .countdown small { font-size: 9px; letter-spacing: .06em; margin-top: 12px; }
    .event { padding: 54px 28px 60px; }
    .event > h2 { margin-bottom: 30px; }
    .event-details { gap: 26px; }
    .event-time, .event-row .event-address { font-size: 17px; }
    .event-actions { margin-top: 30px; }
    .closing .blessing { font-size: 30px; }
}
@media (max-width: 600px) and (max-height: 700px) and (min-height: 480px) {
    .cover { padding: 18px 0 64px; }
    .cover-inner { row-gap: 10px; }
    .cover-link { margin-top: 20px; }
    .envelope-cover { padding-block: 32px 48px; }
    .envelope-orchid { width: min(19vw, 16svh, 140px); }
    .orchid-left { left: -18px; }
    .orchid-right { right: -18px; }
    .envelope-heading { margin-bottom: 16px; }
    .envelope-heading h2 { font-size: clamp(32px, 9vw, 38px); margin-block: 10px 8px; }
    .envelope-date { margin-block: 6px 10px; }
    .envelope-scene { width: min(100%, calc((100svh - 360px) * 1.1)); }
    .envelope-actions { gap: 10px; margin-top: 8px; }
}
@media (max-width: 350px) {
    .signature { font-size: 39px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *:before, *:after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

/* Une transition directe vers le faire-part, puis des accents légers. */
.motion-toggle {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 13px;
    color: var(--soft-brown);
    background: #fffdf7ed;
    border: 1px solid var(--champagne);
    font: 10px var(--sans);
    letter-spacing: .06em;
    box-shadow: 0 3px 15px #5b412616;
    cursor: pointer;
}
.motion-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.motion-toggle .play-mark { display: none; }
.motion-toggle[aria-pressed="true"] .pause-mark { display: none; }
.motion-toggle[aria-pressed="true"] .play-mark { display: block; }
.music-toggle {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 13px;
    color: var(--soft-brown);
    background: #fffdf7ed;
    border: 1px solid var(--champagne);
    font: 10px var(--sans);
    letter-spacing: .06em;
    box-shadow: 0 3px 15px #5b412616;
    cursor: pointer;
}
.music-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.music-toggle[aria-pressed="true"] .music-off { display: none; }
.music-player {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: -1;
    width: 200px;
    height: 200px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.music-player iframe { width: 100%; height: 100%; border: 0; }
.music-notice {
    position: fixed;
    left: 16px;
    bottom: 76px;
    z-index: 30;
    width: min(320px, calc(100vw - 32px));
    padding: 18px 42px 18px 18px;
    color: #705121;
    background: #fffefa;
    border: 1px solid #c6a66b;
    border-radius: 12px;
    box-shadow: 0 8px 28px #70512126;
    font: 13px/1.65 var(--sans);
}
.music-notice p { margin: 0 0 8px; }
.music-notice a { color: #79571f; font-weight: 500; text-underline-offset: 3px; }
.music-notice button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: 24px/1 var(--sans);
    cursor: pointer;
}
.motion-active .greeting-active .envelope-heading { animation: greeting-enter 1s both; }
.motion-active .greeting-active .paper-envelope { animation: greeting-enter .9s .12s both; }
.motion-active .greeting-active .envelope-actions { animation: greeting-enter .9s .3s both; }
.motion-active .unsealed .paper-envelope { animation: none; transform: translateY(-8px) scale(1.015); transition: transform .4s ease-out; }
.motion-active .unsealed { animation: envelope-fade .4s ease-in both; }
.motion-active .reveal { animation: card-arrive .9s ease-out both; }
.motion-active .reveal .cover-inner > * { animation: greeting-enter .9s cubic-bezier(.22, 1, .36, 1) both; }
.motion-active .reveal .cover-inner > :nth-child(1) { animation-delay: .1s; }
.motion-active .reveal .cover-inner > :nth-child(2) { animation-delay: .18s; }
.motion-active .reveal .cover-inner > :nth-child(3) { animation-delay: .3s; }
.motion-active .reveal .cover-inner > :nth-child(4) { animation-delay: .45s; }
.motion-active .reveal .cover-inner > :nth-child(5) { animation-delay: .55s; }
.motion-active .reveal .cover-inner > :nth-child(6) { animation-delay: .65s; }
.motion-active .reveal .cover-inner > :nth-child(7) { animation-delay: .75s; }
.motion-active .reveal .cover-inner > :nth-child(8) { animation-delay: .85s; }
.motion-active .cover-link span { animation: arrow-invitation 2.3s ease-in-out infinite; animation-play-state: paused; }
.motion-active .motion-in-view .cover-link span { animation-play-state: running; }
.motion-active .scroll-reveal {
    opacity: 0;
    transform: translate(var(--reveal-x, 0px), var(--reveal-y, 34px)) scale(var(--reveal-scale, 1));
    transition: opacity .8s ease, transform 1s cubic-bezier(.22, 1, .36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}
.motion-active .scroll-reveal.is-visible,
.motion-active .scroll-reveal:focus-within { opacity: 1; transform: none; }
.motion-active .scroll-reveal:focus-within { transition: none; }
.scroll-reveal:is(h2, .signature) { --reveal-y: 26px; --reveal-scale: .96; }
.scroll-reveal.divider { --reveal-y: 0px; --reveal-scale: .65; }
.countdown > .scroll-reveal { --reveal-y: 30px; --reveal-scale: .92; }
.courtyard.scroll-reveal { --reveal-y: 36px; --reveal-scale: .96; }
.event-row.scroll-reveal { --reveal-x: -26px; --reveal-y: 0px; }
.event-row.scroll-reveal:nth-child(even) { --reveal-x: 26px; }
.motion-active .courtyard.scroll-reveal img { transition: transform 1.6s cubic-bezier(.22, 1, .36, 1); transition-delay: var(--reveal-delay, 0ms); transform: scale(1.12); }
.motion-active .courtyard.is-visible img { transform: scale(1); }
.tab-inactive *, .tab-inactive *:before, .tab-inactive *:after { animation-play-state: paused !important; }
.motion-paused *, .motion-paused *:before, .motion-paused *:after { animation: none !important; transition: none !important; }
.motion-paused .scroll-reveal, .motion-paused .courtyard img { opacity: 1; transform: none; }
@keyframes greeting-enter { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes envelope-fade { to { opacity: 0; } }
@keyframes card-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes arrow-invitation { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Confirmation personnelle, dans le même esprit que le faire-part. */
.rsvp { padding: 84px 35px 76px; background: #f8f4ec; border-top: 1px solid #b7aa9866; }
.rsvp > h2 { color: var(--burgundy); font: 400 clamp(40px, 6.5cqw, 50px)/1.35 'Envelope Calligraphy', var(--script); margin: 0 0 16px; }
.rsvp-intro { max-width: 420px; margin: 0 auto; color: var(--soft-brown); font: 400 14px/1.7 var(--sans); }
.rsvp-card { max-width: 620px; margin: 36px auto 0; padding: 28px 24px; background: #fffdf7; border-radius: 14px; box-shadow: 0 8px 32px #79665308; }
#rsvp-loading, #rsvp-connection-error { color: var(--soft-brown); font: 400 15px/1.6 var(--sans); margin: 15px 0; }
#rsvp-frame { display: block; width: 100%; min-height: 360px; height: 540px; border: 0; background: #fffdf7; }
@media(max-width:600px) { .rsvp { padding: 64px 18px 56px; } .rsvp-card { margin-top: 30px; padding: 24px 16px; border-radius: 12px; } .rsvp > h2 { font-size: clamp(36px, 10cqw, 44px); } }
.intro .guest-greeting { font-size: 18px; color: var(--gold); font-style: normal; margin: 0 0 22px; }
.intro .guest-companions { max-width: 480px; margin: 0 auto 28px; padding: 16px 18px; border-block: 1px solid var(--champagne); }
.intro .guest-companions p { font-size: 17px; font-style: normal; line-height: 1.5; margin: 0 0 12px; color: var(--soft-brown); }
.guest-companions ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin: 0; padding: 0; list-style: none; }
.guest-companions li { max-width: 100%; padding: 4px 12px; background: #efeae0; border-radius: 3px; font-size: 19px; line-height: 1.5; overflow-wrap: anywhere; }
@media(max-width:600px) { .intro .guest-companions { padding: 14px 0; } .guest-companions li { font-size: 18px; } }

/* Choix de la langue, en haut de l’écran comme les autres commandes. */
.lang-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 20;
    min-height: 40px;
    padding: 8px 16px;
    color: var(--burgundy);
    background: #fffdf7ed;
    border: 1px solid var(--champagne);
    font: 20px/1.5 var(--arabic);
    box-shadow: 0 3px 15px #5b412616;
    cursor: pointer;
}
.lang-toggle:lang(fr) { font: 500 11px/1.2 var(--sans); letter-spacing: .08em; }

/* Version arabe : une seule police lisible, sans capitales ni italiques latines. */
html[lang="ar"] body,
html[lang="ar"] body :not(svg, svg *, .lang-toggle) {
    font-family: var(--arabic) !important;
    font-style: normal !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
html[lang="ar"] .countdown b { font-family: var(--sans) !important; }
html[lang="ar"] .countdown > div + div { border-left: 0; border-right: 1px solid #e7d1bf55; }
/* Tailles et interlignes adaptés aux proportions calligraphiques d’Amiri. */
html[lang="ar"] .eyebrow { font-size: 21px; }
html[lang="ar"] .envelope-heading .eyebrow { font-size: clamp(26px, 3vw, 30px); }
html[lang="ar"] .envelope-heading h2 { font-size: clamp(38px, 10vw, 50px); line-height: 1.5; }
html[lang="ar"] .envelope-couple { font-size: clamp(38px, 10vw, 52px); line-height: 1.5; }
html[lang="ar"] .envelope-date,
html[lang="ar"] .envelope-hint { font-size: 22px; }
html[lang="ar"] .envelope-cta,
html[lang="ar"] .cover-link,
html[lang="ar"] .motion-toggle,
html[lang="ar"] .music-toggle,
html[lang="ar"] .reception-route,
html[lang="ar"] .calendar-link,
html[lang="ar"] .calendar-options a,
html[lang="ar"] .rsvp-card button,
html[lang="ar"] .closing #share { font-size: 20px; line-height: 1.6; }
html[lang="ar"] .motion-toggle,
html[lang="ar"] .music-toggle { font-size: 17px; }
html[lang="ar"] .cover h1 { font-size: clamp(44px, 12cqw, 80px); line-height: 1.5; }
html[lang="ar"] .date { font-size: clamp(24px, 4cqw, 30px); }
html[lang="ar"] .intro h2,
html[lang="ar"] .event > h2,
html[lang="ar"] .rsvp > h2 { font-size: clamp(36px, 8cqw, 48px); line-height: 1.6; }
html[lang="ar"] .intro p { font-size: clamp(26px, 5.8cqw, 30px); line-height: 1.9; }
html[lang="ar"] .intro p.families { font-size: clamp(23px, 5cqw, 26px); }
html[lang="ar"] .intro .signature { font-size: clamp(40px, 10cqw, 56px); line-height: 1.5; }
html[lang="ar"] .intro .signature-connector { font-size: .5em; }
html[lang="ar"] .count-inner h2 { font-size: 22px; }
html[lang="ar"] .countdown small { font-size: 17px; }
html[lang="ar"] .event-row p { font-size: clamp(25px, 4cqw, 29px); }
html[lang="ar"] .event-time,
html[lang="ar"] .event-row .event-address { font-size: 21px; }
html[lang="ar"] .rsvp-intro,
html[lang="ar"] .rsvp-card p { font-size: 19px; }
html[lang="ar"] .closing > p:not(.blessing):not(#notice) { font-size: clamp(27px, 6cqw, 32px); line-height: 1.7; }
html[lang="ar"] .closing .signature { font-size: clamp(40px, 9cqw, 56px); line-height: 1.5; }
html[lang="ar"] .closing #notice { font-size: 17px; }
html[lang="ar"] .cover h1 { gap: .3em; }
html[lang="ar"] .event-row p,
html[lang="ar"] .calendar-help { text-align: right; }
html[lang="ar"] .calendar-help { font-size: 17px; }
html[lang="ar"] .cover h1 em { font-size: .5em; }
html[lang="ar"] .event-row.scroll-reveal { --reveal-x: 26px; }
html[lang="ar"] .event-row.scroll-reveal:nth-child(even) { --reveal-x: -26px; }


/* Esperluette calligraphique entre les prénoms arabes. */
html[lang="ar"] body .couple-ampersand {
    display: inline-block;
    font-family: 'Envelope Calligraphy', var(--script) !important;
    font-style: normal !important;
    font-weight: 400;
    line-height: 1.2;
    direction: ltr;
    unicode-bidi: isolate;
    vertical-align: .08em;
}
html[lang="ar"] .envelope-couple .couple-ampersand { font-size: .85em; margin-inline: .12em; }
html[lang="ar"] .cover h1 .couple-ampersand { font-size: .8em; align-self: center; }
html[lang="ar"] .intro .signature .couple-ampersand { font-size: .85em; margin-inline: .15em; }


/* Annonce du mariage au nom des parents. */
.intro h2.intro-hosts { margin: 0 0 26px; font: 400 clamp(23px, 4vw, 30px)/1.6 var(--serif); }
.intro-hosts .host-name { display: block; font: 400 clamp(36px, 6vw, 48px)/1.6 'Envelope Calligraphy', var(--script); }
.intro .signature.wedding-announcement { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 1.5vw, 16px); white-space: normal; }
.wedding-announcement .signature-person { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.wedding-announcement .person-name { display: block; }
.wedding-announcement .person-title,
.wedding-announcement .person-surname { display: block; color: var(--soft-brown); font: 400 clamp(14px, 2vw, 20px)/1.6 var(--serif); }
.intro .intro-program { margin-top: 30px; }
.intro .intro-program span { font-size: .85em; }
html[lang="ar"] .intro h2.intro-hosts { font-size: 28px; line-height: 1.7; }
html[lang="ar"] .intro-hosts .host-name { font-size: clamp(32px, 7vw, 42px); line-height: 1.7; }
html[lang="ar"] .wedding-announcement .person-title,
html[lang="ar"] .wedding-announcement .person-surname { font-size: clamp(19px, 3vw, 24px); }
html[lang="ar"] .intro .signature.wedding-announcement .couple-ampersand { margin-inline: 0; }
