:root {
    --bg: #020617;
    --card: #050816;
    --card-soft: #050818;
    --border-soft: #1f2937;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --yellow: #f7c600;
    --pink: #ec4899;
    --radius-xl: 26px;
    --radius-lg: 18px;
    --radius-full: 999px;
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, .75);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Top bar */
.top-bar {
    border-bottom: 1px solid rgba(148, 163, 184, .45);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 20;
}

.top-bar-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: .65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .8rem;
    color: var(--text);
    white-space: nowrap;
}

.brand span {
    color: var(--yellow);
}

a.premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    color: var(--pink);
    font-size: .9rem;
    white-space: nowrap;
}

a.premium::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pink), var(--yellow));
    transform-origin: left;
    transform: scaleX(0);
    transition: transform .25s ease-out;
}

a.premium:hover::after,
a.premium:focus-visible::after {
    transform: scaleX(1);
}

main {
    max-width: 1040px;
    margin: 0 auto;
    padding: 2.4rem 1.5rem 3.75rem;
    padding-bottom: calc(3.75rem + 96px);
}

/* Hero */
header.hero {
    margin-bottom: 2.75rem;
    padding: 2.4rem 2.1rem 2.3rem;
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, .45);
    position: relative;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.65rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .25rem .75rem .3rem;
    border-radius: 999px;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--bg);
    color: var(--muted);
    border: 1px solid rgba(148, 163, 184, .7);
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0%, var(--yellow), var(--pink));
    box-shadow: 0 0 10px rgba(248, 250, 252, .6);
}

h1 {
    font-size: clamp(2.2rem, 3.2vw, 2.8rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 1rem 0 .85rem;
}

h1 span.accent {
    background: linear-gradient(90deg, var(--yellow), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    max-width: 700px;
    color: var(--muted);
    font-size: .98rem;
    margin-bottom: .35rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.75rem;
    margin-top: 1.1rem;
    font-size: .85rem;
    color: var(--muted);
}

.hero-meta strong {
    color: var(--text);
    font-weight: 600;
}

strong {
    color: var(--yellow);
}

/* Sommaire - grilles + cartes */
.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

.toc-card {
    position: relative;
    padding: 1.2rem 1.4rem;
    border-radius: var(--radius-lg);
    background: var(--card-soft);
    border: 1px solid var(--border-soft);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .65);
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    will-change: transform;
    transition: transform .3s ease, box-shadow .3s ease;
}

.toc-card h3 {
    margin-bottom: .35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fefce8;
}

.toc-card p {
    font-size: .85rem;
    color: var(--muted);
}

.toc-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--pink), var(--yellow));
    opacity: 0;
    transition: opacity .4s ease;
    z-index: -1;
}

.toc-card:hover::after,
.toc-card:focus-visible::after {
    opacity: .15;
}

.toc-card:hover,
.toc-card:focus-visible {
    transform: translateY(-4px) rotateX(1deg) rotateY(-1deg);
    box-shadow: 0 18px 32px rgba(0, 0, 0, .8), 0 0 14px rgba(236, 72, 153, .4), 0 0 10px rgba(247, 198, 0, .3);
}

.toc-card.active {
    border-color: var(--pink);
    box-shadow: 0 0 0 1px var(--pink), 0 0 14px rgba(236, 72, 153, .6), 0 0 10px rgba(247, 198, 0, .45);
}

.toc-card.highlight {
    border-color: var(--pink);
    box-shadow: 0 0 0 1px var(--pink), 0 0 12px rgba(236, 72, 153, .5), 0 0 8px rgba(247, 198, 0, .4);
}

/* Titres sommaire */
.toc-heading-essential,
.toc-heading-full {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .6rem;
    color: #fefce8;
}

.toc-note {
    margin-top: .4rem;
    margin-bottom: 1.4rem;
    font-size: .85rem;
    color: var(--muted);
}

.toc-heading-full {
    margin-top: 5rem;
    margin-bottom: .8rem;
}

/* Cartes essentielles : effet dé sur desktop (3 colonnes) */
.essential-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 6rem;
    padding-bottom: 1rem;
}

.essential-grid>a:nth-child(1) {
    grid-row: 1;
    grid-column: 1;
}

.essential-grid>a:nth-child(2) {
    grid-row: 1;
    grid-column: 3;
}

.essential-grid>a:nth-child(3) {
    grid-row: 2;
    grid-column: 2;
}

.essential-grid>a:nth-child(4) {
    grid-row: 3;
    grid-column: 1;
}

.essential-grid>a:nth-child(5) {
    grid-row: 3;
    grid-column: 3;
}

.essential-grid>a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 180px;
}

/* Sommaire complet : 3 colonnes sur desktop */
.full-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 1.2rem;
    width: 100%;
}

.full-grid>a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 160px;
}

/* Sections */
.grid {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.block {
    border-radius: var(--radius-lg);
    background: var(--card-soft);
    border: 1px solid var(--border-soft);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .85);
    padding: 1.6rem 1.75rem 1.75rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1rem;
    row-gap: .5rem;
    scroll-margin-top: 110px; /* desktop */
}

@media (max-width: 720px){
  .block{
    scroll-margin-top: 140px; /* mobile : plus safe (Safari) */
  }
}

.block-header {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin-right: .5rem;
}

.block-icon {
    width: 40px;
    height: 40px;
    color: var(--pink);
    flex-shrink: 0;
}

.block-icon svg {
    width: 100%;
    height: 100%;
    display: block;

    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;

    /* Chrome coupe parfois le tracé (stroke) car l'overflow SVG est caché par défaut.
       Safari est plus permissif. On force visible + on réduit légèrement pour garder de l'air. */
    overflow: visible;
    transform: scale(0.92);
    transform-origin: 50% 50%;
}

.block-icon path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
}

.block-title {
    font-weight: 650;
    font-size: 1.02rem;
}

.block-title span {
    color: var(--yellow);
}

.block-body {
    font-size: .96rem;
    color: var(--text);
}

.block-body p+ul {
    margin-top: .85rem;
    /* espace après un paragraphe avant une liste */
}

.block-body ul+p {
    margin-top: .95rem;
    /* espace après une liste avant un paragraphe */
}

.block-body p+p {
    margin-top: .65rem;
}

.block-body ul {
    list-style: none;
    margin-top: .4rem;
    padding-left: 0;
}

.block-body li {
    position: relative;
    padding-left: 1.2rem;
    margin-top: .25rem;
    color: var(--text);
}

.block-body li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .7em;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yellow), var(--pink));
    box-shadow: 0 0 7px rgba(248, 250, 252, .6);
}

.block-underline {
    width: 80px;
    height: 2px;
    margin-top: 4px;
    background: linear-gradient(90deg, var(--yellow), var(--pink));
    border-radius: 2px;
    transform-origin: left;
    transform: scaleX(0);
}

/* Schéma Agile (process) */
.process {
    margin-top: .9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: .55rem .75rem;
}

/* Les étapes en “pills” premium */
.process-step {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: .55rem .85rem;
    border-radius: 999px;

    font-weight: 750;
    font-size: .92rem;
    letter-spacing: .01em;
    line-height: 1;

    color: rgba(229, 231, 235, .92);
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(148, 163, 184, .22);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .28);

    white-space: nowrap;
}

/* Petit accent (pastille) + glow discret */
.process-step::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-right: .55rem;
    background: linear-gradient(135deg, var(--yellow), var(--pink));
    box-shadow: 0 0 10px rgba(247, 198, 0, .18), 0 0 10px rgba(236, 72, 153, .14);
}

/* “Connecteurs” entre pills (desktop/tablette) */
@media (min-width: 680px) {
    .process-step:not(:last-child)::after {
        content: "";
        position: absolute;
        right: -0.75rem;
        top: 50%;
        width: 0.75rem;
        height: 2px;
        transform: translateY(-50%);
        background: linear-gradient(90deg, rgba(247, 198, 0, .55), rgba(236, 72, 153, .45));
        opacity: .75;
        border-radius: 999px;
    }
}

/* Mobile : centrage harmonieux */
@media (max-width: 680px) {
    .process {
        justify-content: center;
    }
}

/* Sticky nav (tous écrans) : barre en bas */
.sticky-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);

    width: min(640px, calc(100% - 1.4rem));
    display: none;
    /* reste cachée tant qu'on n'a pas .show */
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    background: rgba(5, 8, 22, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    z-index: 60;
}

.sticky-nav.show {
    display: flex;
}

.sticky-nav a {
    color: var(--pink);
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.55rem 0.65rem;
    /* zone tap confortable */
    border-radius: 999px;
    touch-action: manipulation;
}

.sticky-nav a:hover {
    text-decoration: underline;
}

.sticky-nav .current-section {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: #fefce8;
    padding: 0 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hero visual (poignée de main) */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.hero-visual svg {
    width: 100%;
    max-width: 480px;
    height: auto;
    opacity: 0;
}

.handshake-labels {
    position: absolute;
    bottom: -1.6rem;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: .75rem;
    opacity: 0;
}

.handshake-label {
    padding: .3rem .6rem;
    border-radius: var(--radius-full);
    font-size: .75rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(248, 250, 252, .25);
    color: var(--muted);
    backdrop-filter: blur(6px);
}

/* CTA */
@keyframes cta-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(236, 72, 153, .4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 6px rgba(236, 72, 153, .35);
    }
}

a.cta-primary {
    display: inline-block;
    padding: .8rem 1.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pink), var(--yellow));
    color: #111;
    font-weight: 700;
    text-decoration: none;
    will-change: transform;
    transition: transform .2s ease;
    animation: cta-pulse 4s ease-in-out infinite;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}

a.cta-primary:hover {
    transform: translateY(-2px);
}

a.cta-primary:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 720px) {

    /* Top bar sur une ligne */
    .top-bar-inner {
        padding: 0.6rem 1.1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
    }

    .brand {
        font-size: .76rem;
    }

    a.premium {
        font-size: .86rem;
    }

    /* Layout */
    main {
        padding: 2.1rem .75rem 2.8rem;
    }

    header.hero {
        padding: 1.9rem 1.4rem 1.8rem;
    }

    .block {
        padding: 1.35rem 1.25rem 1.45rem;
        grid-template-columns: minmax(0, 1fr);
    }

    .block-header {
        flex-direction: row;
        align-items: center;
        margin-bottom: .4rem;
    }

    /* Mobile : sticky bar en bas (fixe) + visible quand .show est présent */
    .sticky-nav {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(0.9rem + env(safe-area-inset-bottom));
        top: auto;

        width: min(560px, calc(100% - 1.4rem));
        padding: 0.55rem 0.65rem;
        border-radius: 999px;

        display: none;
        /* reste piloté par .show */
        align-items: center;
        gap: 0.55rem;

        background: rgba(5, 8, 22, 0.72);
        border: 1px solid rgba(148, 163, 184, 0.28);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);

        box-shadow:
            0 18px 45px rgba(0, 0, 0, 0.72),
            0 0 14px rgba(236, 72, 153, 0.18),
            0 0 10px rgba(247, 198, 0, 0.10);
        z-index: 999;
    }

    .sticky-nav.show {
        display: flex;
    }

    /* boutons parfaitement symétriques */
    .sticky-nav .nav-btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;

        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(148, 163, 184, 0.28);
        touch-action: manipulation;
    }

    /* flèches */
    .sticky-nav .nav-ico {
        font-size: 1.65rem;
        line-height: 1;
        color: var(--pink);
    }

    /* home SVG */
    .sticky-nav .nav-home-ico {
        width: 22px;
        height: 22px;
        color: var(--pink);
    }

    /* titre au centre : prend le max */
    .sticky-nav .current-section {
        flex: 1;
        min-width: 0;
        text-align: center;
        font-weight: 650;
        font-size: 0.86rem;
        color: #fefce8;

        padding: 0 0.35rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* si tu avais des labels texte, on les masque en mobile */
    .sticky-nav .nav-label,
    .sticky-nav .nav-text {
        display: none;
    }

    /* Important : évite que le contenu passe sous la barre */
    main {
        padding-bottom: 7.2rem;
        /* ajuste si besoin */
    }

    /* Cartes essentielles : "dé élargi" => 4 colonnes + chaque carte span 2 colonnes */
    .essential-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: .9rem;
        margin-left: -.25rem;
        margin-right: -.25rem;
    }

    .essential-grid>a:nth-child(1) {
        grid-row: 1;
        grid-column: 1 / span 2;
    }

    .essential-grid>a:nth-child(2) {
        grid-row: 1;
        grid-column: 3 / span 2;
    }

    .essential-grid>a:nth-child(3) {
        grid-row: 2;
        grid-column: 2 / span 2;
    }

    .essential-grid>a:nth-child(4) {
        grid-row: 3;
        grid-column: 1 / span 2;
    }

    .essential-grid>a:nth-child(5) {
        grid-row: 3;
        grid-column: 3 / span 2;
    }

    .essential-grid>a {
        min-height: 200px;
        padding: 1.05rem .95rem;
    }

    /* Pas de tirets / césures sur iOS */
    .essential-grid>a h3,
    .essential-grid>a p,
    .full-grid>a h3,
    .full-grid>a p {
        hyphens: none;
        -webkit-hyphens: none;
        -ms-hyphens: none;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .essential-grid>a h3 {
        font-size: .98rem;
        line-height: 1.15;
    }

    .essential-grid>a p {
        font-size: .84rem;
        line-height: 1.32;
    }

    /* Sommaire complet : 2 colonnes sur mobile */
    .full-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .85rem;
    }

    .full-grid>a {
        min-height: 190px;
        padding: 1.05rem .95rem;
    }
}

/* Espace net entre la section d’intro et le sommaire */
#situation {
    margin-bottom: 2.8rem;
}

/* Optionnel : un léger “respir” au-dessus du sommaire */
#sommaire {
    margin-top: 0.2rem;

    /* Fix robuste du chevauchement avec le premier bloc (Mon rôle)
       - padding ne collapse jamais (contrairement aux marges)
       - flow-root isole le contexte et évite certains effets de layout
       - z-index sécurise l’empilement si une animation/transform intervient */
    padding-bottom: 2.1rem;
    display: flow-root;
    position: relative;
    z-index: 2;
}

/* Espace garanti au-dessus de la grille de contenu (débutant par “Mon rôle”) */
section.grid {
    padding-top: 1.15rem;
    position: relative;
    z-index: 1;
}

.tech-stack {
    margin-top: .9rem;
    color: rgba(229, 231, 235, .86);
}

.tech-stack .tech-label {
    font-weight: 750;
    color: rgba(254, 252, 232, .92);
}

.tech-tags {
    margin-top: .65rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .55rem;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: .45rem;

    padding: .45rem .7rem;
    border-radius: 999px;

    font-size: .88rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .01em;

    color: rgba(229, 231, 235, .92);
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .22);
}

.tech-tag::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yellow), var(--pink));
    opacity: .9;
}

@media (max-width: 720px) {
    .tech-tags {
        justify-content: center;
    }
}

/* =========================================================
   RESERVE MODAL — CLEAN FINAL (blue night background)
   - Front & Back: dark blue night like page background
   - Brand colors only as accents (title/email/CTA/loader)
   - Quote subtle + premium
   ========================================================= */

.reserve-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reserve-overlay[hidden] {
    display: none;
}

.reserve-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.reserve-dialog {
    position: relative;
    width: min(560px, calc(100vw - 2.4rem));
    border-radius: var(--radius-xl);
    background: var(--bg);
    /* bleu nuit */
    border: 1px solid rgba(148, 163, 184, .22);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .78);
    overflow: hidden;
    transform-style: preserve-3d;
}

/* léger “sheen” premium sans jaune terne */
.reserve-dialog::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .75;
    background:
        radial-gradient(900px 420px at 20% 10%, rgba(236, 72, 153, 0.10), transparent 60%),
        radial-gradient(900px 420px at 80% 20%, rgba(247, 198, 0, 0.08), transparent 62%),
        radial-gradient(900px 520px at 50% 100%, rgba(148, 163, 184, 0.07), transparent 65%);
}

.reserve-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.reserve-close:hover {
    border-color: rgba(247, 198, 0, 0.55);
    transform: translateY(-1px);
}

.reserve-close:active {
    transform: translateY(0);
}

.reserve-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.20), 0 12px 28px rgba(0, 0, 0, .55);
}

.reserve-flip {
    perspective: 1200px;
    padding: 1.25rem 1.15rem 1.1rem;
}

.reserve-flip-inner {
    position: relative;
    transform-style: preserve-3d;
    min-height: 260px;
    height: var(--reserve-card-h, auto);
    /* piloté par le JS */
}

/* Faces : fond bleu nuit identique (front & back) */
.reserve-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: .72rem;
    padding: 1.15rem 1.05rem;
    text-align: center;
    background: transparent;
    /* on laisse la dialog gérer le fond */
}

.reserve-back {
    transform: rotateY(180deg);
}

/* FRONT */
.reserve-front-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: rgba(229, 231, 235, 0.78);
    opacity: .95;
}

.reserve-front-title {
    font-size: 1.55rem;
    font-weight: 850;
    letter-spacing: -.02em;
    background: linear-gradient(90deg, var(--yellow), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.reserve-front-sub {
    color: rgba(156, 163, 175, 0.92);
    font-size: .98rem;
    max-width: 40ch;
}

/* Citation (subtile, premium) */
.reserve-front-meta {
    margin-top: .25rem;
    max-width: 52ch;
    font-size: .98rem;
    line-height: 1.45;
    color: rgba(229, 231, 235, 0.74);
    font-weight: 600;
    letter-spacing: .005em;
    padding: .25rem 0 .25rem .85rem;
    position: relative;
}

.reserve-front-meta::before {
    content: "";
    position: absolute;
    left: 0;
    top: .35rem;
    bottom: .35rem;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--pink), var(--yellow));
    opacity: .85;
}

/* Loader */
.reserve-front-loader {
    margin-top: .85rem;
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    opacity: .90;
}

.reserve-front-loader-label {
    font-size: .95rem;
    color: rgba(229, 231, 235, 0.70);
    letter-spacing: .01em;
    font-weight: 650;
}

.reserve-front-dots {
    display: inline-flex;
    gap: .28rem;
    transform: translateY(1px);
}

.reserve-front-dots i {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yellow), var(--pink));
    opacity: .35;
    animation: reserveDotPulse 1.1s infinite ease-in-out;
}

.reserve-front-dots i:nth-child(2) {
    animation-delay: .12s;
}

.reserve-front-dots i:nth-child(3) {
    animation-delay: .24s;
}

@keyframes reserveDotPulse {

    0%,
    100% {
        transform: translateY(0);
        opacity: .25;
    }

    50% {
        transform: translateY(-4px);
        opacity: .95;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reserve-front-dots i {
        animation: none;
        opacity: .65;
    }
}

/* BACK */
.reserve-title {
    margin: 0 0 .35rem;
    font-weight: 900;
    letter-spacing: .02em;
    background: linear-gradient(90deg, var(--yellow), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.reserve-subtitle {
    margin: 0 0 1rem;
    max-width: 44ch;
    color: rgba(229, 231, 235, .72);
    font-size: .96rem;
    line-height: 1.35;
}

/* Back content block */
.reserve-block {
    width: 100%;
    max-width: 520px;
    text-align: left;
    padding: .80rem .90rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(255, 255, 255, .03);
}

.reserve-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: nowrap;
}

.reserve-row>* {
    min-width: 0;
}

.reserve-mail {
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: transparent;
    text-decoration: none;
    font-weight: 650;
    letter-spacing: .01em;
    background: linear-gradient(90deg, var(--yellow), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
}

.reserve-mail:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* Buttons */
.reserve-btn {
    --btn-bg: rgba(255, 255, 255, 0.05);
    --btn-border: rgba(148, 163, 184, 0.24);
    --btn-text: var(--text);

    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .78rem 1.05rem;
    border-radius: 999px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    font-weight: 800;
    letter-spacing: .01em;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.reserve-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(120% 140% at 20% 0%, rgba(255, 255, 255, 0.14), transparent 45%);
    opacity: .55;
    z-index: -1;
    pointer-events: none;
}

.reserve-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(247, 198, 0, 0.45);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .40);
}

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

.reserve-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.22), 0 18px 40px rgba(0, 0, 0, .55);
}

.reserve-btn--ghost {
    --btn-bg: rgba(255, 255, 255, 0.04);
    --btn-border: rgba(148, 163, 184, 0.24);
}

.reserve-btn--primary {
    --btn-border: rgba(247, 198, 0, 0.30);
    --btn-text: #050816;
    background: linear-gradient(135deg, rgba(247, 198, 0, 0.95), rgba(236, 72, 153, 0.75));
}

.reserve-btn--primary:hover {
    border-color: rgba(247, 198, 0, 0.75);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .55);
}

.reserve-btn--sm {
    padding: .58rem .82rem;
    font-weight: 850;
    font-size: .92rem;
    white-space: nowrap;
}

/* Actions layout */
.reserve-actions {
    display: grid;
    width: 100%;
    max-width: 520px;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
    margin-top: .9rem;
}

.reserve-actions .reserve-btn {
    width: 100%;
}

/* Mobile — centered perfectly inside the modal */
@media (max-width: 520px) {
    .reserve-overlay {
        padding: 1.2rem .85rem;
        align-items: center;
        justify-content: center;
    }

    .reserve-dialog {
        width: min(480px, calc(100vw - 1.4rem));
        margin-left: auto;
        margin-right: auto;
    }

    .reserve-face {
        padding: 1.05rem .95rem;
        gap: .62rem;
    }

    /* Bloc email bien centré par rapport à la modale */
    .reserve-block {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        /* <-- important */
    }

    /* On force un empilement propre, centré */
    .reserve-row {
        flex-wrap: wrap;
        justify-content: center;
        /* <-- au lieu de flex-start */
        align-items: center;
        gap: .6rem;
    }

    /* Mail sur sa ligne, centré */
    .reserve-mail {
        flex: 1 1 100%;
        text-align: center;
    }

    /* Bouton copier centré (et pas collé à gauche) */
    .reserve-btn--sm {
        margin-left: auto;
        margin-right: auto;
    }

    /* Actions en colonne, centrées */
    .reserve-actions {
        grid-template-columns: 1fr;
        gap: .65rem;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }
}