/* ==========================================================================
   Mariage Faire-Part — Design system
   Palette grenat chaud sur papier clair, Fraunces (display) + Public Sans (corps)
   ========================================================================== */

/* Polices hébergées sur le site (pas de requête vers Google : RGPD). */
@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("/assets/fonts/fraunces-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("/assets/fonts/publicsans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("/assets/fonts/publicsans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --ground: #FBF8F4;
    --ground-raised: #FFFFFF;
    --ink: #241B1D;
    --ink-soft: #6B5D5A;
    --accent: #7A2331;
    --accent-hover: #611B26;
    --accent-soft: #F0DCD9;
    --sage: #5C6B54;
    --sage-soft: #E4E9DE;
    --line: #E4DDD3;
    --dark-ground: #241B1D;
    --dark-ink: #F3ECE6;
    --error: #B3261E;
    --error-soft: #FBE7E5;
    --success: #3D6B3D;
    --success-soft: #E4EDE1;
    --shadow-sm: 0 1px 2px rgba(36, 27, 29, 0.06);
    --shadow-md: 0 1px 2px rgba(36, 27, 29, 0.06), 0 8px 24px -8px rgba(36, 27, 29, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Le site force volontairement le thème clair : un faire-part de mariage a
   une identité visuelle fixe, comme une invitation papier — elle ne doit
   pas changer selon le réglage sombre/clair du téléphone de l'invité. */

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 500;
    text-wrap: balance;
    margin: 0 0 0.4em;
    line-height: 1.15;
}

h1 { font-size: clamp(30px, 4vw, 42px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 18px; font-weight: 600; }

p { margin: 0 0 1em; }

a {
    color: var(--accent);
}

.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

/* ---------- Layout ---------- */

.site-header {
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    font-family: "Fraunces", serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.logo-mark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    position: relative;
    flex-shrink: 0;
}
.logo-mark::before, .logo-mark::after {
    content: "";
    position: absolute;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    top: 2.5px;
}
.logo-mark::before { left: 1px; }
.logo-mark::after { right: 1px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a:not(.btn) {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
}
.nav-links a:not(.btn):hover { color: var(--ink); }

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--accent);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    flex-shrink: 0;
}
.nav-burger span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: #FBF4F1;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 24px 20px;
    border-top: 1px solid var(--line);
}
.nav-mobile a {
    padding: 12px 4px;
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a.btn { text-align: center; margin-top: 10px; border-bottom: none; }

main, .page {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

main.wide, .page.wide {
    max-width: 1080px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 32px;
}
.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    text-decoration: none;
    color: inherit;
}
.blog-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--accent-soft);
}
.blog-card-body { padding: 20px; }
.article-cover {
    height: 280px;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    background-color: var(--accent-soft);
    margin-bottom: 24px;
}
@media (max-width: 720px) {
    .blog-grid { grid-template-columns: 1fr; }
}

main.editor-main {
    max-width: none;
    margin: 0;
    padding: 0;
}

.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 64px;
    background: var(--ground-raised);
    color: var(--ink-soft);
    font-size: 14px;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

.site-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 24px 36px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}
.site-footer-brand .logo { color: var(--ink); margin-bottom: 12px; }
.site-footer-brand p { margin: 0; max-width: 320px; line-height: 1.6; }

.site-footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.site-footer-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 4px;
}

.site-footer-bottom {
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
}

@media (max-width: 720px) {
    .site-footer-inner {
        grid-template-columns: 1fr 1fr;
        padding-top: 36px;
        gap: 28px 20px;
    }
    .site-footer-brand { grid-column: 1 / -1; }
}

.nav-links a.nav-admin,
.nav-mobile a.nav-admin {
    color: var(--accent);
    font-weight: 600;
}

.legal-page {
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.7;
}
.legal-page h2 { margin-top: 36px; }
.legal-page h3 { margin-top: 20px; font-size: 17px; }
.legal-page p, .legal-page li { color: var(--ink-soft); }
.legal-page strong { color: var(--ink); }
.legal-page .legal-updated { font-size: 13.5px; }

.rsvp-privacy-note {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--ink-soft);
    text-align: center;
}

/* Champ piège anti-robots : invisible pour les humains, rempli par les bots. */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Buttons ---------- */

.btn, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    line-height: 1.2;
}
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary, button:not(.btn-ghost):not(.btn-text):not(.danger-small) {
    background: var(--accent);
    color: #FBF4F1;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover, button:not(.btn-ghost):not(.btn-text):not(.danger-small):hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink-soft); background: var(--accent-soft); }

.btn-text {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    font-weight: 600;
    box-shadow: none;
}
.btn-text:hover { text-decoration: underline; transform: none; }

.btn-block { width: 100%; }

button.danger, .danger, .btn-danger {
    background: var(--error);
    color: #FCEEED;
}
button.danger:hover, .danger:hover, .btn-danger:hover { background: #952019; }

button.danger-small {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--line);
    padding: 6px 12px;
    font-size: 13px;
    box-shadow: none;
}
button.danger-small:hover { border-color: var(--error); background: var(--error-soft); transform: none; }

/* ---------- Forms ---------- */

form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

label {
    font-weight: 600;
    font-size: 14px;
    margin-top: 14px;
    margin-bottom: 6px;
}

label:has(input[type="checkbox"]), label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

input, select, textarea {
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    width: 100%;
    background: var(--ground-raised);
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: 0.7; }
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="checkbox"], input[type="radio"] {
    width: auto;
    accent-color: var(--accent);
}
input[type="color"] {
    padding: 4px;
    height: 44px;
    width: 64px;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 18px 0;
}
fieldset legend {
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: 15px;
    padding: 0 8px;
    color: var(--accent);
}

/* Masqué visuellement mais lu par les lecteurs d'écran. */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Création d'un faire-part (étape unique) ---------- */
.create-page { max-width: 520px; margin: 0 auto; }
.create-intro { color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; margin: 4px 0 20px; }
.create-card { padding: 28px 26px; }
.create-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin: 22px 0 8px;
}
.create-card .create-label:first-of-type { margin-top: 0; }
.create-optional { font-weight: 400; color: var(--ink-soft); }
.create-names-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}
.create-names-row input { font-size: 17px; text-align: center; }
.create-amp {
    font-family: "Fraunces", serif;
    font-size: 26px;
    color: var(--accent);
    line-height: 1;
}
.create-card .template-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.create-submit { margin-top: 28px; padding: 15px; font-size: 16px; }
.create-reassure { text-align: center; font-size: 13px; color: var(--ink-soft); margin: 12px 0 0; }
@media (max-width: 480px) {
    .create-card { padding: 22px 16px; }
    .create-names-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .create-amp { text-align: center; font-size: 22px; }
}

.field-hint {
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: -2px;
    margin-bottom: 4px;
}

/* ---------- Alerts ---------- */

.error, .success {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 500;
    margin-bottom: 12px;
}
.error { background: var(--error-soft); color: var(--error); }
.success { background: var(--success-soft); color: var(--success); }

/* ---------- Cards ---------- */

.card {
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.wedding-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wedding-card {
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.wedding-card h2 {
    font-size: 19px;
    margin-bottom: 4px;
}

.wedding-card .meta {
    font-size: 13.5px;
    color: var(--ink-soft);
}

.rsvp-notice {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sage);
}
.rsvp-notice .pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sage);
    box-shadow: 0 0 0 4px var(--sage-soft);
    flex-shrink: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}
.status-pill.published { background: var(--sage-soft); color: var(--sage); }
.status-pill.draft { background: var(--line); color: var(--ink-soft); }
.status-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.card-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
/* Boutons d'action d'une carte de faire-part (tous au même gabarit). */
.card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--ground-raised);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.card-btn svg { flex-shrink: 0; }
.card-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: none; }
.card-btn-primary { background: var(--accent); border-color: var(--accent); color: #FBF4F1; }
.card-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #FBF4F1; }
.card-btn-whatsapp:hover { border-color: #25D366; color: #128C3E; background: #E6F8ED; }
/* Spécificité (0,3,1) pour égaler/battre la règle générique
   button:not(.btn-ghost):not(.btn-text):not(.danger-small) qui remplit en grenat. */
.card-links button.card-btn:not(.btn-ghost) { background: var(--ground-raised); color: var(--ink); box-shadow: none; }
.card-links button.card-btn:not(.btn-ghost):hover { background: var(--accent-soft); color: var(--accent); }
.card-links button.card-btn-danger:not(.btn-ghost) { color: var(--error); }
.card-links button.card-btn-danger:not(.btn-ghost):hover { background: var(--error-soft); color: var(--error); }
.card-links button.card-btn.is-copied:not(.btn-ghost) { background: var(--success-soft); color: var(--success); }
.card-btn-danger:hover { border-color: var(--error); color: var(--error); background: var(--error-soft); }
.card-btn.is-copied { border-color: var(--success); color: var(--success); background: var(--success-soft); }

@media (max-width: 620px) {
    .wedding-card { flex-direction: column; align-items: stretch; gap: 16px; }
    .card-links { gap: 8px; }
    .card-btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
}

.empty-state {
    text-align: center;
    padding: 56px 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    color: var(--ink-soft);
}

/* ---------- Stats ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin: 0 0 28px;
}

.stat {
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}
.stat .num {
    font-family: "Fraunces", serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    display: block;
}
.stat .lbl {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
}

/* fallback for old <p><strong> stat markup */
.stats p {
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin: 0;
    font-size: 14px;
    color: var(--ink-soft);
}
.stats p strong {
    display: block;
    font-family: "Fraunces", serif;
    font-size: 24px;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* ---------- Tables ---------- */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--ground-raised);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    background: var(--ground);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--accent-soft); }

/* ---------- Landing page ---------- */

.hero {
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 24px 60px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
}

.hero h1 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -0.01em; }
.hero h1 em { font-style: italic; color: var(--accent); }

.hero-sub {
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 46ch;
    margin: 18px 0 30px;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-cta .secondary {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}

.trust-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 34px;
    font-size: 13.5px;
    color: var(--ink-soft);
    flex-wrap: wrap;
}
.trust-row .dot { color: var(--line); }

.hero-visual {
    position: relative;
    height: 400px;
}

.card-invite {
    position: absolute;
    width: 260px;
    background: var(--ground-raised);
    border-radius: 4px;
    box-shadow: 0 24px 60px -20px rgba(36, 27, 29, 0.35), 0 2px 8px rgba(36, 27, 29, 0.08);
    padding: 34px 26px;
    text-align: center;
    left: 50%;
}
.card-invite.back { top: 30px; transform: translateX(-50%) rotate(-7deg); opacity: 0.55; z-index: 1; }
.card-invite.front { top: 0; transform: translateX(-50%) rotate(3deg); z-index: 2; }
.card-invite .initials { font-family: "Fraunces", serif; font-style: italic; font-size: 14px; color: var(--accent); }
.card-invite .names { font-family: "Fraunces", serif; font-size: 26px; margin: 12px 0 8px; line-height: 1.15; }
.card-invite .rule { width: 28px; height: 1px; background: var(--accent); margin: 12px auto; }
.card-invite .date-line { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }

.badge-float {
    position: absolute;
    z-index: 3;
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 13px;
    box-shadow: var(--shadow-md);
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
}
.badge-float.rsvp { bottom: 30px; right: -6px; }
.badge-float.rsvp .pulse {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--sage); box-shadow: 0 0 0 4px var(--sage-soft);
}
.badge-float.count { bottom: 110px; left: -14px; flex-direction: column; align-items: flex-start; gap: 1px; }
.badge-float.count .num { font-family: "Fraunces", serif; font-size: 19px; font-weight: 600; color: var(--accent); }
.badge-float.count .lbl { font-size: 10.5px; font-weight: 500; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }

@media (prefers-reduced-motion: no-preference) {
    .card-invite.front { animation: float-front 7s ease-in-out infinite; }
    .card-invite.back { animation: float-back 7s ease-in-out infinite; }
    .badge-float.rsvp { animation: float-badge 5s ease-in-out infinite; }
    .badge-float.count { animation: float-badge 6s ease-in-out infinite 0.5s; }
}
@keyframes float-front { 0%, 100% { transform: translateX(-50%) rotate(3deg) translateY(0); } 50% { transform: translateX(-50%) rotate(2deg) translateY(-8px); } }
@keyframes float-back { 0%, 100% { transform: translateX(-50%) rotate(-7deg) translateY(0); } 50% { transform: translateX(-50%) rotate(-8deg) translateY(-5px); } }
@keyframes float-badge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.section {
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 24px;
}
.section-head {
    max-width: 540px;
    margin: 0 auto 52px;
    text-align: center;
}
.section-head .eyebrow { display: block; }
.section-head p { color: var(--ink-soft); font-size: 16px; margin-top: 10px; }

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.step { background: var(--ground-raised); padding: 30px 24px; }
.step .n { font-family: "Fraunces", serif; font-style: italic; font-size: 14px; color: var(--accent); }
.step h3 { margin-top: 14px; }
.step p { font-size: 14px; color: var(--ink-soft); margin-top: 8px; margin-bottom: 0; }


.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature {
    padding: 28px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--ground-raised);
}
.feature .icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    margin-bottom: 16px;
}
.feature h3 { color: var(--ink); font-size: 16px; }
.feature p { font-size: 14px; color: var(--ink-soft); margin-top: 8px; margin-bottom: 0; }

.final-cta { text-align: center; }
.final-cta .btn-primary { padding: 15px 30px; font-size: 15.5px; }
.gratuit-note { margin-top: 16px; font-size: 13px; color: var(--ink-soft); }

@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; padding-top: 20px; gap: 40px; }
    .hero-visual { height: 320px; order: -1; }
    .card-invite { width: 220px; padding: 26px 20px; }
    .card-invite .names { font-size: 22px; }
    .steps { grid-template-columns: 1fr; }
    .step { border-bottom: 1px solid var(--line); }
    .feature-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    .nav-mobile:not([hidden]) { display: flex; }
}

/* ---------- Auth pages ---------- */

.auth-page {
    max-width: 400px;
}
.auth-page .card { margin-top: 8px; }
.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14.5px;
    color: var(--ink-soft);
}

/* ---------- Public invitation page ---------- */

.invitation-page {
    text-align: center;
    max-width: 560px;
}
.invitation-page .names-display {
    font-size: clamp(32px, 6vw, 48px);
    margin-bottom: 6px;
}
.invitation-page .wedding-date {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--accent);
}
.invitation-page .wedding-venue {
    color: var(--ink-soft);
    margin-top: 8px;
}
.invitation-page .wedding-message {
    margin: 28px auto;
    max-width: 46ch;
    font-size: 16px;
    line-height: 1.7;
}
.invitation-page .rule {
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin: 24px auto;
}
.rsvp-form {
    text-align: left;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
}
.rsvp-form h2 { text-align: center; }
.rsvp-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 8px 0 4px;
}
.rsvp-choice label {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.rsvp-choice label:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}
.rsvp-choice input { width: auto; }

.rsvp-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 4px;
}
.rsvp-checkboxes label {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.rsvp-checkboxes label:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}
.rsvp-checkboxes input { width: auto; margin: 0; }

.demo-banner {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 28px;
}

/* ---------- Barre d'essai de la page d'exemple ---------- */
/* Volontairement minuscule : trois contrôles, flottants en bas de l'écran.
   Une barre pleine largeur mangeait l'espace et détournait l'attention du
   faire-part, qui est pourtant tout l'objet de la page. */
.demo-bar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 6px 24px rgba(36, 27, 29, 0.16);
}
.demo-switcher-options { display: flex; gap: 4px; }
.demo-template-btn {
    padding: 7px 13px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--ink);
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.demo-template-btn:hover { background: var(--accent-soft); color: var(--accent); }
.demo-template-btn.is-active { background: var(--accent); color: #FFF; }
.demo-bar-color {
    display: inline-flex;
    align-items: center;
    padding-left: 6px;
    border-left: 1px solid var(--line);
}
.demo-bar-color input[type="color"] {
    width: 30px;
    height: 30px;
    padding: 2px;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: none;
    cursor: pointer;
}
.demo-bar-toggle {
    padding: 7px 15px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    color: #FFF;
    background: var(--accent);
    border: none;
    border-radius: 999px;
    cursor: pointer;
}
.demo-bar-toggle:hover { background: var(--accent-hover); }
.demo-bar-toggle.is-open { background: var(--ink); }

/* ---------- Édition en place sur la page d'exemple ---------- */
/* Les repères visuels n'apparaissent qu'en mode édition : hors de ce mode,
   l'aperçu doit être exactement ce que verront les invités. */
body.demo-editing [data-demo-edit] {
    cursor: text;
    border-radius: 4px;
    box-shadow: 0 0 0 1px var(--accent-soft);
}
body.demo-editing [data-demo-edit]:hover { background: var(--accent-soft); }
body.demo-editing [data-demo-edit]:focus {
    outline: none;
    background: var(--accent-soft);
    box-shadow: 0 0 0 2px var(--accent);
}
.demo-multiline { white-space: pre-line; }

/* Date et heure : champs natifs fondus dans la ligne de texte. */
.demo-inline-input input {
    padding: 2px 4px;
    font: inherit;
    color: inherit;
    text-align: center;
    background: none;
    border: none;
    border-radius: 4px;
    width: auto;
}
body.demo-editing .demo-inline-input input {
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent-soft);
}
.demo-inline-input input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent);
}

/* Photo : l'invite ne s'affiche qu'en mode édition.
   La largeur est calée sur celle de l'image (et non « inline-block » seul),
   sinon le label s'étirait et l'image perdait son centrage. */
.demo-photo-zone {
    position: relative;
    display: block;
    width: 128px;
    margin: 0 auto 20px;
    cursor: default;
}
.demo-photo-zone .wedding-portrait { margin: 0; }
/* Placée SOUS l'image : au centre d'un médaillon de 128 px, l'étiquette
   débordait de chaque côté et masquait les visages. */
.demo-photo-hint {
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: #FFF;
    background: rgba(36, 27, 29, 0.8);
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}
.demo-photo-zone.is-active { cursor: pointer; }
.demo-photo-zone.is-active .demo-photo-hint { opacity: 1; }

/* La barre flotte au-dessus de la fin de page : on réserve sa hauteur. */
body.demo-page .invitation-page { padding-bottom: 80px; }

@media (max-width: 600px) {
    .demo-bar { gap: 5px; padding: 6px 7px; bottom: 10px; }
    .demo-template-btn { padding: 6px 10px; font-size: 12.5px; }
    .demo-bar-toggle { padding: 6px 12px; font-size: 12.5px; }
    .demo-bar-color { padding-left: 4px; }
    .demo-bar-color input[type="color"] { width: 26px; height: 26px; }
}

.confirmation-page {
    text-align: center;
    padding-top: 80px;
}

.static-page {
    text-align: center;
}

.donation-prompt {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--ink-soft);
    text-align: center;
}

/* ---------- Template picker (éditeur) ---------- */

.template-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 8px 0 4px;
}
.template-option {
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 13.5px;
    text-align: center;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.template-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}
.template-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.template-swatch {
    width: 100%;
    height: 36px;
    border-radius: 6px;
}
.template-preview-classique .template-swatch { background: linear-gradient(135deg, #7A2331, #F0DCD9); }
.template-preview-moderne .template-swatch { background: linear-gradient(135deg, #1A1A1A, #E8E8E8); }
.template-preview-champetre .template-swatch { background: linear-gradient(135deg, #6B7C4F, #EFE8D8); }

/* ---------- Portrait, carrousel, programme (page publique) ---------- */

.wedding-portrait {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--ground-raised);
}

.wedding-intro {
    max-width: 50ch;
    margin: 0 auto 8px;
    color: var(--ink-soft);
    font-size: 15.5px;
    line-height: 1.7;
}

/* ---------- Ruban de photos à défilement infini ---------- */
.photo-marquee {
    --marquee-gap: 16px;
    --marquee-card: clamp(150px, 24vw, 230px);
    --marquee-radius: 20px;
    position: relative;
    margin: 32px 0;
    overflow: hidden;
    /* Fondu sur les bords : les photos entrent et sortent en douceur. */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.photo-marquee-track {
    display: flex;
    width: max-content;
    animation: photo-marquee-scroll var(--marquee-duration, 48s) linear infinite;
}
/* Pause au survol uniquement avec une vraie souris : sur mobile, un simple
   toucher active :hover et le laisse bloqué, ce qui figerait le ruban. */
@media (hover: hover) and (pointer: fine) {
    .photo-marquee:hover .photo-marquee-track {
        animation-play-state: paused;
    }
    .photo-marquee-item:hover img {
        transform: scale(1.05);
    }
}
.photo-marquee:focus-within .photo-marquee-track {
    animation-play-state: paused;
}
.photo-marquee-group {
    display: flex;
    flex-shrink: 0;
    gap: var(--marquee-gap);
    /* Même espace après la dernière photo : -50 % tombe pile sur la 2e série. */
    padding: 0 var(--marquee-gap) 0 0;
    margin: 0;
    list-style: none;
}
.photo-marquee-item {
    width: var(--marquee-card);
    aspect-ratio: 4 / 5;
    border-radius: var(--marquee-radius);
    overflow: hidden;
    /* clip-path découpe aussi l'image zoomée : avec seulement overflow + border-radius,
       Chrome laisse parfois dépasser un coin pendant la transition. */
    clip-path: inset(0 round var(--marquee-radius));
    background: var(--line);
    flex-shrink: 0;
}
.photo-marquee-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes photo-marquee-scroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

/* Galerie « photos fixes » : une seule ligne horizontale, pas d'animation
   automatique. L'invité fait défiler au doigt (mobile) ou au trackpad. */
.photo-grid {
    --marquee-gap: 16px;
    --marquee-card: clamp(170px, 46vw, 240px);
    --marquee-radius: 20px;
    display: flex;
    gap: var(--marquee-gap);
    margin: 32px 0;
    padding: 0 0 6px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.photo-grid::-webkit-scrollbar { display: none; }
.photo-grid .photo-marquee-item { scroll-snap-align: center; }

/* Sur les invitations, la bande occupe la largeur de l'écran ; les photos sont
   centrées quand elles tiennent, alignées à gauche (à faire défiler) sinon. */
.invitation-page .photo-grid {
    width: min(calc(100vw - 32px), 1100px);
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
    justify-content: center;
}
.editor-preview .photo-grid { width: auto; margin-left: 0; transform: none; justify-content: flex-start; }

@media (max-width: 860px) {
    .photo-grid { --marquee-gap: 12px; --marquee-radius: 16px; justify-content: flex-start; }
}

.photo-marquee-single {
    margin: 32px auto;
    max-width: 420px;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--line);
}
.photo-marquee-single img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sur les invitations, le ruban déborde de la colonne de texte pour occuper
   la largeur de l'écran (max 1100 px) ; dans l'aperçu de l'éditeur il reste contenu. */
.invitation-page .photo-marquee {
    width: min(calc(100vw - 32px), 1100px);
    margin-left: 50%;
    transform: translateX(-50%);
}
.editor-preview .photo-marquee {
    width: auto;
    margin-left: 0;
    transform: none;
}

@media (max-width: 860px) {
    .photo-marquee { --marquee-gap: 12px; --marquee-radius: 16px; }
}

/* Animations réduites : le ruban de photos continue de défiler (choix produit
   assumé — c'est un élément décoratif doux, pas un clignotement gênant), mais
   deux fois plus lentement, et sans le léger zoom au survol. Les animations
   fortes (ouverture d'enveloppe, flottements du hero) restent, elles, coupées
   par leurs propres règles prefers-reduced-motion. */
@media (prefers-reduced-motion: reduce) {
    .photo-marquee-track { animation-duration: calc(var(--marquee-duration, 48s) * 2); }
    .photo-marquee-item img { transition: none; }
    .photo-marquee-item:hover img { transform: none; }
}

.program-title {
    text-align: center;
    font-size: 20px;
    margin: 40px auto 0;
}
.program-list {
    text-align: left;
    max-width: 440px;
    margin: 20px auto 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.program-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-left: 2px solid var(--line);
    padding-left: 20px;
    margin-left: 8px;
    position: relative;
}
.program-item::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}
.program-item .time {
    font-family: "Fraunces", serif;
    font-weight: 600;
    color: var(--accent);
    font-size: 14px;
    grid-column: 1 / -1;
}
.program-item .details h3 { font-size: 16px; margin-bottom: 2px; }
.program-item .details p { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
/* Avec ou sans horaire, le texte de l'étape prend toute la largeur. */
.program-item .details { grid-column: 1 / -1; }

/* Titre de jour (« Vendredi », « Samedi »…) pour un mariage sur plusieurs jours. */
.program-day {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent);
    margin: 26px 0 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.program-day:first-child { margin-top: 0; }

.rsvp-deadline {
    text-align: center;
    margin: -4px 0 22px;
    font-size: 14.5px;
    color: var(--ink-soft);
}
.rsvp-deadline strong { color: var(--accent); font-weight: 600; }

.rsvp-question-help {
    margin: -2px 0 8px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-soft);
}
/* Dans l'aperçu de l'éditeur le texte est inséré brut (pas de nl2br). */
#preview-custom-questions .rsvp-question-help { white-space: pre-line; }

/* ---------- Template themes (page publique) ---------- */

/* Les modèles définissent la TYPOGRAPHIE et les ORNEMENTS, jamais --accent.
   La couleur appartient au sélecteur de couleur : si un modèle la redéfinissait
   ici, il écraserait le choix du couple (body l'emporte sur :root), et le
   sélecteur semblerait sans effet. La couleur de départ accordée au modèle est
   posée à la création, côté PHP (voir TEMPLATE_DEFAULT_COLORS). */

/* Sur un faire-part, les deux teintes dérivées suivent la couleur choisie.
   Elles étaient figées en bordeaux : un faire-part vert gardait des survols et
   des fonds roses. color-mix() les recalcule à chaque changement de couleur,
   sans JS. Repli pour les navigateurs anciens : les valeurs de :root. */
@supports (color: color-mix(in srgb, red, blue)) {
    body[class*="template-"] {
        --accent-hover: color-mix(in srgb, var(--accent) 82%, #000);
        --accent-soft: color-mix(in srgb, var(--accent) 14%, #FFF);
    }
}

/* Les ornements se positionnent par rapport à la page, pas à la fenêtre. */
body[class*="template-"] .invitation-page { position: relative; }
body[class*="template-"] .invitation-page::before,
body[class*="template-"] .invitation-page::after {
    content: "";
    position: absolute;
    z-index: 0;
    pointer-events: none;
}
/* Le contenu passe au-dessus des ornements. */
body[class*="template-"] .invitation-page > * { position: relative; z-index: 1; }

/* ============ CLASSIQUE ============ */
/* Registre « gravure » : filets doubles, fleuron central, initiales en
   médaillon. Les ornements sont tracés dans la couleur choisie
   (currentColor hérité) pour rester accordés à toutes les teintes. */

body.template-classique .names-display {
    letter-spacing: 0.01em;
}
/* Fleuron sous les prénoms, à la place du simple trait. */
body.template-classique .rule {
    width: 180px;
    height: 22px;
    background: none;
    color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='22' viewBox='0 0 180 22' fill='none' stroke='currentColor' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M4 11h58M118 11h58' stroke-opacity='0.5'/%3E%3Cpath d='M70 11c6-5 12-5 16 0-4 5-10 5-16 0Z'/%3E%3Cpath d='M110 11c-6-5-12-5-16 0 4 5 10 5 16 0Z'/%3E%3Ccircle cx='90' cy='11' r='3'/%3E%3Cpath d='M90 4v-2M90 20v-2' stroke-opacity='0.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    -webkit-mask-image: none;
}
/* Encadrement double filet autour de la zone d'en-tête. */
body.template-classique .invitation-page::before {
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent) 22%, var(--accent) 78%, transparent);
    opacity: 0.45;
}
body.template-classique .invitation-page::after {
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent) 22%, var(--accent) 78%, transparent);
    opacity: 0.45;
}
/* Petites capitales très espacées, comme sur un carton gravé. */
body.template-classique .eyebrow {
    letter-spacing: 0.26em;
    font-size: 11.5px;
}
/* Lettrine sur le texte de présentation. */
body.template-classique .wedding-intro::first-letter {
    float: left;
    margin: 4px 8px 0 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 3.1em;
    line-height: 0.82;
    color: var(--accent);
}
body.template-classique .program-item .time {
    font-style: italic;
    letter-spacing: 0.04em;
}
/* Pas de cadre autour du formulaire : il l'enfermait dans une boîte alors que
   le faire-part est une page continue. Un filet dégradé suffit à séparer. */
body.template-classique .rsvp-form {
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent) 1;
    border-image-slice: 1;
}
body.template-classique .card {
    border: 1px solid var(--accent-soft);
    box-shadow: 0 10px 30px rgba(36, 27, 29, 0.05);
}

/* ============ MODERNE ============ */
/* Registre « éditorial » : sans-serif, grille apparente, aplats francs.
   L'ornement est géométrique, pas floral. */

body.template-moderne {
    --sage: #4A4A4A;
}
body.template-moderne h1, body.template-moderne h2, body.template-moderne h3 {
    font-family: "Public Sans", sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}
body.template-moderne .names-display {
    font-family: "Public Sans", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.02;
}
body.template-moderne .card-invite .names { font-family: "Public Sans", sans-serif; font-weight: 700; }
body.template-moderne .eyebrow {
    display: inline-block;
    padding: 5px 12px;
    font-size: 10.5px;
    letter-spacing: 0.18em;
    color: #FFF;
    background: var(--accent);
    border-radius: 3px;
}
/* Barre pleine, franche, décalée à gauche : signature graphique du modèle. */
body.template-moderne .rule {
    width: 72px;
    height: 5px;
    border-radius: 0;
    background: var(--accent);
}
/* Bloc de couleur en haut de page et filet épais en bas. */
body.template-moderne .invitation-page::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--accent);
}
body.template-moderne .invitation-page::after {
    top: 0;
    right: 0;
    width: 42%;
    max-width: 260px;
    height: 150px;
    background:
        repeating-linear-gradient(90deg, var(--accent) 0 1px, transparent 1px 11px);
    opacity: 0.16;
}
body.template-moderne .wedding-date {
    font-family: "Public Sans", sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}
/* Programme en liste tramée plutôt qu'en pastilles. */
body.template-moderne .program-item {
    border-left: 3px solid var(--accent);
    padding-left: 14px;
}
body.template-moderne .program-item .time {
    font-family: "Public Sans", sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
}
/* Filet épais et court, aligné à gauche : la signature du modèle. */
body.template-moderne .rsvp-form {
    border-top: none;
    padding-top: 0;
    margin-top: 48px;
}
body.template-moderne .rsvp-form::before {
    content: "";
    display: block;
    width: 72px;
    height: 5px;
    margin: 0 auto 32px;
    background: var(--accent);
}
body.template-moderne .card {
    border-radius: 4px;
    border: 1px solid var(--line);
    box-shadow: none;
}
body.template-moderne .btn,
body.template-moderne button[type="submit"] { border-radius: 3px; }

/* ============ CHAMPÊTRE ============ */
/* Registre « botanique » : bouquets dessinés, feuillage, teintes naturelles.
   Les motifs sont posés aux angles et en bas de page, jamais derrière un bloc
   de texte — un fond répété se lisait comme un papier peint et passait sous
   le formulaire. */

body.template-champetre {
    --ground: #FBF7EE;
    --sage: #A6763F;
}
body.template-champetre .names-display,
body.template-champetre h1, body.template-champetre h2 { font-style: italic; }
body.template-champetre .eyebrow { letter-spacing: 0.2em; }

/* Guirlande fleurie sous les prénoms, à la place du trait. */
body.template-champetre .rule {
    width: 230px;
    height: 34px;
    background: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='34' viewBox='0 0 230 34' fill='none'%3E%3Cg stroke='%236B7C4F' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M18 17c22-9 44-9 62 0M150 17c18-9 40-9 62 0'/%3E%3Cpath d='M34 13c-3-5-9-6-13-3 3 5 9 6 13 3ZM52 10c-2-6-8-8-13-5 2 6 8 8 13 5ZM70 11c-1-6-7-9-12-6 1 6 7 9 12 6Z' fill='%236B7C4F' fill-opacity='0.16'/%3E%3Cpath d='M196 13c3-5 9-6 13-3-3 5-9 6-13 3ZM178 10c2-6 8-8 13-5-2 6-8 8-13 5ZM160 11c1-6 7-9 12-6-1 6-7 9-12 6Z' fill='%236B7C4F' fill-opacity='0.16'/%3E%3C/g%3E%3Cg transform='translate(115 17)'%3E%3Cg fill='%23C98B8B' fill-opacity='0.5'%3E%3Cellipse rx='5' ry='8' transform='rotate(0)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(60)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(120)'/%3E%3C/g%3E%3Ccircle r='3' fill='%23A6763F' fill-opacity='0.65'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Bouquet en haut à gauche. */
body.template-champetre .invitation-page::before {
    top: -14px;
    left: -28px;
    width: min(240px, 34vw);
    height: 240px;
    opacity: 0.75;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left top;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240' fill='none'%3E%3Cg stroke='%236B7C4F' stroke-width='1.6' stroke-linecap='round' stroke-opacity='0.6'%3E%3Cpath d='M6 8c34 14 60 42 74 78'/%3E%3Cpath d='M14 34c18-6 34 2 42 18M30 58c16-7 31-2 38 13M48 84c14-8 28-4 35 9'/%3E%3Cpath d='M80 86c10 22 12 46 7 68'/%3E%3Cpath d='M18 10c-2 24 6 46 22 62'/%3E%3C/g%3E%3Cg fill='%236B7C4F' fill-opacity='0.22'%3E%3Cellipse cx='58' cy='48' rx='15' ry='6' transform='rotate(-32 58 48)'/%3E%3Cellipse cx='74' cy='78' rx='14' ry='5.5' transform='rotate(-26 74 78)'/%3E%3Cellipse cx='34' cy='96' rx='13' ry='5' transform='rotate(26 34 96)'/%3E%3Cellipse cx='96' cy='120' rx='12' ry='5' transform='rotate(-18 96 120)'/%3E%3C/g%3E%3Cg transform='translate(86 60)'%3E%3Cg fill='%23C98B8B' fill-opacity='0.46'%3E%3Cellipse rx='7' ry='11'/%3E%3Cellipse rx='7' ry='11' transform='rotate(72)'/%3E%3Cellipse rx='7' ry='11' transform='rotate(144)'/%3E%3Cellipse rx='7' ry='11' transform='rotate(216)'/%3E%3Cellipse rx='7' ry='11' transform='rotate(288)'/%3E%3C/g%3E%3Ccircle r='4' fill='%23A6763F' fill-opacity='0.7'/%3E%3C/g%3E%3Cg transform='translate(42 112)'%3E%3Cg fill='%23E2C275' fill-opacity='0.5'%3E%3Cellipse rx='5' ry='8'/%3E%3Cellipse rx='5' ry='8' transform='rotate(72)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(144)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(216)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(288)'/%3E%3C/g%3E%3Ccircle r='3' fill='%23A6763F' fill-opacity='0.7'/%3E%3C/g%3E%3Cg transform='translate(106 128)'%3E%3Cg fill='%23C98B8B' fill-opacity='0.34'%3E%3Cellipse rx='5' ry='8'/%3E%3Cellipse rx='5' ry='8' transform='rotate(60)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(120)'/%3E%3C/g%3E%3Ccircle r='2.6' fill='%23A6763F' fill-opacity='0.6'/%3E%3C/g%3E%3C/svg%3E");
}

/* Bouquet en bas à droite, en miroir. */
body.template-champetre .invitation-page::after {
    bottom: -14px;
    right: -28px;
    width: min(240px, 34vw);
    height: 240px;
    opacity: 0.75;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right bottom;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240' fill='none'%3E%3Cg transform='translate(240,240) scale(-1,-1)'%3E%3Cg stroke='%236B7C4F' stroke-width='1.6' stroke-linecap='round' stroke-opacity='0.6'%3E%3Cpath d='M6 8c34 14 60 42 74 78'/%3E%3Cpath d='M14 34c18-6 34 2 42 18M30 58c16-7 31-2 38 13M48 84c14-8 28-4 35 9'/%3E%3Cpath d='M80 86c10 22 12 46 7 68'/%3E%3Cpath d='M18 10c-2 24 6 46 22 62'/%3E%3C/g%3E%3Cg fill='%236B7C4F' fill-opacity='0.22'%3E%3Cellipse cx='58' cy='48' rx='15' ry='6' transform='rotate(-32 58 48)'/%3E%3Cellipse cx='74' cy='78' rx='14' ry='5.5' transform='rotate(-26 74 78)'/%3E%3Cellipse cx='34' cy='96' rx='13' ry='5' transform='rotate(26 34 96)'/%3E%3Cellipse cx='96' cy='120' rx='12' ry='5' transform='rotate(-18 96 120)'/%3E%3C/g%3E%3Cg transform='translate(86 60)'%3E%3Cg fill='%23C98B8B' fill-opacity='0.46'%3E%3Cellipse rx='7' ry='11'/%3E%3Cellipse rx='7' ry='11' transform='rotate(72)'/%3E%3Cellipse rx='7' ry='11' transform='rotate(144)'/%3E%3Cellipse rx='7' ry='11' transform='rotate(216)'/%3E%3Cellipse rx='7' ry='11' transform='rotate(288)'/%3E%3C/g%3E%3Ccircle r='4' fill='%23A6763F' fill-opacity='0.7'/%3E%3C/g%3E%3Cg transform='translate(42 112)'%3E%3Cg fill='%23E2C275' fill-opacity='0.5'%3E%3Cellipse rx='5' ry='8'/%3E%3Cellipse rx='5' ry='8' transform='rotate(72)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(144)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(216)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(288)'/%3E%3C/g%3E%3Ccircle r='3' fill='%23A6763F' fill-opacity='0.7'/%3E%3C/g%3E%3Cg transform='translate(106 128)'%3E%3Cg fill='%23C98B8B' fill-opacity='0.34'%3E%3Cellipse rx='5' ry='8'/%3E%3Cellipse rx='5' ry='8' transform='rotate(60)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(120)'/%3E%3C/g%3E%3Ccircle r='2.6' fill='%23A6763F' fill-opacity='0.6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Brins de feuillage de part et d'autre du titre « Programme ». */
body.template-champetre .program-title {
    position: relative;
    display: inline-block;
    padding: 0 46px;
}
body.template-champetre .program-title::before,
body.template-champetre .program-title::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 36px;
    height: 20px;
    transform: translateY(-50%);
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='20' viewBox='0 0 36 20' fill='none'%3E%3Cpath d='M2 10h30' stroke='%236B7C4F' stroke-width='1.2' stroke-linecap='round' stroke-opacity='0.55'/%3E%3Cg fill='%236B7C4F' fill-opacity='0.22'%3E%3Cellipse cx='10' cy='6' rx='6' ry='2.6' transform='rotate(-24 10 6)'/%3E%3Cellipse cx='20' cy='14' rx='6' ry='2.6' transform='rotate(24 20 14)'/%3E%3Cellipse cx='26' cy='6' rx='5' ry='2.4' transform='rotate(-20 26 6)'/%3E%3C/g%3E%3Ccircle cx='33' cy='10' r='2.4' fill='%23A6763F' fill-opacity='0.6'/%3E%3C/svg%3E");
}
body.template-champetre .program-title::before { left: 0; }
body.template-champetre .program-title::after { right: 0; transform: translateY(-50%) scaleX(-1); }

body.template-champetre .program-item .time { font-style: italic; }
/* Brin de feuillage en guise de séparateur, plutôt qu'un cadre. */
body.template-champetre .rsvp-form {
    border-top: none;
    padding-top: 0;
    margin-top: 48px;
}
body.template-champetre .rsvp-form::before {
    content: "";
    display: block;
    width: 230px;
    height: 34px;
    margin: 0 auto 28px;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='34' viewBox='0 0 230 34' fill='none'%3E%3Cg stroke='%236B7C4F' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M18 17c22-9 44-9 62 0M150 17c18-9 40-9 62 0'/%3E%3Cpath d='M34 13c-3-5-9-6-13-3 3 5 9 6 13 3ZM52 10c-2-6-8-8-13-5 2 6 8 8 13 5ZM70 11c-1-6-7-9-12-6 1 6 7 9 12 6Z' fill='%236B7C4F' fill-opacity='0.16'/%3E%3Cpath d='M196 13c3-5 9-6 13-3-3 5-9 6-13 3ZM178 10c2-6 8-8 13-5-2 6-8 8-13 5ZM160 11c1-6 7-9 12-6-1 6-7 9-12 6Z' fill='%236B7C4F' fill-opacity='0.16'/%3E%3C/g%3E%3Cg transform='translate(115 17)'%3E%3Cg fill='%23C98B8B' fill-opacity='0.5'%3E%3Cellipse rx='5' ry='8'/%3E%3Cellipse rx='5' ry='8' transform='rotate(60)'/%3E%3Cellipse rx='5' ry='8' transform='rotate(120)'/%3E%3C/g%3E%3Ccircle r='3' fill='%23A6763F' fill-opacity='0.65'/%3E%3C/g%3E%3C/svg%3E");
}
body.template-champetre .card {
    border: 1px solid rgba(107, 124, 79, 0.22);
    background: rgba(255, 255, 255, 0.94);
}

/* Décor ornemental : atténué en contraste élevé, réduit sur petit écran où
   la largeur manque pour qu'il reste discret. */
@media (prefers-contrast: more) {
    body.template-champetre .invitation-page::before,
    body.template-champetre .invitation-page::after { opacity: 0.25; }
    body.template-moderne .invitation-page::after { opacity: 0.08; }
}
@media (max-width: 600px) {
    body.template-champetre .invitation-page::before,
    body.template-champetre .invitation-page::after {
        width: 150px;
        height: 150px;
        opacity: 0.5;
    }
    body.template-champetre .program-title { padding: 0 34px; }
    body.template-champetre .program-title::before,
    body.template-champetre .program-title::after { width: 26px; }
    body.template-champetre .rule { width: 180px; }
    body.template-moderne .invitation-page::after { display: none; }
    body.template-classique .rule { width: 150px; }
}

@media (max-width: 480px) {
    main, .page { padding: 28px 18px 60px; }
    .rsvp-choice { grid-template-columns: 1fr; }
    .template-picker { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
}

/* ---------- Animation d'ouverture d'enveloppe ---------- */

#invitation-content {
    opacity: 0;
    transform: translateY(16px);
}
#invitation-content.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

.envelope-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: var(--ground);
    cursor: pointer;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}
.envelope-overlay.overlay-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.envelope-overlay:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
}

.envelope {
    position: relative;
    width: 260px;
    height: 172px;
    perspective: 900px;
}

.envelope-back {
    position: absolute;
    inset: 0;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
}

.envelope-card {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 10px;
    bottom: 10px;
    background: var(--ground-raised);
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(36, 27, 29, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 16px 22px;
    text-align: center;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s;
}
.envelope-card-initials {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}
.envelope-card-names {
    font-family: "Fraunces", serif;
    font-size: 17px;
    color: var(--ink);
    line-height: 1.2;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 75px;
    background: var(--accent);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.5, 0, 0.5, 1);
    box-shadow: 0 1px 3px rgba(36, 27, 29, 0.15);
}

.envelope-seal {
    position: absolute;
    top: 68px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ground-raised);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    z-index: 3;
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.envelope-hint {
    font-size: 13.5px;
    color: var(--ink-soft);
    margin: 0;
    animation: hint-pulse 2.2s ease-in-out infinite;
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.envelope.opening .envelope-seal {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}
.envelope.opening .envelope-flap {
    transform: rotateX(180deg);
}
.envelope.opening .envelope-card {
    transform: translateY(-96px) scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
    #invitation-content { opacity: 1; transform: none; }
    .envelope-overlay { display: none; }
}

@media (max-width: 480px) {
    .envelope { width: 220px; height: 148px; }
    .envelope-flap { height: 65px; }
    .envelope-seal { top: 58px; }
}

/* ---------- Installation écran d'accueil ---------- */

.install-help {
    margin-top: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    background: var(--ground-raised);
}
.install-help summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14.5px;
}
.install-help-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}
.install-help-content h4 {
    font-size: 14px;
    margin-bottom: 8px;
}
.install-help-content ol {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--ink-soft);
    font-size: 13.5px;
}
@media (max-width: 480px) {
    .install-help-content { grid-template-columns: 1fr; }
}

/* ---------- Éditeur visuel ---------- */

.editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: var(--ground-raised);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.editor-toolbar-status {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.editor-toolbar-status.is-visible {
    opacity: 1;
}
.editor-toolbar-status.is-error {
    color: var(--error);
    font-weight: 600;
}
.editor-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
/* Pastille de statut En ligne / Brouillon dans la barre de l'éditeur. */
.editor-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.editor-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink-soft);
    flex-shrink: 0;
}
.editor-status-pill[data-published="1"] { color: var(--success); }
.editor-status-pill[data-published="1"] .editor-status-dot { background: var(--success); }
.editor-status-pill[data-published="0"] { color: var(--ink-soft); }

/* Bouton Publier / Mettre en brouillon (contour, discret à côté d'Enregistrer). */
.editor-toolbar button.editor-publish-btn {
    font-size: 13px;
    padding: 9px 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.editor-save-button {
    min-width: 150px;
    justify-content: center;
}
/* Spécificité volontairement élevée : doit battre la règle générique button:not(...). */
.editor-toolbar button.editor-save-button.is-saved,
.editor-toolbar button.editor-save-button.is-saved:hover {
    background: var(--success-soft);
    color: var(--success);
    border-color: transparent;
    box-shadow: none;
    transform: none;
    cursor: default;
}
.editor-save-button.is-saving {
    opacity: 0.75;
    cursor: progress;
}

.editor-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 0;
    align-items: start;
}

.editor-panel {
    position: sticky;
    top: 65px;
    padding: 28px 32px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-height: calc(100vh - 65px);
    overflow-y: auto;
}
.editor-panel-section h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    margin-bottom: 10px;
}
.editor-panel-section .template-picker {
    grid-template-columns: 1fr 1fr;
}
.editor-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px;
}
.editor-toggle-row input {
    width: auto;
}
.editor-panel-hint {
    font-size: 12.5px;
    color: var(--ink-soft);
    line-height: 1.5;
}
#color-picker {
    width: 100%;
    height: 40px;
}

.editor-preview {
    /* L'aperçu est un <main> : annule la règle globale main { max-width: 640px; margin: auto }
       qui l'empêchait de suivre sa colonne (débordement sur mobile, carte bridée sur ordinateur). */
    max-width: none;
    margin: 0;
    padding: 48px 32px 80px;
    background: var(--ground);
    min-height: calc(100vh - 65px);
    display: flex;
    justify-content: center;
}
.editor-preview .invitation-page {
    max-width: 760px;
    width: 100%;
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 48px 40px;
    height: fit-content;
    /* Dans l'éditeur, l'aperçu est une CARTE arrondie : les ornements des
       modèles débordent volontairement sur la page publique, mais ici ils
       sortiraient de la carte et flotteraient sur le fond gris. On les
       découpe au bord de la carte. */
    overflow: hidden;
}
/* Ornements ramenés à l'intérieur de la carte (ils sont en négatif sur la
   page publique, où rien ne les découpe). */
.editor-preview .invitation-page::before { top: 0; left: 0; }
.editor-preview .invitation-page::after { bottom: 0; right: 0; }

.editable {
    display: inline-block;
    min-width: 20px;
    outline: none;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}
.editable:hover {
    background: var(--accent-soft);
}
.editable:focus {
    background: var(--accent-soft);
    box-shadow: 0 0 0 2px var(--accent);
}
.editable[data-field="intro_text"],
.editable[data-field="message"],
.editable[data-program-field="description"] {
    white-space: pre-line;
}
.editor-program-item .details .editable {
    display: block;
}
.editable:empty::before {
    content: attr(data-placeholder);
    color: var(--ink-soft);
    font-style: italic;
}

.editor-photo-zone {
    position: relative;
    display: block;
    width: fit-content;
    margin: 0 auto 20px;
    cursor: pointer;
}
.editor-photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
}
.editor-photo-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(36, 27, 29, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.editor-photo-zone:hover .editor-photo-hint {
    opacity: 1;
}

.editor-section {
    position: relative;
}

.editor-gallery-label {
    margin: 8px 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-align: center;
}
.editor-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin: 24px 0;
}
.editor-gallery-item {
    position: relative;
    aspect-ratio: 1;
}
.editor-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.editor-gallery-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--error);
    font-size: 12px;
    box-shadow: var(--shadow-sm);
}
.editor-gallery-add {
    aspect-ratio: 1;
    background: var(--ground);
    border: 1.5px dashed var(--line);
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
}
.editor-gallery-add:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: none;
}

.editor-empty-hint {
    font-size: 13.5px;
    color: var(--ink-soft);
    text-align: center;
    padding: 16px;
}

.editor-program-item {
    position: relative;
    padding-right: 32px;
}
.editor-program-time {
    min-width: 50px;
}
.editor-program-remove {
    position: absolute;
    top: 10px;
    right: -4px;
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    background: var(--ground);
    border: 1px solid var(--line);
    color: var(--error);
    font-size: 11px;
    box-shadow: none;
}
.editor-program-remove:hover {
    border-color: var(--error);
    background: var(--error-soft);
    transform: none;
}

/* Boutons ↑ ↓ ✕ d'une ligne du programme. Préfixe .editor-preview + button :
   nécessaire pour battre la règle générique button:not(...) (0,3,1). */
.editor-program-controls {
    position: absolute;
    top: 8px;
    right: -6px;
    display: flex;
    gap: 4px;
    opacity: 0.35;
    transition: opacity 0.15s ease;
}
.editor-program-item:hover .editor-program-controls,
.editor-program-item:focus-within .editor-program-controls {
    opacity: 1;
}
.editor-preview .editor-program-controls button.editor-program-move,
.editor-preview .editor-program-controls button.editor-program-remove {
    position: static;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    background: var(--ground);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 12px;
    box-shadow: none;
    transform: none;
}
.editor-preview .editor-program-controls button.editor-program-remove { color: var(--error); }
.editor-preview .editor-program-controls button.editor-program-move:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.editor-preview .editor-program-controls button.editor-program-remove:hover {
    border-color: var(--error);
    background: var(--error-soft);
}
.editor-program-item { padding-right: 86px; }
.editor-program-day {
    position: relative;
    padding-top: 6px;
}
.editor-program-day .program-day { display: block; margin-top: 18px; }
.editor-program-day:first-child .program-day { margin-top: 0; }
.editor-program-add {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* Explication facultative sous une question RSVP (panneau de l'éditeur). */
.editor-rsvp-question .editable.editor-rsvp-help {
    font-weight: 400;
    font-size: 13px;
    color: var(--ink-soft);
    white-space: pre-line;
    margin: 2px 0 6px;
}

/* Choix à deux options côte à côte (style de galerie). */
.editor-segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    background: var(--ground);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.editor-segmented label {
    margin: 0;
    cursor: pointer;
}
.editor-segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.editor-segmented span {
    display: block;
    text-align: center;
    padding: 8px 6px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    transition: background-color 0.15s ease, color 0.15s ease;
}
.editor-segmented input:checked + span {
    background: var(--ground-raised);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}
.editor-segmented input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* Sélecteur du point de centrage de la photo ronde. */
.focus-picker {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
    background: var(--line);
    line-height: 0;
}
.focus-picker:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
/* L'image définit la taille du cadre : les coordonnées du clic = celles de la photo. */
.focus-picker img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 260px;
    user-select: none;
    pointer-events: none;
}
.focus-picker-dot {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(36, 27, 29, 0.35), 0 1px 4px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.editor-rsvp-question {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
}
.editor-rsvp-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.editor-rsvp-question-remove {
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--error);
    font-size: 10px;
    box-shadow: none;
}
.editor-rsvp-question-remove:hover {
    border-color: var(--error);
    background: var(--error-soft);
    transform: none;
}
.editor-rsvp-question .editable {
    display: block;
    font-weight: 600;
    font-size: 14px;
    padding: 4px 6px;
}
.editor-rsvp-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.editor-rsvp-option-input {
    font-size: 13px;
    padding: 8px 10px;
}

/* ---------- Fenêtre modale générique ---------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(36, 27, 29, 0.5);
    padding: 16px;
}
.modal-overlay[hidden] {
    display: none;
}
.modal-card {
    background: var(--ground-raised);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
}
.modal-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.modal-card-header h3 {
    margin-bottom: 0;
}
.modal-card-header .btn-text {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

/* Sans min-width: 0, le ruban de photos (très large par construction)
   élargit toute la grille et fait déborder le panneau sur mobile. */
.editor-layout > *,
.editor-preview .invitation-page { min-width: 0; }

.editor-mobile-tabs { display: none; }

@media (max-width: 860px) {
    /* Barre du haut sur une seule ligne : retour, actions défilantes, Enregistrer. */
    .editor-toolbar {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 8px 12px;
    }
    .editor-back { font-size: 20px; text-decoration: none; padding: 4px 6px; flex-shrink: 0; }
    .editor-back-label,
    .editor-label-long { display: none; }
    .editor-toolbar-status {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 6px;
        padding: 6px 12px;
        border-radius: 999px;
        background: var(--ground-raised);
        box-shadow: var(--shadow-md);
        white-space: nowrap;
        pointer-events: none;
    }
    .editor-toolbar-actions {
        flex: 1;
        min-width: 0;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .editor-toolbar-actions::-webkit-scrollbar { display: none; }
    .editor-toolbar-actions .btn { padding: 8px 10px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
    .editor-status-pill, .editor-publish-btn { font-size: 12.5px; }
    .editor-toolbar button.editor-save-button {
        min-width: 0;
        padding: 9px 14px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Onglets « Mon faire-part » / « Réglages ». */
    .editor-mobile-tabs {
        position: sticky;
        top: 56px;
        z-index: 40;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 6px 12px;
        background: var(--ground-raised);
        border-bottom: 1px solid var(--line);
    }
    .editor-toolbar ~ .editor-mobile-tabs button.editor-mobile-tab {
        padding: 9px 8px;
        font-size: 14px;
        font-weight: 600;
        border-radius: var(--radius-sm);
        background: transparent;
        color: var(--ink-soft);
        box-shadow: none;
        border: none;
        transform: none;
    }
    .editor-toolbar ~ .editor-mobile-tabs button.editor-mobile-tab.is-active {
        background: var(--accent-soft);
        color: var(--accent);
    }

    .editor-layout { grid-template-columns: minmax(0, 1fr); }
    .editor-layout[data-tab="preview"] .editor-panel,
    .editor-layout[data-tab="settings"] .editor-preview { display: none; }
    .editor-panel {
        position: static;
        max-height: none;
        border-right: none;
        padding: 22px 18px 60px;
    }
    .editor-preview { padding: 14px 10px 60px; min-height: 0; }
    .editor-preview .invitation-page { padding: 30px 18px; border-radius: var(--radius-md); }
}

/* Très petits téléphones : doit rester APRÈS le bloc mobile 860px. */
@media (max-width: 380px) {
    .editor-toolbar { gap: 6px; padding: 8px 8px; }
    .editor-back { padding: 4px 2px; }
    .editor-toolbar-actions { gap: 6px; }
    .editor-toolbar-actions .btn { padding: 7px 8px; font-size: 12.5px; }
    .editor-status-pill { font-size: 12px; }
    .editor-toolbar button.editor-save-button { padding: 8px 10px; font-size: 12.5px; }
}

/* ---------- Tableau de bord produit (admin) ---------- */
.funnel { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.funnel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.funnel-label { font-weight: 600; font-size: 14px; }
.funnel-value { font-size: 14px; white-space: nowrap; }
.funnel-pct { color: var(--ink-soft); font-weight: 400; font-size: 13px; }
.funnel-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.funnel-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }
.funnel-step { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); }
.activity-table td, .activity-table th { text-align: center; }
.activity-table td:first-child, .activity-table th:first-child { text-align: left; }

/* ---------- Page d'erreur 404 ---------- */
.error-page {
    max-width: 540px;
    margin: 40px auto;
    text-align: center;
}
.error-page-code {
    display: block;
    font-family: "Fraunces", serif;
    font-size: clamp(72px, 18vw, 120px);
    font-weight: 600;
    line-height: 1;
    color: var(--accent);
    opacity: 0.18;
    margin-bottom: 8px;
}
.error-page h1 { margin-bottom: 14px; }
.error-page > p { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.error-page-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 28px 0 20px;
}
.error-page-hint { font-size: 13.5px; }

/* ---------- Encadré astuce dans les articles ---------- */
.budget-tip {
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 18px;
    margin: 20px 0;
    font-size: 15px;
}

/* ====================================================================
   Administration — page large, onglets, tableaux lisibles
   La page admin est la seule du site a avoir besoin de toute la largeur
   de l'ecran : ses tableaux ont 8-9 colonnes et debordaient du gabarit
   1080px partage avec le reste du site.
   ==================================================================== */

main.admin-main {
    max-width: 1500px;
    padding: 40px 32px 80px;
}

.admin-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.admin-head h1 { margin: 2px 0 0; }

.admin-alert-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}
.admin-alert-link::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.admin-alert-link:hover { background: var(--accent); color: #FBF4F1; }

/* ---------- Chiffres cles ---------- */

.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin: 28px 0 0;
}

.kpi {
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.kpi-num {
    font-family: "Fraunces", serif;
    font-size: 34px;
    line-height: 1.1;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.kpi-label { font-size: 14px; font-weight: 600; }
.kpi-sub { font-size: 12.5px; color: var(--ink-soft); }

.trend { font-weight: 600; }
.trend.up { color: var(--sage); }
.trend.down { color: var(--accent); }
.trend.flat { color: var(--ink-soft); }

/* ---------- Onglets ---------- */

.admin-tabs {
    display: flex;
    gap: 4px;
    margin: 32px 0 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 12px 18px;
    margin: 0;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.admin-tab:hover { color: var(--ink); background: none; }
.admin-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #FBF4F1;
    font-size: 11.5px;
    line-height: 16px;
    text-align: center;
}

.admin-panel { padding-top: 28px; }
.admin-panel h2 {
    font-size: 20px;
    margin: 36px 0 6px;
}
.admin-panel > h2:first-child,
.admin-panel > .section-head:first-child h2 { margin-top: 0; }
.admin-panel h3 { font-size: 15.5px; margin: 28px 0 8px; }

.panel-note {
    color: var(--ink-soft);
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0 0 14px;
    max-width: 90ch;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.section-head h2 { margin: 0; }

.table-filter {
    width: auto;
    min-width: 260px;
    margin: 0;
    padding: 9px 14px;
    font-size: 14px;
}

.table-empty {
    color: var(--ink-soft);
    font-size: 14px;
    padding: 16px 2px;
}

/* ---------- Cartes d'action ---------- */

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}
.action-card {
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.action-card p {
    margin: 5px 0 0;
    font-size: 13.5px;
    color: var(--ink-soft);
    max-width: 48ch;
}
.action-card form { margin: 0; }

/* ---------- Tableaux de donnees ----------
   Les cellules passent en white-space: normal (la regle globale force nowrap,
   ce qui faisait deborder les tableaux de 8+ colonnes), et les colonnes de
   nombres sont alignees a droite en chiffres tabulaires pour se comparer
   d'un coup d'oeil. */

.data-table { font-size: 13.5px; }
.data-table th,
.data-table td {
    padding: 11px 14px;
    vertical-align: middle;
}
.data-table th.num,
.data-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.data-table td.cell-wrap,
.data-table th { white-space: normal; }

.cell-strong { display: block; font-weight: 600; }
.cell-sub {
    display: block;
    font-size: 12px;
    color: var(--ink-soft);
    margin-top: 2px;
}
.cell-muted { color: var(--ink-soft); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- Graphique de visites ---------- */

.chart-card { padding: 20px 22px; }
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 140px;
}
.bar-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
}
.bar {
    width: 100%;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: background 0.15s ease;
}
.bar-col:hover .bar { background: var(--ink); }

.chart-axis {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--ink-soft);
}
.chart-max { font-variant-numeric: tabular-nums; }

/* ---------- Provenance : barres horizontales ---------- */

.source-bars {
    display: flex;
    flex-direction: column;
    gap: 13px;
    max-width: 680px;
    margin-bottom: 8px;
}
.source-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 5px;
}
.source-label { font-size: 14px; font-weight: 600; }
.source-value { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.source-pct { color: var(--ink-soft); font-weight: 400; font-size: 13px; }
.source-bar { height: 9px; background: var(--line); border-radius: 999px; overflow: hidden; }
.source-fill { height: 100%; background: var(--accent); border-radius: 999px; }

/* ---------- Retours utilisateurs ---------- */

.feedback-list { display: flex; flex-direction: column; gap: 12px; }
.feedback-item {
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}
.feedback-item.is-read {
    border-left-color: var(--line);
    opacity: 0.65;
}
.feedback-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.feedback-meta form { margin: 0; }
.feedback-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 5px;
}
.feedback-body {
    margin: 0;
    white-space: pre-wrap;
    font-size: 14.5px;
    line-height: 1.55;
}

@media (max-width: 860px) {
    main.admin-main { padding: 28px 18px 60px; }
    .kpi-num { font-size: 28px; }
    .admin-panel h2 { font-size: 18px; }
    .table-filter { min-width: 0; width: 100%; }
    .section-head { align-items: stretch; }
}

/* ---------- QR code de l'invitation (tableau de bord des maries) ---------- */

.qr-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(32, 22, 20, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.qr-overlay[hidden] { display: none; }

.qr-dialog {
    position: relative;
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg, 16px);
    padding: 28px 30px 26px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 24px 60px rgba(32, 22, 20, 0.28);
}

.qr-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--ink-soft);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.qr-close:hover { background: var(--line); color: var(--ink); }

.qr-title { font-size: 19px; margin: 0; }
.qr-sub { margin: 4px 0 18px; color: var(--ink-soft); font-size: 14px; }

.qr-image {
    display: block;
    width: min(260px, 70vw);
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.qr-image svg { display: block; width: 100%; height: auto; }

.qr-help {
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 16px 0 18px;
}

.qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Invitation a faire un retour ----------
   Bande discrete en bas a droite : pas d'overlay, la page reste utilisable. */

.feedback-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 110;
    width: min(340px, calc(100vw - 40px));
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 18px 20px 20px;
    box-shadow: 0 16px 40px rgba(32, 22, 20, 0.18);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.feedback-toast[hidden] { display: none; }
.feedback-toast.is-visible { opacity: 1; transform: translateY(0); }

.feedback-toast strong { display: block; font-size: 15px; margin-bottom: 6px; }
.feedback-toast p {
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}
.feedback-toast .btn { width: 100%; justify-content: center; }

.feedback-toast-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--ink-soft);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.feedback-toast-close:hover { background: var(--line); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    .feedback-toast { transition: none; }
}

@media (max-width: 480px) {
    .feedback-toast {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }
    .qr-dialog { padding: 24px 20px 22px; }
}

/* ---------- Mention d'affiliation (articles de blog) ---------- */

.affiliate-notice {
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-left: 3px solid var(--sage);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin: 20px 0 26px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* ---------- Suggestion partenaire (tableau de bord) ----------
   Discrete par construction : fond neutre, bouton fantome, placee en bas de
   page pour ne pas concurrencer les actions principales. */

.partner-tip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--ground-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-top: 32px;
}
.partner-tip strong { font-size: 15px; }
.partner-tip p {
    margin: 4px 0 0;
    font-size: 13.5px;
    color: var(--ink-soft);
    max-width: 52ch;
}
.partner-tip .btn { flex-shrink: 0; }

@media (max-width: 560px) {
    .partner-tip { flex-direction: column; align-items: stretch; }
    .partner-tip .btn { text-align: center; }
}
