/* ==========================================================================
   Design « Éditorial » — magazine de mode : couverture, sommaire, double page
   Papier couché crème, encre noire, un rouge sang-de-bœuf
   ========================================================================== */

:root {
    --paper: #f3efe6;
    --paper-2: #ebe5d8;
    --ink: #161514;
    --mute: #57524b;
    --accent: #8a1c2b;
    --rule: rgba(22, 21, 20, .85);
    --hair: rgba(22, 21, 20, .22);
    --ease: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    background: var(--paper); color: var(--ink); font-family: var(--text);
    font-size: 1.1rem; line-height: 1.65; overflow-x: hidden; font-optical-sizing: auto;
}
::selection { background: var(--accent); color: #fff; }
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; text-decoration: none; }
.skip-link:focus { top: .5rem; color: var(--paper); }

.e-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* Petites capitales des rubriques, dans la police de texte (lisible) */
.e-issue, .e-toc, .e-rubric, .e-kick, .e-look-n, .e-box-title, .e-ours dt {
    font-family: var(--text); font-weight: 700; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
}

/* --- Couverture --------------------------------------------------------- */
.e-cover { padding-top: 1rem; }
.e-issue { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1.5rem; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.e-issue span:first-child { color: var(--accent); }
.e-mast {
    font-family: var(--display); font-weight: 400; line-height: .86; letter-spacing: -.025em; margin: .15em 0 .1em;
    font-size: clamp(3rem, calc(165vw / var(--len2)), 7rem); text-align: center; overflow-wrap: anywhere;
}
.e-mast > span { display: block; }
.e-mast i { font-style: italic; color: var(--accent); }
@media (min-width: 900px) {
    .e-mast { font-size: clamp(4rem, calc(176vw / var(--len)), 11rem); white-space: nowrap; overflow-wrap: normal; }
    .e-mast > span { display: inline; }
}
@media (min-width: 1240px) { .e-mast { font-size: min(calc(2180px / var(--len)), 11rem); } }

/* Sommaire = navigation */
.e-toc { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; padding: .75rem 0; border-top: 3px double var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: clamp(1.2rem, 3vw, 2rem); }
.e-toc-title { color: var(--accent); }
.menu-links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.menu-links a { text-decoration: none; letter-spacing: .1em; }
.menu-links a b { color: var(--accent); font-weight: 700; margin-right: .35rem; font-variant-numeric: tabular-nums; }
.menu-links a:hover, .menu-links a.is-active { text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 1px; }
@media (max-width: 559.98px) {
    .e-toc-title { width: 100%; }
    .menu-links { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}

.e-cover-grid { display: grid; gap: clamp(1.2rem, 3vw, 2.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .e-cover-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: stretch; } }
.e-photo { position: relative; margin: 0; background: var(--paper-2); aspect-ratio: 4 / 5; overflow: hidden; }
@media (min-width: 900px) { .e-photo { aspect-ratio: auto; min-height: 640px; max-height: 86vh; } }
.e-photo .carousel, .e-photo .carousel-inner, .e-photo .carousel-item { height: 100%; }
.e-photo .carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.e-photo .carousel-indicators { margin: 0; left: auto; right: 1.2rem; bottom: 1.2rem; gap: .5rem; }
.e-photo .carousel-indicators [data-bs-target] { width: 26px; height: 2px; margin: 0; border: 0; background: #fff; opacity: .55; }
.e-photo .carousel-indicators .active { opacity: 1; }
/* Étiquette d'abonné collée sur la couverture */
.e-label {
    position: absolute; left: clamp(.8rem, 2vw, 1.4rem); bottom: clamp(.8rem, 2vw, 1.4rem); z-index: 3; max-width: calc(100% - 6rem);
    background: var(--paper); color: var(--ink); padding: .7rem 1rem .75rem; font-family: var(--display); font-size: clamp(1.25rem, 3vw, 1.6rem); line-height: 1.15;
    box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .55);
}
.e-label span { display: block; font-family: var(--text); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: .25rem; }

/* Titres de couverture */
.e-lines { display: flex; flex-direction: column; }
.e-line { margin: 0; padding: 1.1rem 0; border-top: 1px solid var(--rule); font-family: var(--display); font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.12; }
.e-line:first-child { border-top: 0; padding-top: 0; }
.e-line small { display: block; font-family: var(--text); font-size: 1.05rem; color: var(--mute); margin-top: .3rem; }
.e-kick { display: block; color: var(--accent); margin-bottom: .45rem; }
.e-line--big { font-size: clamp(3.4rem, 9vw, 6.2rem); line-height: .92; letter-spacing: -.02em; }
.e-line--big sup { font-size: .35em; top: -1.3em; }
.e-line--big em { display: block; font-style: italic; color: var(--accent); }
.e-cta {
    margin-top: auto; align-self: flex-start; display: inline-flex; gap: .7rem; align-items: center; padding: .95rem 1.6rem;
    background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; letter-spacing: .02em;
    transition: background-color .3s var(--ease);
}
.e-cta:hover { background: var(--accent); color: #fff; }
@media (max-width: 899.98px) { .e-cta { margin-top: 1.2rem; } }

/* Mouvement d'entrée unique : la couverture se dévoile */
@media (prefers-reduced-motion: no-preference) {
    .js .e-photo { animation: e-unveil 1.2s var(--ease) both; }
}
@keyframes e-unveil { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* --- Pages intérieures -------------------------------------------------- */
.e-sec { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-bottom: 1px solid var(--rule); }
.e-rubric { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; }
.e-rubric span { display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .4rem; background: var(--accent); color: #fff; letter-spacing: .04em; }
.e-rubric::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.e-h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.02em; margin: 0 0 1.2rem; max-width: 14em; }
.e-h2 i { font-style: italic; color: var(--accent); }
.e-h2 span { font-style: italic; }
.e-deck { font-size: clamp(1.2rem, 2.4vw, 1.45rem); font-style: italic; line-height: 1.45; color: var(--ink); max-width: 36em; margin: 0 0 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--hair); }

.e-spread { display: grid; gap: 2.5rem; }
@media (min-width: 900px) {
    .e-spread { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-areas: "cols pull" "cols box"; column-gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
    .e-cols { grid-area: cols; }
    .e-spread .e-pull { grid-area: pull; }
    .e-box { grid-area: box; }
}
.e-cols { font-size: clamp(1.15rem, 1.8vw, 1.3rem); line-height: 1.7; max-width: 34em; }
.e-cols p { margin: 0 0 1em; }
.e-drop::first-letter {
    float: left; font-family: var(--display); font-size: 5.2em; line-height: .78; padding: .06em .1em 0 0; color: var(--accent);
}

/* Citations */
.e-pull { margin: 0; padding: 1.4rem 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule); }
.e-pull p { font-family: var(--display); font-style: italic; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; margin: 0; text-wrap: balance; hyphens: none; }
.e-pull p::before { content: "«\00a0"; color: var(--accent); }
.e-pull p::after { content: "\00a0»"; color: var(--accent); }
.e-pull footer { margin-top: .8rem; font-size: .95rem; font-weight: 600; color: var(--mute); }
.e-pull footer::before { content: "— "; }

/* Encadré compte à rebours */
.e-box { background: var(--ink); color: var(--paper); padding: 1.4rem 1.5rem 1.6rem; }
.e-box-title { margin: 0 0 1rem; color: #f0c9cf; }
.countdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font-variant-numeric: tabular-nums; }
.countdown .cell { padding: 0 .8rem; border-left: 1px solid rgba(243, 239, 230, .35); text-align: center; min-width: 0; }
.countdown .cell:first-child { border-left: 0; padding-left: 0; }
.countdown .cell:last-child { padding-right: 0; }
.countdown b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: 1; }
.countdown span { display: block; font-size: .95rem; font-style: italic; margin-top: .3rem; }

/* Agenda */
.e-sec--agenda { background: var(--paper-2); }
.programme-list { margin: 1rem 0 0; display: grid; gap: 0; }
@media (min-width: 760px) { .programme-list { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); column-gap: clamp(2rem, 5vw, 4rem); } }
.programme-row { padding: 1.4rem 0 1.6rem; border-top: 3px solid var(--ink); display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; }
.programme-list dt { font-family: var(--display); font-weight: 400; font-size: clamp(2.8rem, 7vw, 4rem); line-height: .9; color: var(--accent); font-variant-numeric: tabular-nums; }
.programme-list dd { margin: 0; font-size: 1.1rem; padding-top: .3rem; }
.programme-list strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; margin-bottom: .1rem; }
.programme-list small { display: block; font-size: 1.05rem; color: var(--mute); margin-top: .4rem; font-style: italic; }
@media (max-width: 419.98px) { .programme-row { grid-template-columns: 1fr; gap: .4rem; } }

/* Mode : citation + looks numérotés */
.e-mode { display: grid; gap: 2.5rem; margin-top: 1rem; }
@media (min-width: 900px) { .e-mode { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); column-gap: clamp(2rem, 5vw, 4.5rem); align-items: start; } }
.e-pull--mode p { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.e-looks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
@media (min-width: 600px) { .e-looks { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
.e-looks li { padding: 1.2rem 0 1.4rem; border-top: 1px solid var(--rule); }
.e-look-n { display: block; color: var(--accent); margin-bottom: .35rem; }
.e-looks h3 { font-family: var(--display); font-weight: 400; font-size: 1.75rem; line-height: 1.1; margin: 0 0 .35rem; }
.e-looks p { margin: 0; }

/* --- Bulletin-réponse -------------------------------------------------- */
.e-coupon { position: relative; max-width: 760px; margin: 0 auto; background: #fbf9f4; border: 2px dashed var(--ink); padding: clamp(1.6rem, 5vw, 3.2rem); }
.e-scissors { position: absolute; top: -14px; left: 2rem; width: 26px; height: 26px; padding: 2px; background: var(--paper); fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.e-coupon .e-h2 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.rsvp-deadline { font-style: italic; margin: 0 0 2rem; color: var(--ink); }
.rsvp-note { margin: 0; font-size: 1.1rem; }
.rsvp-done { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 1.2rem 0 1.4rem; margin-bottom: 1.8rem; }
.done-head { font-family: var(--display); font-size: 2rem; line-height: 1.1; margin: 0 0 .4rem; }
.done-text { margin: 0 0 1rem; }
.btn-link-gold { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .3em; cursor: pointer; }
.btn-link-gold:hover { color: var(--ink); }
.rsvp-form .field { border: 0; padding: 0; margin: 0 0 1.8rem; min-width: 0; }
.rsvp-form label:not(.guest-pill), .rsvp-form legend {
    float: none; display: block; width: auto; padding: 0; margin: 0 0 .5rem;
    font-family: var(--text); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
}
.rsvp-form small { font-weight: 400; letter-spacing: 0; text-transform: none; font-style: italic; color: var(--mute); font-size: .95rem; }
/* Champs façon lignes de coupon à remplir */
.form-control.engraved {
    border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink);
    padding: .6rem .1rem; font-family: var(--text); font-size: 1.1rem;
}
.form-control.engraved:focus { box-shadow: none; border-bottom: 2px solid var(--accent); background: transparent; }
.form-control.engraved[readonly] { border-bottom-style: dotted; font-family: var(--display); font-size: clamp(1.6rem, 5vw, 2.1rem); padding-top: 0; }
textarea.form-control.engraved {
    border: 1px solid var(--hair); padding: .7rem .9rem; min-height: 7rem; resize: vertical;
    background: repeating-linear-gradient(transparent 0 calc(1.65em - 1px), var(--hair) calc(1.65em - 1px) 1.65em) content-box, #fff;
    line-height: 1.65;
}
textarea.form-control.engraved:focus { border: 1px solid var(--accent); }
.guests-row { display: flex; flex-wrap: wrap; gap: .6rem; }
/* Cases à cocher de bulletin */
.guest-pill {
    display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-weight: 600; font-size: 1.1rem; padding: .3rem .2rem;
}
.guest-pill::before { content: ""; width: 1.5rem; height: 1.5rem; border: 2px solid var(--ink); background: #fff; display: grid; place-items: center; transition: background-color .2s; }
.btn-check:checked + .guest-pill::before {
    background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23f3efe6' stroke-width='2.2'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.guests-row .guest-pill { margin-right: 1rem; }
.btn-check:focus-visible + .guest-pill { outline: 2px solid var(--accent); outline-offset: 3px; }
.hint { font-size: .98rem; font-style: italic; color: var(--mute); margin: .6rem 0 0; }
.choice { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 520px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; min-height: 7rem; padding: 1.1rem 1.3rem;
    border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer;
    transition: background-color .3s var(--ease), color .3s var(--ease);
}
.choice-tile:first-child { background: var(--ink); color: var(--paper); }
.choice-head { font-family: var(--text); font-weight: 700; font-size: 1.45rem; line-height: 1.1; }
.choice-text { font-size: 1.02rem; }
.choice-current { margin-top: auto; padding-top: .5rem; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.choice-tile:hover, .choice-tile:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; }
.rsvp-form.is-sending .choice-tile { opacity: .55; pointer-events: none; }
.rsvp-errors { border-left: 4px solid var(--accent); background: #f6e3e5; color: #6d1522; padding: .9rem 1.1rem; margin-bottom: 1.6rem; }
.rsvp-errors p { margin: 0; }

/* --- Colophon ----------------------------------------------------------- */
.e-foot { padding: clamp(3rem, 7vw, 5rem) 0 clamp(5rem, 8vw, 4rem); background: var(--ink); color: var(--paper); }
.e-foot-mast { font-family: var(--display); font-size: clamp(2.6rem, 8vw, 5rem); line-height: 1; margin: 0 0 1.5rem; }
.e-foot-mast i { color: #e7a9b2; }
.e-ours { display: grid; gap: 1rem; margin: 0 0 1.8rem; padding-top: 1.2rem; border-top: 1px solid rgba(243, 239, 230, .35); }
@media (min-width: 760px) { .e-ours { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.e-ours dt { color: #e7a9b2; margin-bottom: .2rem; }
.e-ours dd { margin: 0; }
.e-foot-top { color: var(--paper); font-weight: 600; text-underline-offset: .3em; }
.e-foot-top:hover { color: #e7a9b2; }
.e-foot :focus-visible { outline-color: #e7a9b2; }
