/* Site de mariage — Arrow Design */

:root {
    --ivoire:  #fbf8f3;
    --sable:   #ece3d6;
    --encre:   #2e2a26;
    --plume:   #7d746a;
    --or:      #a98b5d;
    --or-pale: #d7c39c;
    --vert:    #4d7a5f;
    --brique:  #a8553f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ivoire);
    color: var(--encre);
    font-family: Karla, system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: Marcellus, Georgia, serif; font-weight: 400; margin: 0; }

a { color: inherit; }

::selection { background: var(--or-pale); color: var(--encre); }

/* =====================================================================
   Barre de navigation
   ===================================================================== */
.navigation {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 34px;
    transition: background .4s ease, padding .4s ease, box-shadow .4s ease;
}
.navigation.posee {
    background: rgba(251, 248, 243, .93);
    backdrop-filter: blur(10px);
    padding: 13px 34px;
    box-shadow: 0 1px 0 rgba(46, 42, 38, .07);
}
.navigation-marque {
    font-family: Marcellus, serif; font-size: 19px; text-decoration: none;
    letter-spacing: .02em;
}
.esperluette { color: var(--or); font-style: italic; }
.navigation nav { display: flex; gap: 30px; }
.navigation nav a {
    text-decoration: none; font-size: 15px; color: var(--plume);
    padding-bottom: 3px; border-bottom: 1px solid transparent;
    transition: color .25s ease, border-color .25s ease;
}
.navigation nav a:hover { color: var(--encre); }
.navigation nav a.actif { color: var(--encre); border-bottom-color: var(--or); }

.navigation-bouton { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.navigation-bouton span {
    display: block; width: 24px; height: 1px; background: var(--encre); margin: 6px 0;
    transition: transform .3s ease, opacity .3s ease;
}
.navigation.ouvert .navigation-bouton span:first-child { transform: translateY(3.5px) rotate(45deg); }
.navigation.ouvert .navigation-bouton span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* =====================================================================
   Invitation
   ===================================================================== */
.invitation {
    position: relative; min-height: 100svh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 120px 26px 90px; overflow: hidden;
}

/* L'arc est dessiné aux dimensions du bloc de contenu : les prénoms
   restent donc toujours à l'intérieur, quelle que soit leur longueur. */
.invitation-contenu {
    position: relative; z-index: 2;
    width: 100%; max-width: 620px; margin: 0 auto;
    padding: 70px 52px 58px;
}

.arc {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: -1; overflow: visible;
}
.arc path {
    fill: none; stroke: var(--or-pale); stroke-width: 1;
    stroke-dasharray: 2400; stroke-dashoffset: 2400;
    animation: tracer 2.6s cubic-bezier(.22,.61,.36,1) .3s forwards;
}
@keyframes tracer { to { stroke-dashoffset: 0; } }

.sur-titre {
    font-size: 14px; letter-spacing: .16em; color: var(--plume);
    margin: 0 0 26px; opacity: 0; animation: monter .9s ease .5s forwards;
}

.prenoms {
    font-size: clamp(52px, 12vw, 108px); line-height: 1.02;
    letter-spacing: -.005em; margin: 0;
}
.prenoms span { display: block; opacity: 0; }
.prenoms .un   { animation: monter 1s ease .8s forwards; }
.prenoms .lien {
    font-size: .46em; color: var(--or); font-style: italic;
    margin: .12em 0; animation: monter 1s ease 1.15s forwards;
}
.prenoms .deux { animation: monter 1s ease 1.4s forwards; }

@keyframes monter {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

/* Mot d'introduction, écrit à la main, entre les prénoms et la date */
.mot-intro {



    font-family: Marcellus, serif; font-size: clamp(19px, 3.4vw, 25px);
    margin: 26px 0 0; opacity: 0; animation: monter .9s ease 2.15s forwards;
}

.filet {
    width: 64px; height: 1px; background: var(--or); margin: 34px auto 0;
    transform: scaleX(0); animation: etirer .9s ease 1.95s forwards;
}
@keyframes etirer { to { transform: scaleX(1); } }

.date-mariage {
    font-family: "Marcellus", cursive;
    font-weight: 600;
    font-size: clamp(21px, 3.4vw, 26px);
    line-height: 1.75;
    color: var(--encre);
    margin: 30px auto 0;
    max-width: 30ch;
    opacity: 0; animation: monter 1s ease 1.65s forwards;

}
.lieu { color: var(--plume); font-size: 16px; margin: 8px 0 0; opacity: 0;
        animation: monter .9s ease 2.3s forwards; }

.compte-a-rebours {
    margin: 30px 0 0; font-size: 15px; color: var(--plume);
    opacity: 0; animation: monter .9s ease 2.45s forwards;
}
.compte-a-rebours strong { color: var(--or); font-weight: 500; font-size: 17px; }

.descendre {
    position: absolute; bottom: 34px; left: 50%;
    transform: translateX(-50%) translateY(18px);
    color: var(--plume); font-size: 13px; text-decoration: none;
    opacity: 0; animation: monter-centre .9s ease 2.75s forwards;
    display: flex; flex-direction: column; align-items: center; gap: 9px;
    text-align: center;
}
/* Animation dédiée : « monter » se termine par transform:none, ce qui
   annulerait le centrage horizontal. */
@keyframes monter-centre {
    to { opacity: 1; transform: translateX(-50%); }
}
.descendre::after {
    content: ''; width: 1px; height: 34px;
    background: linear-gradient(var(--or-pale), transparent);
}

/* =====================================================================
   Le foyer invité
   ===================================================================== */
.foyer {
    max-width: 640px; margin: 0 auto; padding: 96px 26px 110px; text-align: center;
}
.foyer-cadre {
    border: 1px solid var(--sable); border-radius: 2px;
    padding: 54px 40px; background: #fff;
    position: relative;
}
.foyer-cadre::before, .foyer-cadre::after {
    content: ''; position: absolute; width: 26px; height: 26px;
    border: 1px solid var(--or);
}
.foyer-cadre::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.foyer-cadre::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.foyer h2 { font-size: 25px; margin-bottom: 20px; }
.foyer-noms {
    font-family: Marcellus, serif; font-size: clamp(23px, 5vw, 31px);
    line-height: 1.4; color: var(--encre); margin: 0;
}
.foyer-detail { color: var(--plume); font-size: 15px; margin: 18px 0 0; }
.foyer-mot {
    margin: 30px 0 0; padding-top: 26px; border-top: 1px solid var(--sable);
    font-style: italic; color: var(--plume); font-size: 16px;
}

/* --- Appel à l'action --- */
.appel { text-align: center; padding: 0 26px 110px; }
.bouton-or {
    display: inline-block; padding: 15px 40px; text-decoration: none;
    background: var(--encre); color: var(--ivoire); font-size: 15px;
    font-family: inherit; letter-spacing: .03em; border: 0;
    border-radius: 40px; cursor: pointer;
    transition: background .3s ease, transform .3s ease;
}
.bouton-or:hover { background: var(--or); transform: translateY(-2px); }
.appel p { font-size: 14px; color: var(--plume); margin: 16px 0 0; }

/* =====================================================================
   Feuille intérieure — papeterie gravée
   ===================================================================== */
.feuille { max-width: 620px; margin: 0 auto; padding: 150px 26px 100px; }

.feuille-entete { text-align: center; margin-bottom: 46px; }
.ornement { width: 118px; height: auto; display: block; margin: 0 auto 22px; }
.ornement path   { fill: none; stroke: var(--or-pale); stroke-width: 1; }
.ornement circle { fill: var(--or); }
.feuille-entete h1 {
    font-size: clamp(30px, 6vw, 42px); line-height: 1.15; letter-spacing: -.01em;
}
.feuille-foyer {
    margin: 14px 0 0; color: var(--plume); font-size: 15px; letter-spacing: .1em;
}

.avis {
    margin: 0 0 26px; padding: 13px 20px; font-size: 15px; text-align: center;
    border-top: 1px solid; border-bottom: 1px solid;
}
.avis-succes { color: var(--vert);   border-color: #d5e2d9; }
.avis-erreur { color: var(--brique); border-color: #e8cfc7; }

/* --- La carte : double filet façon gravure --- */
.carte {
    position: relative; background: #fff;
    border: 1px solid var(--sable); padding: 46px 44px 40px;
}
.carte::before {
    content: ''; position: absolute; inset: 7px; pointer-events: none;
    border: 1px solid #f2ebe0;
}
.carte > * { position: relative; }

.carte-texte {
    margin: 0 0 34px; text-align: center; color: var(--plume);
    font-size: 15.5px; line-height: 1.7;
}
.rubrique {
    margin: 34px 0 6px; padding-top: 26px; border-top: 1px solid #f2ebe0;
    font-family: Marcellus, serif; font-size: 15px; color: var(--or);
    letter-spacing: .08em; text-align: center;
}

/* --- Une personne, un choix --- */
.convive {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 20px; padding: 19px 0; border-bottom: 1px solid #f4efe6;
}
.convive:last-of-type { border-bottom: 0; }
.convive-nom { font-family: Marcellus, serif; font-size: 21px; line-height: 1.3; }

.bascule { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.bascule-filet { width: 1px; height: 15px; background: var(--sable); }

.bascule-choix { position: relative; display: block; cursor: pointer; }
.bascule-choix input {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; margin: 0; cursor: pointer;
}
.bascule-choix span {
    display: block; padding: 6px 16px 8px; font-size: 16px;
    color: #b8afa4; letter-spacing: .03em; position: relative;
    transition: color .25s ease;
}
.bascule-choix span::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: 2px;
    height: 1px; background: var(--or); transform: scaleX(0);
    transform-origin: center; transition: transform .3s cubic-bezier(.22,.61,.36,1);
}
.bascule-choix:hover span { color: var(--plume); }
.bascule-choix input:checked + span { color: var(--encre); }
.bascule-choix input:checked + span::after { transform: scaleX(1); }
.bascule-choix input:focus-visible + span {
    outline: 1px solid var(--or); outline-offset: 3px; border-radius: 2px;
}

/* --- Le mot libre --- */
.mot { margin-top: 38px; padding-top: 30px; border-top: 1px solid #f2ebe0; }
.mot label {
    display: block; font-family: Marcellus, serif; font-size: 16px;
    color: var(--plume); margin-bottom: 12px; text-align: center;
}
.mot textarea {
    width: 100%; padding: 8px 2px; font-family: inherit; font-size: 16px;
    color: inherit; line-height: 1.7; background: transparent; resize: vertical;
    border: 0; border-bottom: 1px solid var(--sable);
    transition: border-color .25s ease;
}
.mot textarea::placeholder { color: #c4bbb0; }
.mot textarea:focus { outline: 0; border-bottom-color: var(--or); }

/* --- Pied de carte --- */
.carte-pied { margin: 38px 0 0; text-align: center; }
.progression {
    margin: 0 0 16px; font-size: 13px; color: #b8afa4; letter-spacing: .06em;
    min-height: 18px;
}
.mention { margin: 18px 0 0; font-size: 13.5px; color: var(--plume); }

.lien-souligne {
    text-decoration: none; font-size: 15px; color: var(--plume);
    border-bottom: 1px solid var(--or-pale); padding-bottom: 3px;
    transition: color .25s ease, border-color .25s ease;
}
.lien-souligne:hover { color: var(--encre); border-bottom-color: var(--or); }

/* --- Sceau du récapitulatif --- */
.sceau {
    width: 62px; height: 62px; margin: 0 auto 34px;
    border: 1px solid var(--or); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.sceau span {
    font-family: Marcellus, serif; font-size: 21px; color: var(--or);
    letter-spacing: .04em;
}

/* --- Récapitulatif --- */
.recap { list-style: none; margin: 0; padding: 0; }
.recap li {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; padding: 15px 0; border-bottom: 1px solid #f4efe6;
}
.recap li:last-child { border-bottom: 0; }
.recap-nom { font-family: Marcellus, serif; font-size: 20px; }
.recap-etat { font-size: 14px; letter-spacing: .06em; }
.recap-etat.oui { color: var(--vert); }
.recap-etat.non { color: #b8afa4; }

.carte-bilan {
    margin: 30px 0 0; padding-top: 26px; border-top: 1px solid #f2ebe0;
    color: var(--encre); font-family: Marcellus, serif; font-size: 19px;
}
.mot-laisse {
    margin: 20px 0 0; font-style: italic; color: var(--plume);
    font-size: 15.5px; text-align: center; line-height: 1.7;
}

/* =====================================================================
   Programme de la journée
   ===================================================================== */
.feuille-large { max-width: 700px; }

.programme {
    list-style: none; margin: 0; padding: 0;
    position: relative;
}
/* Le fil conducteur de la journée */
.programme::before {
    content: ''; position: absolute; top: 10px; bottom: 10px; left: 106px;
    width: 1px; background: linear-gradient(transparent, var(--or-pale) 8%,
                                            var(--or-pale) 92%, transparent);
}

.moment {
    position: relative; display: grid;
    grid-template-columns: 82px 1fr; gap: 48px;
    padding: 0 0 46px;
}
.moment:last-child { padding-bottom: 0; }

.moment-heure {
    font-family: Marcellus, serif; font-size: 19px; color: var(--or);
    text-align: right; padding-top: 2px; letter-spacing: .02em;
}

/* Le point sur le fil */
.moment::before {
    content: ''; position: absolute; left: 102px; top: 10px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--ivoire); border: 1px solid var(--or);
}

.moment-corps { padding-top: 0; }
.moment-titre {
    font-size: 25px; line-height: 1.25; margin: 0;
}
.moment-lieu {
    margin: 7px 0 0; font-size: 14px; color: var(--or);
    letter-spacing: .06em;
}
.moment-texte {
    margin: 13px 0 0; color: var(--plume); font-size: 15.5px; line-height: 1.7;
}

@media (max-width: 640px) {
    .programme::before { left: 4px; }
    .moment {
        grid-template-columns: 1fr; gap: 0;
        padding-left: 36px; padding-bottom: 38px;
    }
    .moment::before { left: 0; top: 8px; }
    .moment-heure { text-align: left; margin-bottom: 4px; font-size: 17px; }
    .moment-titre { font-size: 22px; }
}

/* =====================================================================
   Plan de table
   ===================================================================== */
.salle {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 22px;
}

.table-salle {
    position: relative; background: #fff; border: 1px solid var(--sable);
    padding: 30px 26px 26px; text-align: center;
}
.table-salle::before {
    content: ''; position: absolute; inset: 6px; border: 1px solid #f4efe6;
    pointer-events: none;
}
.table-salle > * { position: relative; }

.table-salle.ma-table { border-color: var(--or); }
.table-salle.ma-table::before { border-color: var(--or-pale); }

.table-marque {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--ivoire); padding: 0 12px; font-size: 12px;
    letter-spacing: .12em; color: var(--or); white-space: nowrap;
}

.table-nom {
    font-size: 21px; margin: 0 0 6px; line-height: 1.3;
}
.table-nom::after {
    content: ''; display: block; width: 30px; height: 1px;
    background: var(--or-pale); margin: 14px auto 0;
}

.table-convives { list-style: none; margin: 16px 0 0; padding: 0; }
.table-convives li {
    font-size: 15.5px; color: var(--plume); padding: 4px 0; line-height: 1.5;
}
.table-convives li.soi {
    color: var(--encre); font-family: Marcellus, serif; font-size: 17px;
}

@media (max-width: 560px) {
    .salle { grid-template-columns: 1fr; gap: 18px; }
    .table-salle { padding: 28px 22px 24px; }
}

/* --- Page d'accueil publique --- */
.accueil-publique .invitation { padding-top: 60px; }
.accueil-mention {
    margin: 46px 0 0; font-size: 14.5px; line-height: 1.8; color: var(--plume);
    opacity: 0; animation: monter .9s ease 2.5s forwards;
}
.accueil-publique .pied { border-top: 0; }

/* =====================================================================
   Pied de page
   ===================================================================== */
.pied {
    border-top: 1px solid var(--sable); padding: 26px;
    text-align: center; font-size: 12px; color: #b3aa9f; letter-spacing: .1em;
}
.pied p { margin: 0; }

/* =====================================================================
   Page d'erreur
   ===================================================================== */
.page-simple {
    display: flex; align-items: center; justify-content: center;
    min-height: 100svh; padding: 26px;
}
.carte-simple { max-width: 440px; text-align: center; }
.carte-simple h1 { font-size: 27px; margin-bottom: 16px; }
.carte-simple p { color: var(--plume); font-size: 16px; }

/* =====================================================================
   Mobile
   ===================================================================== */
@media (max-width: 760px) {
    .navigation { padding: 16px 22px; }
    .navigation.posee { padding: 12px 22px; }
    .navigation-bouton { display: block; }
    .navigation nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(251, 248, 243, .98);
        backdrop-filter: blur(10px);
        flex-direction: column; gap: 0; padding: 0 22px;
        max-height: 0; overflow: hidden; transition: max-height .35s ease;
        box-shadow: 0 12px 26px rgba(46, 42, 38, .06);
    }
    .navigation.ouvert nav { max-height: 300px; padding-bottom: 14px; }
    .navigation nav a { padding: 14px 0; border-bottom: 1px solid var(--sable); }
    .navigation nav a:last-child { border-bottom: 0; }
    .foyer-cadre { padding: 40px 26px; }
    .invitation-contenu { padding: 62px 30px 52px; }

    .feuille { padding: 118px 20px 80px; }
    .carte { padding: 34px 22px 30px; }
    .carte::before { inset: 5px; }
    .convive { align-items: center; }
    .convive-nom { font-size: 19px; }
    .bascule-choix span { padding: 6px 12px 8px; font-size: 15px; }
    .bascule-choix span::after { left: 12px; right: 12px; }
}

@media (max-width: 400px) {
    .convive { flex-direction: column; align-items: flex-start; gap: 6px; }
    .bascule { margin-left: -16px; }
}

/* =====================================================================
   Mouvement réduit
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .arc path, .prenoms span, .sur-titre, .filet, .mot-intro,
    .date-mariage, .lieu, .compte-a-rebours, .accueil-mention {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
    }
    .descendre {
        animation: none !important;
        opacity: 1 !important;
        transform: translateX(-50%) !important;
    }
    .bascule-choix span::after { transition: none; }
}
