/*
Theme Name: Site Invitation V2
Theme URI: https://innov-events.fr
Author: INNOV'events
Description: Thème d'invitation / d'inscription événementielle — refonte V2. Réutilise les champs ACF de la V1 (page 30). La couleur de l'événement (ACF « couleur ») pilote tout le design.
Version: 2.0.0
Text Domain: site-invitation
Requires PHP: 7.4
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
    /* --accent / --on-accent sont injectés par header.php depuis l'ACF « couleur » */
    --accent: #e8590c;
    --on-accent: #ffffff;
    --color: var(--accent); /* alias hérité de la V1 (pages d'administration) */

    --accent-strong: color-mix(in srgb, var(--accent) 86%, #000);
    --accent-soft: color-mix(in srgb, var(--accent) 10%, #fff);
    --accent-line: color-mix(in srgb, var(--accent) 28%, #fff);

    --ink: #14110f;
    --ink-2: #4a4540;
    --muted: #7b756e;
    --line: #e8e4de;
    --paper: #faf8f5;
    --surface: #ffffff;
    --danger: #c62828;

    --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius-s: 10px;
    --radius-m: 16px;
    --radius-l: 28px;

    --shadow-s: 0 1px 2px rgba(20, 17, 15, 0.06), 0 2px 8px rgba(20, 17, 15, 0.04);
    --shadow-m: 0 8px 30px rgba(20, 17, 15, 0.08);
    --shadow-l: 0 24px 60px rgba(20, 17, 15, 0.14);

    --header-h: 76px;
    --page-w: 1240px;          /* largeur de contenu unique pour tout le site */
    --space-block: 28px;       /* espacement vertical entre deux blocs d'une page */
    --pad-box: clamp(22px, 3.2vw, 40px); /* padding interne de toutes les boîtes */
    --section-y: clamp(64px, 9vw, 112px);
    --gutter: clamp(18px, 4vw, 40px);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body.is-admin {
    --page-w: 1560px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}

h3 {
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-2);
    font-weight: 400;
}

a {
    color: inherit;
}

img,
video,
svg {
    max-width: 100%;
}

img {
    display: block;
}

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

ul,
ol {
    margin: 0;
    padding: 0;
}

li {
    list-style: none;
}

/* Icônes Material Symbols (police chargée par inc/icons.php) */
.mi {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
    overflow: hidden;
    font-family: "Material Symbols Outlined";
    font-size: 1.25em;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    vertical-align: middle;
    font-feature-settings: "liga";
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--accent);
    color: var(--on-accent);
}

/* ==========================================================================
   3. Mise en page
   ========================================================================== */
.site {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.site > main {
    flex: 1 0 auto;
}

.wrap,
.container {
    width: min(var(--page-w), 100% - 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: 0;
    position: relative;
}

.wrap--narrow {
    --page-w: 860px;
}

.wrap--form {
    --page-w: 980px;
}

.section {
    padding-block: var(--section-y);
}

.section--tint {
    background: color-mix(in srgb, var(--accent) 6%, var(--paper));
    border-block: 1px solid var(--line);
}

.section__head {
    max-width: 720px;
    margin-bottom: clamp(32px, 5vw, 56px);
}

.section__head--center {
    margin-inline: auto;
    text-align: center;
}

.section__head .prose {
    margin-top: 16px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.section__head--center .eyebrow::after {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.title-xl {
    font-size: clamp(2rem, 4.2vw, 3.2rem);
}

.title-lg {
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

.prose {
    color: var(--ink-2);
    font-size: 1.05rem;
    line-height: 1.75;
}

.prose > * + * {
    margin-top: 1em;
}

.prose p {
    font-size: inherit;
}

.prose a {
    color: var(--accent-strong);
    text-underline-offset: 3px;
}

.prose ul,
.prose ol {
    padding-left: 1.2em;
}

.prose ul li {
    list-style: disc;
}

.prose ol li {
    list-style: decimal;
}

.prose strong {
    color: var(--ink);
    font-weight: 600;
}

.prose--page h2 {
    margin-top: 1.6em;
    font-size: 1.6rem;
}

.prose--page h3 {
    margin-top: 1.4em;
}

/* ==========================================================================
   4. Boutons
   ========================================================================== */
.btn {
    --btn-bg: var(--accent);
    --btn-fg: var(--on-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: max-content;
    max-width: 100%;
    padding: 13px 24px;
    border: 1px solid var(--btn-bg);
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s, color 0.25s;
}

.btn > span {
    position: relative;
}

.btn .mi {
    font-size: 20px;
    transition: transform 0.25s var(--ease);
}

.btn:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: var(--btn-fg);
    box-shadow: var(--shadow-m);
    transform: translateY(-1px);
}

.btn:hover .mi {
    transform: translateX(3px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.btn--sm {
    padding: 9px 18px;
    font-size: 0.88rem;
}

.btn--lg {
    padding: 16px 30px;
    font-size: 1rem;
}

.btn--ghost {
    --btn-bg: transparent;
    --btn-fg: #fff;
    border-color: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: #fff;
    box-shadow: none;
}

.btn--inverse {
    --btn-bg: #fff;
    --btn-fg: var(--ink);
}

.btn--inverse:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* ==========================================================================
   5. En-tête
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1100; /* au-dessus de tout, y compris les contrôles Leaflet (≤ 1000) */
    background: rgba(250, 248, 245, 0.86);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

body.admin-bar .site-header {
    top: 32px;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
    width: min(var(--page-w), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand__logo {
    height: 38px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: filter 0.3s;
}

.brand__text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.4vw, 34px);
}

.site-nav__link {
    position: relative;
    padding-block: 6px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    transition: color 0.2s;
}

.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.site-nav__link:hover {
    color: var(--ink);
}

.site-nav__link:hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.nav-toggle span {
    position: absolute;
    left: 13px;
    right: 13px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle span:first-child {
    top: 18px;
}

.nav-toggle span:last-child {
    top: 25px;
}

.nav-toggle[aria-expanded="true"] span:first-child {
    top: 21px;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
    top: 21px;
    transform: rotate(-45deg);
}

/* Page d'accueil : en-tête transparent au-dessus du hero */
body.has-hero .site-header {
    position: fixed;
    left: 0;
    right: 0;
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.has-hero .site-header:not(.is-scrolled) .brand__logo {
    filter: brightness(0) invert(1);
}

body.has-hero .site-header:not(.is-scrolled) .brand__text,
body.has-hero .site-header:not(.is-scrolled) .site-nav__link,
body.has-hero .site-header:not(.is-scrolled) .nav-toggle {
    color: #fff;
}

body.has-hero .site-header:not(.is-scrolled) .nav-toggle {
    border-color: rgba(255, 255, 255, 0.4);
}

body.has-hero .site-header.is-scrolled,
body.has-hero .site-header.is-open {
    background: rgba(250, 248, 245, 0.9);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-color: var(--line);
}

/* ==========================================================================
   6. Hero
   ========================================================================== */
.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: min(92svh, 860px);
    padding: calc(var(--header-h) + 56px) 0 clamp(120px, 14vw, 170px);
    color: #fff;
    background: #1b1613;
    overflow: hidden;
    isolation: isolate;
}

.hero__media,
.hero__media::after {
    position: absolute;
    inset: 0;
}

.hero__media {
    z-index: -1;
}

.hero__media img,
.hero__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__media::after {
    content: "";
    background:
        linear-gradient(180deg, rgba(14, 11, 9, 0.6) 0%, rgba(14, 11, 9, 0.1) 34%, rgba(14, 11, 9, 0.78) 100%),
        linear-gradient(90deg, rgba(14, 11, 9, 0.45), transparent 65%);
}

.hero__content {
    width: min(var(--page-w), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 8px 16px 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
}

.hero__eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent);
}

.hero__title {
    max-width: 14ch;
    font-size: clamp(2.8rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.035em;
    color: #fff;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

/* ==========================================================================
   7. Infos clés + compte à rebours
   ========================================================================== */
.facts {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: stretch;
    margin-top: calc(-1 * clamp(64px, 8vw, 92px));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-l);
    overflow: hidden;
}

.facts__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 28px 28px 26px;
    border-right: 1px solid var(--line);
}

.fact__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.fact__icon .mi {
    font-size: 22px;
}

.fact__label {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.fact__value {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 4px;
    padding: 24px 28px;
    background: var(--ink);
    color: #fff;
}

.countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.countdown__unit span {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.countdown__unit small {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.countdown__done {
    grid-column: 1 / -1;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

/* ==========================================================================
   8. Introduction
   ========================================================================== */
.intro {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 6vw, 88px);
    padding-block: var(--section-y);
}

.intro__body .prose {
    margin-top: 22px;
}

.intro__body .btn {
    margin-top: 32px;
}

.mosaic {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    grid-auto-rows: clamp(120px, 15vw, 190px);
    gap: 12px;
}

.mosaic__item {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-m);
    background: var(--line);
}

.mosaic__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.mosaic__item:hover img {
    transform: scale(1.04);
}

.mosaic__item--1 {
    grid-row: span 2;
}

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

.mosaic--1 .mosaic__item--1 {
    grid-row: span 3;
}

.mosaic--2 .mosaic__item--1 {
    grid-row: span 2;
}

.mosaic--4 .mosaic__item--4,
.mosaic--6 .mosaic__item--6 {
    grid-column: 1 / -1;
}

/* ==========================================================================
   9. Programme
   ========================================================================== */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
}

.tab {
    padding: 11px 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.25s var(--ease);
}

.tab:hover {
    border-color: var(--accent);
    color: var(--ink);
}

.tab.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.day[hidden] {
    display: none;
}

.day__date {
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: capitalize;
}

.day__empty {
    padding: 28px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-m);
    text-align: center;
    color: var(--muted);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: capitalize;
}

.tab__count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding-inline: 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 700;
}

.tab.is-active .tab__count {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.timeline {
    --rail: 150px;
    position: relative;
}

.timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: 0;
    padding: 6px 0 26px;
}

/* rail vertical + point */
.timeline__item::before {
    content: "";
    position: absolute;
    left: calc(var(--rail) + 5px);
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--line);
}

.timeline__item::after {
    content: "";
    position: absolute;
    left: calc(var(--rail));
    top: 14px;
    width: 12px;
    height: 12px;
    border: 3px solid var(--paper);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-line);
}

.section--tint .timeline__item::after {
    border-color: color-mix(in srgb, var(--accent) 6%, var(--paper));
}

.timeline__item:first-child::before {
    top: 20px;
}

.timeline__item:last-child {
    padding-bottom: 6px;
}

.timeline__item:last-child::before {
    bottom: calc(100% - 20px);
}

.timeline__time {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 28px;
    text-align: right;
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
}

.timeline__time .t-start {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent-strong);
}

.timeline__time .t-end {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
}

.timeline__body {
    grid-column: 2;
    padding: 4px 0 0 32px;
}

.timeline__item.is-notime .timeline__body {
    grid-column: 2;
}

.timeline__body h3 {
    font-size: 1.25rem;
}

.timeline__body p {
    margin-top: 8px;
    max-width: 62ch;
}

/* Desktop : titre collant à gauche, programme en cartes à droite */
@media (min-width: 1025px) {
    .programme > .wrap {
        display: grid;
        grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
        column-gap: clamp(48px, 6vw, 96px);
        align-items: start;
    }

    .programme .section__head {
        position: sticky;
        top: calc(var(--header-h) + 32px);
        margin-bottom: 0;
    }

    .programme__content {
        max-width: 860px;
    }

    .programme .tabs {
        margin-bottom: 28px;
    }

    .programme .timeline {
        --rail: 104px;
    }

    .programme .timeline__item {
        padding: 0 0 14px;
    }

    .programme .timeline__item:last-child {
        padding-bottom: 0;
    }

    .programme .timeline__item::after {
        top: 26px;
    }

    .programme .timeline__item:first-child::before {
        top: 32px;
    }

    .programme .timeline__item:last-child::before {
        bottom: calc(100% - 32px);
    }

    .programme .timeline__time {
        padding-top: 18px;
    }

    .programme .timeline__body {
        margin-left: 32px;
        padding: 20px 26px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-m);
        box-shadow: var(--shadow-s);
        transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
    }

    .programme .timeline__item:hover .timeline__body {
        border-color: var(--accent-line);
        transform: translateX(4px);
    }

    .programme .timeline__body h3 {
        font-size: 1.15rem;
    }

    .programme .timeline__body p {
        max-width: none;
        color: var(--ink-2);
    }
}

/* ==========================================================================
   10. Informations (bento) + cartes
   ========================================================================== */
.bento {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: var(--pad-box);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-line);
    box-shadow: var(--shadow-m);
}

.card h3 {
    font-size: 1.35rem;
}

.card--wide {
    grid-column: 1 / -1;
}

.card--media {
    position: relative;
    isolation: isolate; /* enferme les z-index internes de la carte Leaflet */
    z-index: 0;
    min-height: 280px;
    padding: 0;
    overflow: hidden;
}

.card--media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   11. FAQ
   ========================================================================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq {
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: var(--surface);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.faq[open] {
    border-color: var(--accent-line);
    box-shadow: var(--shadow-s);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    list-style: none;
}

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

.faq summary .mi {
    color: var(--accent-strong);
    font-size: 26px;
    transition: transform 0.35s var(--ease);
}

.faq[open] summary .mi {
    transform: rotate(45deg);
}

.faq__answer {
    padding: 0 26px 24px;
}

/* ==========================================================================
   12. Bandeau d'appel à l'action + galerie
   ========================================================================== */
.section--cta {
    padding-block: clamp(32px, 5vw, 64px);
}

.cta-band {
    --mx: 70%;
    --my: 30%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 4vw, 56px);
    padding: clamp(24px, 3.4vw, 40px) clamp(24px, 4vw, 48px);
    border-radius: var(--radius-l);
    background: var(--ink);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.4s var(--ease);
}

.cta-band:hover {
    transform: rotate(-0.4deg);
}

/* trame de points */
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1.4px);
    background-size: 20px 20px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
    mask-image: linear-gradient(90deg, transparent, #000 60%);
}

/* liseré lumineux */
.cta-band::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 70%, transparent), transparent 35%, transparent 65%, color-mix(in srgb, var(--accent) 50%, transparent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.cta-band__orb {
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    background: var(--accent);
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
}

.cta-band__orb--1 {
    top: -80%;
    left: -8%;
    width: 340px;
    aspect-ratio: 1;
    animation: cta-drift-1 12s ease-in-out infinite alternate;
}

.cta-band__orb--2 {
    right: 8%;
    bottom: -90%;
    width: 300px;
    aspect-ratio: 1;
    background: color-mix(in srgb, var(--accent) 60%, #fff);
    opacity: 0.3;
    animation: cta-drift-2 15s ease-in-out infinite alternate;
}

/* spot qui suit la souris (position pilotée par main.js) */
.cta-band__spot {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(320px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
}

.cta-band:hover .cta-band__spot {
    opacity: 1;
}

.cta-band__copy {
    min-width: 0;
}

.cta-band__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.cta-band__pulse {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.cta-band__pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent);
    animation: cta-pulse 1.8s var(--ease) infinite;
}

.cta-band__title {
    max-width: 26ch;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
    text-wrap: balance;
}

.cta-band__text {
    max-width: 56ch;
    margin-top: 6px;
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.68);
    text-wrap: pretty;
}

.cta-band__text:empty {
    display: none;
}

.cta-band__action {
    flex: none;
    display: flex;
    align-items: center;
}

/* anneau de texte en fond, coupé par le bord droit */
.cta-band__sticker {
    position: absolute;
    top: 50%;
    right: -70px;
    z-index: -1;
    width: 280px;
    height: 280px;
    margin-top: -140px;
    fill: color-mix(in srgb, var(--accent) 55%, #fff);
    opacity: 0.16;
    font-family: var(--font-display);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: cta-spin 30s linear infinite;
    pointer-events: none;
}

.cta-band:hover .cta-band__sticker {
    opacity: 0.26;
    animation-duration: 12s;
}

.cta-band__btn {
    position: relative;
    padding: 7px 7px 7px 26px;
    gap: 16px;
    overflow: hidden;
    box-shadow: 0 10px 34px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}

/* reflet qui balaie le bouton */
.cta-band__btn::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: cta-shine 4s var(--ease) infinite;
    pointer-events: none;
}

.cta-band__arrow {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--on-accent);
    color: var(--accent);
    transition: transform 0.35s var(--ease);
}

.cta-band__arrow .mi {
    animation: cta-nudge 2.4s var(--ease) infinite;
}

.cta-band__btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 16px 44px -8px color-mix(in srgb, var(--accent) 85%, transparent);
}

.cta-band__btn:hover .cta-band__arrow {
    transform: rotate(-45deg);
}

.cta-band__btn:hover .cta-band__arrow .mi {
    animation: none;
    transform: none;
}

@keyframes cta-drift-1 {
    to { transform: translate(40%, 25%) scale(1.15); }
}

@keyframes cta-drift-2 {
    to { transform: translate(-40%, -20%) scale(0.9); }
}

@keyframes cta-pulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(3); opacity: 0; }
}

@keyframes cta-shine {
    0%, 60% { left: -60%; }
    100% { left: 130%; }
}

@keyframes cta-spin {
    to { transform: rotate(360deg); }
}

@keyframes cta-nudge {
    0%, 70%, 100% { transform: translateX(0); }
    80% { transform: translateX(4px); }
    90% { transform: translateX(-1px); }
}

@media (max-width: 760px) {
    .cta-band {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .cta-band__sticker {
        top: auto;
        bottom: -90px;
        right: -80px;
        margin-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-band,
    .cta-band__orb,
    .cta-band__pulse::after,
    .cta-band__btn::before,
    .cta-band__sticker,
    .cta-band__arrow .mi {
        animation: none;
        transition: none;
    }

    .cta-band:hover {
        transform: none;
    }
}

.gallery-cta {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 5vw, 64px);
    padding: var(--pad-box);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
}

.gallery-cta__row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-block: 22px 26px;
}

.gallery-cta__qr {
    flex: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: #fff;
    line-height: 0;
}

.gallery-cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.gallery-cta__media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gallery-cta__media img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius-m);
}

.gallery-cta__media img:last-child {
    margin-top: 32px;
}

/* ==========================================================================
   13. Formulaire d'inscription (+ pages dashboard qui réutilisent .parentForm)
   ========================================================================== */
.form-card {
    padding: var(--pad-box);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
    box-shadow: var(--shadow-m);
}

.form-card .prose {
    margin-top: 14px;
}

.parentForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 20px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}

.parentForm .__full {
    grid-column: 1 / -1;
}

.parentForm label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
}

.parentForm hr {
    height: 1px;
    margin-block: 6px;
    border: 0;
    background: var(--line);
}

.req {
    color: var(--danger);
}

.inv-field[hidden] {
    display: none;
}

.field-error {
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--danger);
}

.field-error[hidden] {
    display: none;
}

.__input,
.__textarea,
.parent_select select {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--paper) !important;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 400;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.__input::placeholder,
.__textarea::placeholder {
    color: #a8a29a;
}

.__textarea {
    min-height: 130px;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.5;
}

.__input:hover,
.__textarea:hover,
.parent_select select:hover {
    border-color: #cfc9c0;
}

.__input:focus,
.__textarea:focus,
.parent_select select:focus {
    border-color: var(--accent);
    background: #fff !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.__input.is-invalid,
.__textarea.is-invalid,
.parent_select select.is-invalid {
    border-color: var(--danger);
    background: #fff5f5 !important;
}

.__input:disabled {
    opacity: 0.55;
}

.parent_select {
    position: relative;
}

.parent_select select {
    padding-right: 44px;
    cursor: pointer;
}

.parent_select::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--ink-2);
    border-bottom: 2px solid var(--ink-2);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.__formulaireInformation {
    padding: 18px 20px;
    border-radius: var(--radius-s);
    border: 1px solid var(--accent-line);
    background: var(--accent-soft);
    font-size: 0.95rem;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--paper);
    font-size: 0.88rem !important;
    font-weight: 400 !important;
    line-height: 1.5;
    color: var(--ink-2) !important;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.consent.is-invalid {
    border-color: var(--danger);
    background: #fff5f5;
}

.ui-checkbox {
    flex: none;
    position: relative;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    border: 1.5px solid #c9c3ba;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.ui-checkbox:hover {
    border-color: var(--accent);
}

.ui-checkbox:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.ui-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid var(--on-accent);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.form-message {
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    color: var(--danger);
}

.form-message.is-success {
    color: #1f7a45;
}

.form-message:empty {
    display: none;
}

.form-submit {
    display: flex;
    margin: 28px auto 0;
}

.reponse {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 24px 0;
    text-align: center;
}

.reponse::before {
    content: "";
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 28px no-repeat,
        var(--accent);
}

.reponse h3 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

/* ==========================================================================
   14. Pied de page
   ========================================================================== */
.site-footer {
    margin-top: auto;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.65);
}

.site-footer__inner {
    width: min(var(--page-w), 100% - 2 * var(--gutter));
    margin-inline: auto;
    padding: clamp(40px, 6vw, 72px) 0 28px;
}

.site-footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer__logo {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
}

.site-footer a {
    font-size: 0.92rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.2s;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 24px;
    font-size: 0.85rem;
}

/* ==========================================================================
   15. Pages : standard, 404, connexion
   ========================================================================== */
.page-main {
    padding-block: clamp(48px, 8vw, 96px);
}

.page-article .title-xl {
    margin-bottom: 32px;
}

.notfound {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    min-height: 50svh;
    justify-content: center;
}

.notfound__code {
    font-family: var(--font-display);
    font-size: clamp(5rem, 16vw, 10rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.05em;
    color: var(--accent);
}

.auth {
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding: 24px var(--gutter);
    background: var(--paper);
}

body.is-inner:has(.auth) .site-header,
body.is-inner:has(.auth) .site-footer {
    display: none;
}

.auth__card {
    width: 100%;
    max-width: 440px;
    padding: var(--pad-box);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
    box-shadow: var(--shadow-m);
}

.auth__logo {
    height: 40px;
    width: auto;
    margin-bottom: 28px;
}

.auth__title {
    font-size: 1.7rem;
}

.auth__lead {
    margin: 8px 0 26px;
}

.auth__form input[type="text"],
.auth__form input[type="email"],
.auth__form input[type="password"] {
    width: 100%;
    height: 50px;
    margin-top: 6px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--paper);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth__form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.auth__form .tml-field-wrap,
.auth__form .tml-field-wrap + .tml-field-wrap {
    margin-bottom: 16px;
}

.auth__form label {
    font-size: 0.88rem;
    font-weight: 600;
}

.auth__form .tml-button,
.auth__form input[type="submit"] {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.auth__form .tml-button:hover,
.auth__form input[type="submit"]:hover {
    background: var(--accent-strong);
}

.auth__form .tml-links {
    margin-top: 18px;
    padding: 0;
}

.auth__form .tml-links a {
    font-size: 0.85rem;
    color: var(--accent-strong);
}

.auth__form #mo_saml_button,
.auth__form .tml-register-link {
    display: none !important;
}

/* ==========================================================================
   16. Compatibilité pages d'administration / tableau de bord (hérité de la V1)
   ========================================================================== */
body.is-inner {
    background: var(--paper);
}

.--table,
table.--table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.--table thead th {
    padding: 12px 18px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.--table tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
}

.--table tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 4%, #fff);
}

.--table .--user {
    display: inline-block;
    margin-block: 3px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.8rem;
    font-weight: 600;
}

.boxVide {
    margin-inline: auto;
    padding: 30px 60px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-m);
    text-align: center;
    font-weight: 600;
    color: var(--muted);
}

.popup {
    background: var(--ink) !important;
    border-radius: var(--radius-s) !important;
    font-weight: 600 !important;
    color: #fff !important;
}

.popup.--error {
    background: var(--danger) !important;
}

#toast-container > div {
    opacity: 1 !important;
    border-radius: var(--radius-s) !important;
    box-shadow: var(--shadow-l) !important;
}

.parent_text {
    color: var(--ink-2);
    line-height: 1.7;
}

/* ==========================================================================
   16b. Kit d'administration (liste, rooming, SMS, e-mails, fichiers, galerie, check-in, dashboard)
   ========================================================================== */
.admin-nav {
    width: min(var(--page-w), 100% - 2 * var(--gutter));
    margin: var(--space-block) auto 0;
}

.admin-nav__inner {
    display: flex;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    padding: 6px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-s);
    scrollbar-width: none;
}

.admin-nav__inner::-webkit-scrollbar {
    display: none;
}

.admin-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-2);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.admin-nav__link .mi {
    font-size: 20px;
}

.admin-nav__link:hover {
    background: var(--accent-soft);
    color: var(--ink);
}

.admin-nav__link.is-active {
    background: var(--ink);
    color: #fff;
}

.admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 4px;
}

.admin-head h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.admin-head p {
    margin-top: 8px;
}

.admin-head strong {
    color: var(--accent-strong);
}

.admin-head > .flex {
    flex-wrap: wrap;
    gap: 10px;
}

.admin-panel {
    padding: var(--pad-box);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: var(--surface);
}

.admin-panel > h3 {
    margin-bottom: 14px;
}

.admin-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}

.admin-panel .flex {
    flex-wrap: wrap;
}

/* Tableaux de données */
.table-container {
    width: 100%;
    margin: 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: var(--surface);
    -webkit-overflow-scrolling: touch;
}

.table-container table,
body.is-admin table {
    width: 100%;
    min-width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table-container thead th,
body.is-admin table thead th {
    padding: 12px 16px;
    text-align: left;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-strong);
    background: var(--accent-soft);
    border-bottom: 1px solid var(--accent-line);
}

.table-container tbody td,
body.is-admin table tbody td {
    padding: 12px 16px;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table-container tbody tr:last-child td {
    border-bottom: 0;
}

.table-container tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 4%, #fff);
}

.table-container td a {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong) !important;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.table-container td a:hover {
    background: var(--accent);
    color: var(--on-accent) !important;
}

.table-container th .mi,
.table-container td .mi {
    font-size: 20px;
    vertical-align: middle;
}

.table-container td .mi[onclick] {
    color: var(--muted);
    transition: color 0.2s;
}

.table-container td .mi[onclick]:hover {
    color: var(--danger);
}

/* Pastilles (fichiers, galerie) */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--ink-2);
}

/* Sélection de destinataires (SMS / e-mails) */
#responseListePreSelect {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 300px;
    max-width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.92rem;
}

.user svg {
    width: 18px;
    height: 18px;
}

#responseListe {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

#responseListe .user {
    width: 100%;
}

.success {
    color: #0a8f66;
}

.erreur {
    font-size: 0.9rem;
}

.errorMSG {
    color: var(--danger);
}

#message {
    width: 100%;
    height: 10em;
    margin-top: 10px;
    padding: 14px 16px;
    text-indent: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--paper);
    outline: none;
    resize: vertical;
}

#message:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.nbSMS {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Check-in */
.__checkin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
}

.__compteur {
    margin-top: 8px;
    color: var(--ink-2);
}

.__compteur strong {
    color: var(--accent-strong);
    font-size: 1.2rem;
}

.__search-wrap {
    position: relative;
    width: 100%;
    max-width: 460px;
}

.__search-wrap .mi {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 22px;
    pointer-events: none;
}

.__search {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.__search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.__results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.__person-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: var(--surface);
    transition: border-color 0.2s, background 0.2s;
}

.__person-card.__present {
    border-color: #6fcf97;
    background: #f1fbf5;
}

.__person-name {
    font-weight: 600;
}

.__toggle-btn {
    min-width: 130px;
    padding: 9px 20px;
    border: 0;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.__toggle-btn.__absent {
    background: var(--line);
    color: var(--ink-2);
}

.__toggle-btn.__present {
    background: #1f9d55;
    color: #fff;
}

.__empty {
    padding: 40px 0;
    text-align: center;
    color: var(--muted);
}

/* Galerie (publique + admin) */
.row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    min-height: 40svh;
}

.row img {
    width: 100%;
    border-radius: var(--radius-m);
}

.empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-m);
    color: var(--muted);
    font-weight: 500;
}

/* Tableau de bord invité */
.box-dash {
    padding: var(--pad-box);
    border-radius: var(--radius-l);
    background: var(--surface);
}

.box-dash h1 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.box-dash h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.box-dash .parentForm {
    margin-top: 24px;
}

@media (max-width: 900px) {
    #responseListe {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #responseListe {
        grid-template-columns: 1fr;
    }

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

    .__person-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .__toggle-btn,
    .__search-wrap {
        width: 100%;
        max-width: 100%;
    }

}

/* --------------------------------------------------------------------------
   Composeur (envoi de SMS / d'e-mails) : 3 étapes
   -------------------------------------------------------------------------- */
.composer {
    display: flex;
    flex-direction: column;
    gap: var(--space-block);
}

.notice {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border: 1px solid var(--accent-line);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-s);
    background: var(--accent-soft);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--ink-2);
}

.notice--warn {
    border-color: #f0c79b;
    border-left-color: #e8590c;
    background: #fff6ec;
}

.notice strong {
    color: var(--ink);
}

.notice a {
    color: var(--accent-strong);
    font-weight: 600;
}

.notice-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.step {
    padding: var(--pad-box);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
}

.step__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.step__n {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
}

.step__head h2 {
    font-size: 1.3rem;
}

.step__head p {
    margin-top: 2px;
    font-size: 0.9rem;
    color: var(--muted);
}

.step__head .pill {
    margin-left: auto;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.pill.is-warn {
    background: #fff1e3;
    color: #b4470a;
}

/* Sélecteur de destinataires */
.rc-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rc-search {
    position: relative;
    flex: 1 1 320px;
}

.rc-search .mi {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 22px;
    pointer-events: none;
}

.rc-search input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rc-search input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.rc-results {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: #fff;
    box-shadow: var(--shadow-l);
}

.rc-results[hidden] {
    display: none;
}

.rc-results button {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    text-align: left;
    font-size: 0.92rem;
    cursor: pointer;
}

.rc-results button:last-child {
    border-bottom: 0;
}

.rc-results button:hover,
.rc-results button.is-first {
    background: var(--accent-soft);
}

.rc-results small,
.rc-empty {
    color: var(--muted);
}

.rc-empty {
    padding: 14px 18px;
    font-size: 0.9rem;
}

.rc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 260px;
    margin-top: 18px;
    overflow-y: auto;
}

.rc-chips:empty::before {
    content: "Aucun destinataire pour l'instant : recherchez une personne ou ajoutez tous les inscrits.";
    padding: 18px 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-s);
    color: var(--muted);
    font-size: 0.9rem;
    width: 100%;
}

.rc-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    font-size: 0.88rem;
}

.rc-chip small {
    color: var(--muted);
}

.rc-chip.is-missing {
    border-color: #f0c79b;
    background: #fff6ec;
}

.rc-chip.is-missing small {
    color: #b4470a;
}

.rc-chip button {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.rc-chip button .mi {
    font-size: 16px;
}

.rc-chip button:hover {
    background: var(--line);
    color: var(--ink);
}

.rc-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--muted);
}

.rc-footer button {
    border: 0;
    background: none;
    color: var(--accent-strong);
    font-weight: 600;
    cursor: pointer;
}

/* Champs du message */
.field-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.field-row > label {
    font-size: 0.88rem;
    font-weight: 600;
}

.field-row .hint {
    font-size: 0.82rem;
    color: var(--muted);
}

.field-row .__input,
.field-row textarea {
    margin: 0;
}

.field-row textarea {
    width: 100%;
    min-height: 200px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--paper);
    outline: none;
    resize: vertical;
    line-height: 1.55;
}

.field-row textarea:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.field-row .is-invalid {
    border-color: var(--danger) !important;
    background: #fff5f5 !important;
}

.insert-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.insert-bar button {
    padding: 6px 14px;
    border: 1px dashed var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.meter {
    height: 6px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.meter > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.2s, background 0.2s;
}

.meter.is-over > span {
    background: #e8590c;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 18px;
    font-size: 0.85rem;
    color: var(--muted);
}

.stats strong {
    color: var(--ink);
}

/* Disposition e-mail : formulaire + aperçu */
.mail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: start;
}

.mail-preview {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    padding: 24px;
    border-radius: var(--radius-m);
    background: #efece7;
}

.mail-preview__label {
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.mail-card {
    max-width: 650px;
    margin-inline: auto;
    padding: clamp(20px, 4vw, 40px);
    border-radius: 14px;
    background: #fff;
    color: #000;
    font-family: Roboto, Arial, sans-serif;
}

.mail-card img.mail-logo {
    display: block;
    width: 180px;
    margin: 0 auto;
}

.mail-card hr {
    height: 1px;
    margin: 28px 0;
    border: 0;
    background: #eee;
}

.mail-card h1 {
    margin: 0;
    text-align: center;
    font-family: inherit;
    font-size: 1.6rem;
    color: #000;
}

.mail-card img.mail-cover {
    width: 100%;
    height: 150px;
    margin-top: 24px;
    border-radius: 10px;
    object-fit: cover;
}

.mail-card h2 {
    margin: 20px 0 8px;
    font-family: inherit;
    font-size: 1.15rem;
    color: #000;
}

.mail-card p {
    font-size: 0.92rem;
    color: #333;
}

.mail-card .mail-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
    text-decoration: none;
}

.mail-foot {
    margin-top: 16px;
    text-align: center;
    font-size: 0.78rem;
    color: #555;
}

/* Envoi : récapitulatif, progression */
.send-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.send-summary > div {
    flex: 1 1 160px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--paper);
}

.send-summary b {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1.1;
}

.send-summary span {
    font-size: 0.8rem;
    color: var(--muted);
}

.send-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.send-errors {
    margin: 0 0 16px;
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 500;
}

.send-errors:empty {
    display: none;
}

.progress {
    margin-top: 22px;
}

.progress[hidden] {
    display: none;
}

.progress__label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.progress__result {
    margin-top: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-s);
    background: #f1fbf5;
    border: 1px solid #b9e3c8;
    color: #1f7a45;
    font-weight: 600;
}

.progress__result.is-warn {
    background: #fff6ec;
    border-color: #f0c79b;
    color: #b4470a;
}

.progress__result:empty {
    display: none;
}

dialog.confirm {
    width: min(460px, calc(100% - 32px));
    padding: 28px;
    border: 0;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-l);
}

dialog.confirm::backdrop {
    background: rgba(20, 17, 15, 0.5);
    backdrop-filter: blur(3px);
}

dialog.confirm h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

dialog.confirm .send-actions {
    margin-top: 22px;
    justify-content: flex-end;
}

.btn--ghost-dark {
    --btn-bg: transparent;
    --btn-fg: var(--ink);
    border-color: var(--line);
}

.btn--ghost-dark:hover {
    background: var(--paper);
    border-color: #cfc9c0;
    color: var(--ink);
    box-shadow: none;
}

@media (max-width: 1000px) {
    .mail-grid {
        grid-template-columns: 1fr;
    }

    .mail-preview {
        position: static;
    }
}

@media (max-width: 640px) {
    .step__head {
        flex-wrap: wrap;
    }

    .step__head .pill {
        margin-left: 54px;
    }
}

/* Rythme vertical commun : même espace entre tous les blocs de page */
body.is-admin .site > .container,
body.is-inner .site > .box-dash,
body.is-inner .site > .container.row,
body.is-inner .site > .container:not(.admin-head) {
    margin-top: var(--space-block);
    margin-bottom: 0;
}

body.is-inner .site > .container:last-of-type {
    margin-bottom: calc(var(--section-y) * 0.6);
}

body.is-inner .site > .container:first-of-type {
    margin-top: calc(var(--space-block) * 1.5);
}

body.is-admin .site > .admin-nav + .container {
    margin-top: calc(var(--space-block) * 1.5);
}

/* ==========================================================================
   17. Animations d'apparition (activées seulement si JS)
   ========================================================================== */
html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--d, 0ms);
}

html.js .reveal.is-in {
    opacity: 1;
    transform: none;
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    html.js .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .facts {
        grid-template-columns: 1fr;
    }

    .fact:last-child {
        border-right: 0;
    }

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

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

    .intro__body {
        order: -1;
    }

    .gallery-cta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    :root {
        --header-h: 64px;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px var(--gutter) 28px;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-l);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
    }

    body.admin-bar .site-nav {
        top: calc(var(--header-h) + 46px);
    }

    .site-header.is-open .site-nav {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .site-nav .site-nav__link,
    body.has-hero .site-header:not(.is-scrolled) .site-nav__link {
        padding: 16px 0;
        border-bottom: 1px solid var(--line);
        font-size: 1.05rem;
        color: var(--ink);
    }

    .site-nav__cta {
        margin-top: 18px;
        width: 100%;
    }

    body.has-hero .site-header.is-open .brand__logo {
        filter: none;
    }

    body.has-hero .site-header.is-open .brand__text,
    body.has-hero .site-header.is-open .nav-toggle {
        color: var(--ink);
    }

    body.has-hero .site-header.is-open .nav-toggle {
        border-color: var(--line);
    }

    .timeline {
        --rail: 0px;
    }

    .timeline__item {
        grid-template-columns: 1fr;
        padding-left: 28px;
    }

    .timeline__item::before {
        left: 5px;
    }

    .timeline__item::after {
        left: 0;
    }

    .timeline__time {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        padding: 0 0 4px;
        text-align: left;
    }

    .timeline__time .t-end::before {
        content: "→ ";
    }

    .timeline__body {
        grid-column: 1;
        padding-left: 0;
    }

    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .tab {
        flex: none;
    }
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

@media (max-width: 640px) {
    .fact {
        padding: 20px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .fact:last-child {
        border-bottom: 0;
    }

    .countdown {
        padding: 20px 12px;
    }

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

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

    .parentForm .__full {
        grid-column: auto;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .gallery-cta__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-submit {
        width: 100%;
    }

    .mosaic {
        grid-auto-rows: 120px;
    }

    .faq summary {
        padding: 18px 20px;
    }

    .faq__answer {
        padding: 0 20px 20px;
    }
}

.acf-map,
.leaflet-container {
    isolation: isolate;
    z-index: 0;
}
