/*
 * Site du mariage d'Etienne et Laetitia.
 * Palette du faire-part : texte brun, fond et en-têtes terre cuite, cartes crème.
 * Deux mises en page : une carte centrée pour la connexion (.cadre), et une page
 * pleine largeur avec barre de navigation pour les invités connectés (.site).
 * Aucune ressource tierce : polices du système uniquement (§ 2 du CLAUDE.md).
 */

/* Police de la signature : Rouge Script (licence SIL OFL, voir licences/), servie par le site. */
@font-face {
    font-family: "Rouge Script";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/rouge-script.woff2") format("woff2");
}

:root {
    --texte: #82523d;
    --texte-fonce: #5f3a2a;      /* survol des liens et boutons */
    /* Terre cuite du faire-part (#c67c5f), assombrie pour que le texte crème posé dessus
       atteigne 4,5:1 (WCAG AA, CLAUDE.md § 6) ; même teinte. */
    --terre: #ad5d3e;            /* fond et en-têtes */
    --terre-fonce: #90563e;      /* filets, survols et petits titres (5,7:1 sur crème) */
    --creme: #fffbf0;            /* cartes */
    --sable: #f7efdc;            /* cartes dans une carte, champs groupés */
    --bordure: #ead9c4;          /* filets décoratifs */
    --bordure-champ: #a27f6f;    /* champs et réponses Oui / Non : 3:1 au moins sur blanc, crème et sable */
    --accent: var(--texte);      /* noms conservés pour l'administration */
    --fond: var(--creme);

    --titres: Didot, "Bodoni 72", "Bodoni MT", "Playfair Display", "Times New Roman", serif;
    --lecture: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --rayon: 1.25rem;
    --ombre: 0 0.5rem 1.8rem rgb(95 58 42 / 16%);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--terre);
    color: var(--texte);
    font-family: var(--lecture);
    font-size: 1.0625rem;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--titres);
    font-weight: normal;
    line-height: 1.15;
    text-wrap: balance;
}

p {
    margin: 0.5rem 0;
}

a {
    color: var(--texte);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--texte-fonce);
}

/* Lien « Aller au contenu » (page du foyer) : caché hors de l'écran, il apparaît au premier Tab. */
.evitement {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--creme);
    color: var(--texte);
    border-radius: 0.6rem;
    box-shadow: var(--ombre);
    transform: translateY(-200%);
}

.evitement:focus {
    transform: none;
}

:focus-visible {
    outline: 3px solid var(--texte);
    outline-offset: 2px;
    border-radius: 0.2rem;
}

/* ------------------------------------------------------- boutons et formulaires */

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

input[type="text"], input[type="email"], input[type="number"], input[type="file"], textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: #fff;
    border: 1px solid var(--bordure-champ);
    border-radius: 0.6rem;
}

input:focus, textarea:focus {
    border-color: var(--texte);
}

button, .bouton {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--texte);
    color: var(--creme);
    border: 1px solid var(--texte);
    border-radius: 2rem;
    font-family: var(--titres);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

button:hover, .bouton:hover {
    background: var(--texte-fonce);
    border-color: var(--texte-fonce);
    color: var(--creme);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sur fond terre cuite : bouton crème, ou simple contour */
.bouton.clair {
    background: var(--creme);
    border-color: var(--creme);
    color: var(--texte);
}

.bouton.clair:hover {
    background: #fff;
    border-color: #fff;
    color: var(--texte-fonce);
}

.bouton.contour {
    background: none;
    border-color: var(--creme);
    color: var(--creme);
}

.bouton.contour:hover {
    background: rgb(255 251 240 / 14%);
    border-color: var(--creme);
    color: var(--creme);
}

button.lien {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: 0;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

button.lien:hover {
    background: none;
    color: inherit;
    opacity: 0.8;
}

.aide {
    margin: 0;
    font-size: 0.9rem;
}

.langues {
    display: flex;
    gap: 0.3rem;
}

.langues button {
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    background: none;
    color: var(--texte);
    border: 1px solid var(--bordure);
}

.langues button[aria-current] {
    background: var(--texte);
    color: var(--creme);
    border-color: var(--texte);
    opacity: 1;
    cursor: default;
}

/* ------------------------------------------------------------------ messages */

.erreur, .succes {
    max-width: 22rem;
    margin: 1.5rem auto 0;
    padding: 0.8rem 1rem;
    border-radius: 0.7rem;
    text-align: left;
}

.erreur {
    background: #fbe9e4;
    border: 1px solid #e9b3a6;
    color: #7a2a18;
}

.succes {
    background: #eef5e6;
    border: 1px solid #b9d0a4;
    color: #33531f;
}

.erreur.large, .succes {
    max-width: none;
}

.erreur p {
    margin: 0;
}

.erreur ul {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
}

/* ================================================================== connexion */

body:not(.site):not(.admin) {
    padding: clamp(0.6rem, 2.5vw, 2rem);
}

.cadre {
    max-width: 34rem;
    margin: clamp(0rem, 6vh, 4rem) auto 0;
    padding: clamp(1rem, 4vw, 2rem) clamp(1rem, 5vw, 2.5rem) 1.5rem;
    background: var(--creme);
    border-radius: clamp(1.2rem, 4vw, 2rem);
    box-shadow: var(--ombre);
}

.cadre .langues {
    justify-content: flex-end;
}

.marque {
    margin-top: 0.5rem;
    text-align: center;
}

.marque img {
    width: clamp(5.5rem, 22vw, 7.5rem);
}

.page {
    text-align: center;
}

.page h1 {
    margin: 0.8rem 0 0.4rem;
    font-size: clamp(1.9rem, 6.5vw, 2.6rem);
}

/* Nos deux prénoms, dans la police de la signature */
.page h1.noms {
    font-family: "Rouge Script", "Snell Roundhand", "Apple Chancery", cursive;
    font-size: clamp(2.8rem, 10vw, 3.8rem);
    line-height: 1.1;
}

.date {
    margin: 0;
    font-family: var(--titres);
    font-size: clamp(0.95rem, 3.6vw, 1.1rem);
    letter-spacing: clamp(0.02em, 0.5vw, 0.08em);
    text-wrap: balance;
}

.carte {
    display: grid;
    gap: 0.6rem;
    max-width: 22rem;
    margin: 2rem auto 0;
    text-align: left;
}

.carte button {
    margin-top: 0.4rem;
}

/* Seul le code s'affiche en capitales ; le nom reste tel que saisi. */
#code {
    font-size: 1.25rem;
    letter-spacing: 0.18em;
    text-align: center;
    text-transform: uppercase;
}

.discret {
    margin-top: 2.5rem;
    font-size: 0.9rem;
}

.pied {
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--bordure);
    font-size: 0.9rem;
    text-align: center;
}

.pied p {
    margin: 0;
}

/* ============================================================ page des invités */

.largeur {
    width: min(100% - 2rem, 70rem);
    margin-inline: auto;
}

.largeur.etroit {
    width: min(100% - 2rem, 38rem);
}

/* --- Barre de navigation, toujours visible */

.entete-site {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--creme);    /* barre crème, texte brun : elle se détache du fond terre cuite */
    border-bottom: 1px solid var(--bordure);
    box-shadow: 0 0.2rem 0.8rem rgb(95 58 42 / 12%);
    color: var(--texte);
}

.entete-ligne {
    display: flex;
    align-items: center;
    gap: 0.5rem 1.2rem;
    width: min(100% - 2rem, 70rem);
    min-height: 4.2rem;
    margin-inline: auto;
}

.logo {
    flex: none;
    line-height: 0;
}

.logo img {
    width: 2.8rem;
}

.entete-site nav {
    flex: 1;
    min-width: 0;
}

.entete-site nav ul {
    display: flex;
    justify-content: center;
    gap: 0.2rem 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.entete-site nav a {
    display: block;
    padding: 0.5rem 0.1rem;
    color: var(--texte);
    font-family: var(--titres);
    font-size: 1.08rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.entete-site nav a:hover {
    border-bottom-color: var(--texte);
}

.bouton.action {
    flex: none;
    padding: 0.5rem 1.4rem;
    letter-spacing: 0.12em;
}

.accueil :focus-visible, .fonce :focus-visible, .pied-site :focus-visible {
    outline-color: var(--creme);
}

/* --- Accueil : l'annonce et la grande photo */

.accueil {
    padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 7vw, 5rem);
    color: var(--creme);
}

.deux-colonnes {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
}

.accueil h1 {
    margin: 0 0 1.2rem;
    font-family: "Rouge Script", "Snell Roundhand", "Apple Chancery", cursive;
    font-size: clamp(3.2rem, 8vw, 5.5rem);
    line-height: 1.05;
    text-wrap: balance;
}

.lettre {
    max-width: 34rem;
    font-size: clamp(1.05rem, 1.9vw, 1.2rem);
    line-height: 1.6;
}

.lettre p {
    margin: 0 0 0.9rem;
}

.signature {
    margin: 1.4rem 0 0;
    font-family: "Rouge Script", "Snell Roundhand", "Apple Chancery", cursive;
    font-size: clamp(2.6rem, 5.5vw, 3.6rem);
    line-height: 1.1;
}

.signature span {
    display: block;
    margin-bottom: 0.2rem;
    font-family: var(--lecture);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.6;
}

/* --- Compte à rebours : une section à elle seule, entre l'accueil et le programme */

.bloc.fonce > .compte {
    padding-top: clamp(0.5rem, 2vw, 1.5rem);
    padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.compte p {
    margin: 0;
}

.compte-nombre {
    font-family: var(--titres);
    font-size: clamp(4.5rem, 16vw, 9rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.compte-texte {
    margin-top: 0.4rem;
    font-family: var(--titres);
    font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.compte .compte-date {
    margin-top: 1rem;
    font-style: italic;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 2rem 0 0;
}

/* --- Photos : une image, ou un cadre décoratif tant qu'elle manque */

.photo {
    display: block;
    width: 100%;
    object-fit: cover;
    border: 0.5rem solid var(--creme);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    background: var(--sable);
}

.photo.portrait {
    aspect-ratio: 4 / 5;
}

.photo.paysage {
    aspect-ratio: 3 / 2;
}

.photo.vide {
    display: grid;
    place-items: center;
}

.photo.vide img {
    width: 34%;
    opacity: 0.28;
}

.galerie {
    padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.bande {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.6rem, 2vw, 1.5rem);
}

/* --- Sections : une grande carte crème posée sur le fond */

.bloc {
    padding: clamp(1rem, 3vw, 2rem) 0;
}

.bloc > .largeur {
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--creme);
    border-radius: clamp(1.2rem, 3vw, 2rem);
    box-shadow: var(--ombre);
}

.bloc.fonce > .largeur {
    background: none;
    box-shadow: none;
    color: var(--creme);
    text-align: center;
}

.titre-section {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
}

.titre-section h2 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.titre-section h2::after {
    content: "";
    display: block;
    width: 3.5rem;
    height: 2px;
    margin: 0.8rem auto 0;
    background: currentcolor;
    opacity: 0.55;
}

.titre-section p {
    margin: 0.8rem 0 0;
    font-style: italic;
}

/* --- Programme : une frise, horizontale sur grand écran */

.frise {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 2rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

.frise li {
    position: relative;
}

.pictogramme {
    display: grid;
    place-items: center;
    height: 7.5rem;
    margin-bottom: 1.6rem;
}

.pictogramme img {
    width: auto;
    height: auto;
    max-height: 7.5rem;
    max-width: min(100%, 13rem);
}

/* Le fil de la journée : un trait et un point sous chaque pictogramme */
.frise li::before {
    content: "";
    position: absolute;
    top: 8.25rem;
    left: -0.75rem;
    right: -0.75rem;
    height: 1px;
    background: var(--terre);
}

.frise li:first-child::before {
    left: 50%;
}

.frise li:last-child::before {
    right: 50%;
}

.frise li::after {
    content: "";
    position: absolute;
    top: calc(8.25rem - 0.3rem);
    left: calc(50% - 0.35rem);
    width: 0.7rem;
    height: 0.7rem;
    background: var(--terre);
    border: 2px solid var(--creme);
    border-radius: 50%;
}

.heure {
    margin: 0;
    font-family: var(--titres);
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terre-fonce);
}

.frise h3 {
    margin: 0.3rem 0 0.4rem;
    font-size: 1.5rem;
}

.frise p:last-child {
    margin: 0;
}

/* --- Les lieux : une carte OpenStreetMap par lieu */

.lieux {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: 1.2rem;
}

.lieu {
    overflow: hidden;
    background: var(--sable);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    scroll-margin-top: 6rem;
}

.lieu iframe {
    display: block;
    width: 100%;
    height: clamp(15rem, 34vw, 21rem);
    border: 0;
    background: var(--bordure);
}

.lieu-texte {
    padding: 1rem 1.5rem 1.2rem;
}

.lieu-texte h3 {
    font-size: 1.5rem;
}

.lieu-texte p {
    margin: 0.3rem 0 0;
}

.credit {
    margin: 0.6rem 0 1.6rem;
    text-align: right;
}

/* --- Informations pratiques : une carte par rubrique */

.cartes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    align-items: start;
    gap: 1.2rem;
}

.carte-info {
    padding: 1.4rem 1.5rem;
    background: var(--sable);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    scroll-margin-top: 6rem;
}

.carte-info h3 {
    margin-bottom: 0.8rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--terre);
    font-size: 1.5rem;
}

.carte-info h4 {
    margin: 1.2rem 0 0.2rem;
    font-size: 1.1rem;
    letter-spacing: 0.03em;
}

.carte-info ul, .carte-info ol {
    margin: 0.5rem 0;
    padding-left: 1.2rem;
}

.carte-info li::marker {
    color: var(--terre);
}

.carte-info hr {
    border: 0;
    border-top: 1px solid var(--bordure);
}

/* --- Liste de mariage : à venir */

.a-venir img {
    display: block;
    width: 5rem;
    margin-inline: auto;
    filter: brightness(0) invert(1);   /* le cœur brun devient crème sur le fond terre cuite */
    opacity: 0.9;
}

.pastille {
    display: inline-block;
    margin: 1rem 0 0.4rem;
    padding: 0.25rem 1.1rem;
    border: 1px solid var(--creme);
    border-radius: 2rem;
    font-family: var(--titres);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.a-venir p:last-child {
    margin: 0.4rem 0 0;
    font-size: 1.1rem;
}

/* --- Réponse */

.reponse {
    max-width: 58rem;
    margin-inline: auto;
}

.rsvp {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.rsvp > .aide, .rsvp > button, .rsvp > .ajout {
    grid-column: 1 / -1;
}

/* « Ajouter une personne » : un bouton qui déplie la carte, sans script. */
.ajout > summary {
    display: flex;
    justify-content: center;
    list-style: none;
    cursor: pointer;
}

.ajout > summary::-webkit-details-marker {
    display: none;
}

.ajout:not([open]) + .ajout:not([open]) {
    display: none;   /* la carte suivante n'apparaît qu'une fois la précédente ouverte */
}

.ajout[open] > summary {
    display: none;
}

.ajout > .personne {
    max-width: 30rem;
    margin: 0 auto;
}

.rsvp > button {
    justify-self: center;
    min-width: min(100%, 17rem);
    padding: 0.85rem 2rem;
    font-size: 1.15rem;
}

.personne {
    display: grid;
    align-content: start;
    gap: 0.9rem;
    min-width: 0;
    margin: 0;
    padding: 1rem 1.1rem 1.2rem;
    background: var(--sable);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
}

.personne > legend {
    padding: 0 0.5rem;
    font-family: var(--titres);
    font-size: 1.3rem;
}

.rsvp label {
    display: grid;
    gap: 0.3rem;
}

.rsvp textarea {
    resize: vertical;
}

/* Une question Oui / Non : un fieldset (sa légende est la question), sans cadre propre. */
.choix {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

/* Une légende flottante redevient un élément ordinaire du fieldset, donc de la mise en page flexible. */
.choix .question {
    float: left;
    flex: 1 1 100%;
    padding: 0;
}

/* Oui / Non : de grandes cibles, faciles à toucher sur un téléphone */
.choix .option {
    position: relative;
    display: flex;
    flex: 1 1 0;
}

/*
 * Réponse facultative : une fois cochée, elle est recouverte d'un libellé identique qui
 * coche le bouton « vide » (masqué) ; recliquer sur la réponse la décoche donc.
 */
.choix .vide {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.choix .decocher {
    display: none;
    position: absolute;
    inset: 0;
}

.choix .option:has(> label input:checked) .decocher {
    display: flex;
    background: var(--texte);
    border-color: var(--texte);
    color: var(--creme);
}

.choix .puce {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: radial-gradient(circle, var(--texte) 0 32%, var(--creme) 36%);
}

.choix label {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    background: #fff;
    border: 1px solid var(--bordure-champ);
    border-radius: 2rem;
    cursor: pointer;
}

.choix label:has(input:checked) {
    background: var(--texte);
    border-color: var(--texte);
    color: var(--creme);
}

.choix label:has(input:focus-visible) {
    outline: 3px solid var(--texte);
    outline-offset: 2px;
}

.si-voiture {
    display: grid;
    gap: 0.3rem;
}

/*
 * Questions qui dépendent d'une autre réponse, sans JavaScript :
 * - les places de covoiturage, si le foyer vient en voiture ;
 * - les places de covoiturage entre la mairie et la réception, si le foyer ne vient pas
 *   en voiture.
 * Un navigateur qui ne connaît pas :has() affiche simplement tout.
 */
@supports selector(:has(a)) {
    .rsvp .si-voiture, .rsvp .si-sans-voiture {
        display: none;
    }

    .rsvp:has(input[name="vehicule"][value="oui"]:checked) .si-voiture {
        display: grid;
    }

    .rsvp:has(input[name="vehicule"][value="non"]:checked) .si-sans-voiture {
        display: flex;
    }
}

.rsvp label.case {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.rsvp input[type="radio"], .rsvp input[type="checkbox"] {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    accent-color: var(--texte);
}

.choix label:has(input:checked) input {
    accent-color: var(--creme);
}

.deux {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.8rem;
}

.recapitulatif {
    padding-left: 1.2rem;
}

/* --- Pied de page */

.pied-site {
    padding: clamp(2rem, 5vw, 3.5rem) 0 2.5rem;
    color: var(--creme);
    text-align: center;
}

.pied-site img {
    width: 4rem;
}

.pied-site a {
    color: var(--creme);
}

.pied-site form {
    margin-top: 0.6rem;
    font-size: 0.9rem;
}

code {
    font-size: 0.95em;
}

/* ------------------------------------------------------------- écrans étroits */

@media (max-width: 56rem) {
    html {
        scroll-padding-top: 7.5rem;
    }

    /* La barre passe sur deux lignes : logo, langues et RSVP, puis les sections à faire défiler */
    .entete-ligne {
        flex-wrap: wrap;
        min-height: 0;
        padding-top: 0.5rem;
    }

    .entete-site nav {
        order: 4;
        flex: 1 0 100%;
        margin-inline: -1rem;
        padding-inline: 1rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .entete-site nav ul {
        justify-content: flex-start;
        gap: 0 1.4rem;
    }

    .entete-site .langues {
        margin-left: auto;
    }

    .deux-colonnes {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .actions {
        justify-content: center;
    }

    .photo.portrait {
        max-width: 24rem;
        margin-inline: auto;
        aspect-ratio: 1;
    }
}

@media (max-width: 40rem) {
    /* Frise verticale : le pictogramme à gauche, le fil qui descend */
    .frise {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: left;
    }

    .frise li {
        display: grid;
        grid-template-columns: 5rem 1fr;
        column-gap: 1.6rem;
        padding-bottom: 1.8rem;
    }

    .frise li:last-child {
        padding-bottom: 0;
    }

    .pictogramme {
        grid-row: 1 / span 3;
        height: 4.5rem;
        margin: 0;
    }

    .pictogramme img {
        max-height: 4.5rem;
        max-width: 5rem;
    }

    .frise li::before {
        top: 0.4rem;
        bottom: 0;
        left: 5.8rem;
        right: auto;
        width: 1px;
        height: auto;
    }

    .frise li:first-child::before {
        left: 5.8rem;
    }

    .frise li:last-child::before {
        right: auto;
        bottom: auto;
        height: 1rem;
    }

    .frise li::after {
        top: 0.4rem;
        left: calc(5.8rem - 0.35rem);
    }

    .bande {
        grid-template-columns: 1fr;
    }

    .bande .photo:nth-child(n+2) {
        display: none;   /* une seule photo du lieu sur téléphone */
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media print {
    body {
        background: none;
    }

    .entete-site, .galerie, .actions, .pied-site form, .rsvp > button {
        display: none;
    }
}

/* ================================================================== mode sombre */
/*
 * Thème classique seulement (CLAUDE.md § 6) : la page suit le réglage de l'appareil, sans
 * bouton ni JavaScript. Les thèmes lin et guinguette et l'admin restent clairs.
 * Les variables gardent leur rôle de couleur de texte (--texte) et de fond de carte
 * (--creme) ; les règles où la crème sert de texte sur la terre cuite sont reprises une à une.
 */
html.theme-classique {
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    html.theme-classique {
        --nuit: #231713;               /* fond de page */
        --accent-sombre: #e3916f;      /* terre cuite claire : boutons, liens, repères */
        --accent-sombre-survol: #f0a585;
        --champ-sombre: #1d130f;       /* fond des champs et des réponses Oui / Non */

        --texte: #f4e7d4;              /* crème : texte courant (14:1 sur le fond) */
        --texte-fonce: #ffffff;        /* survol des liens */
        --terre: var(--nuit);
        --terre-fonce: var(--accent-sombre);
        --creme: #33221b;              /* cartes */
        --sable: #3f2a21;              /* cartes dans une carte */
        --bordure: #4d362b;            /* filets décoratifs */
        --bordure-champ: #9c7b6a;      /* 3,5:1 au moins sur les cartes et les champs */
        --ombre: 0 0.5rem 1.8rem rgb(0 0 0 / 45%);
    }

    /* Texte posé directement sur le fond de page (crème en clair) */
    html.theme-classique .accueil,
    html.theme-classique .bloc.fonce > .largeur,
    html.theme-classique .pied-site,
    html.theme-classique .pied-site a {
        color: var(--texte);
    }

    html.theme-classique .accueil :focus-visible,
    html.theme-classique .fonce :focus-visible,
    html.theme-classique .pied-site :focus-visible {
        outline-color: var(--texte);
    }

    /* Boutons : terre cuite claire, texte brun nuit (7:1) */
    html.theme-classique button,
    html.theme-classique .bouton,
    html.theme-classique .bouton.clair {
        background: var(--accent-sombre);
        border-color: var(--accent-sombre);
        color: var(--nuit);
    }

    html.theme-classique button:hover,
    html.theme-classique .bouton:hover,
    html.theme-classique .bouton.clair:hover {
        background: var(--accent-sombre-survol);
        border-color: var(--accent-sombre-survol);
        color: var(--nuit);
    }

    html.theme-classique .bouton.contour,
    html.theme-classique .bouton.contour:hover {
        background: none;
        border-color: var(--texte);
        color: var(--texte);
    }

    html.theme-classique button.lien,
    html.theme-classique button.lien:hover {
        background: none;
        border-color: transparent;
        color: inherit;
    }

    html.theme-classique .langues button {
        background: none;
        border-color: var(--bordure-champ);
        color: var(--texte);
    }

    html.theme-classique .langues button[aria-current] {
        background: var(--accent-sombre);
        border-color: var(--accent-sombre);
        color: var(--nuit);
    }

    /* Champs et réponses Oui / Non : fond plus sombre que la carte, texte crème */
    html.theme-classique input[type="text"],
    html.theme-classique input[type="email"],
    html.theme-classique input[type="number"],
    html.theme-classique input[type="file"],
    html.theme-classique textarea,
    html.theme-classique .choix label {
        background: var(--champ-sombre);
        color: var(--texte);
    }

    html.theme-classique .choix label:has(input:checked),
    html.theme-classique .choix .option:has(> label input:checked) .decocher {
        background: var(--accent-sombre);
        border-color: var(--accent-sombre);
        color: var(--nuit);
    }

    html.theme-classique .rsvp input[type="radio"],
    html.theme-classique .rsvp input[type="checkbox"] {
        accent-color: var(--accent-sombre);
    }

    html.theme-classique .choix label:has(input:checked) input {
        accent-color: var(--nuit);
    }

    html.theme-classique .choix .puce {
        background: radial-gradient(circle, var(--nuit) 0 32%, var(--accent-sombre) 36%);
    }

    /* Repères terre cuite (frise, listes, filets de titre) : en terre cuite claire sur les cartes */
    html.theme-classique .frise li::before,
    html.theme-classique .frise li::after {
        background: var(--accent-sombre);
    }

    html.theme-classique .carte-info h3 {
        border-bottom-color: var(--accent-sombre);
    }

    html.theme-classique .carte-info li::marker {
        color: var(--accent-sombre);
    }

    html.theme-classique .pastille {
        border-color: var(--texte);
    }

    /* Messages : mêmes teintes, assombries */
    html.theme-classique .erreur {
        background: #4a1f17;
        border-color: #c0634c;
        color: #ffd9cf;
    }

    html.theme-classique .succes {
        background: #1f3318;
        border-color: #6f9a55;
        color: #d9f0c8;
    }

    html.theme-classique .entete-site {
        box-shadow: 0 0.2rem 0.8rem rgb(0 0 0 / 35%);
    }

    /* Monogramme (brun) : rendu crème ; pictogrammes du faire-part : éclaircis */
    html.theme-classique .logo img,
    html.theme-classique .marque img,
    html.theme-classique .photo.vide img {
        filter: brightness(0) invert(0.92) sepia(0.25);
    }

    html.theme-classique .pictogramme img,
    html.theme-classique .a-venir img {
        filter: brightness(1.7);
    }
}
