/* ============================
   Reset & variables par défaut
   ============================ */

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

:root {
    --couleur-principale: #9C7A52;
    --couleur-secondaire: #C9B79C;
    --couleur-accent: #D4A659;
    --couleur-fond: #FBF6EE;
    --couleur-texte: #2E2A24;
    --font-titre: 'Playfair Display', Georgia, serif;
    --font-corps: 'Source Sans 3', sans-serif;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-corps);
    color: var(--couleur-texte);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--couleur-principale); }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ============================
   Theme-scope — conteneur d'un événement (body en page publique,
   ou <div> dans l'aperçu live de l'éditeur de thème admin)
   ============================ */

.theme-scope {
    display: flex;
    flex-direction: column;
    background: var(--couleur-fond);
    color: var(--couleur-texte);
    font-family: var(--font-corps);
}

body.theme-scope {
    min-height: 100vh;
}

.theme-scope main { flex: 1; }

.theme-scope[data-texture="1"] {
    background-image: repeating-linear-gradient(
        0deg, rgba(0,0,0,0.025) 0px, rgba(0,0,0,0.025) 1px, transparent 1px, transparent 6px
    );
}

.theme-scope[data-rotation="0"] .polaroid,
.theme-scope[data-rotation="0"] .preview-polaroid {
    transform: none !important;
}

/* ============================
   Header
   ============================ */

.site-header { background: var(--couleur-fond); }

.site-header-inner {
    padding: 2rem 1.5rem 1rem;
    text-align: center;
}

.site-title {
    font-family: var(--font-titre);
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--couleur-principale);
    font-weight: 700;
    line-height: 1.15;
}

.site-subtitle {
    margin-top: 0.4rem;
    color: var(--couleur-texte);
    opacity: 0.7;
    font-size: 0.95rem;
}

.site-header--compact .site-header-inner {
    padding: 1rem 1.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.site-header--compact .site-title { font-size: clamp(1.3rem, 4vw, 2rem); }

.header-back {
    color: var(--couleur-principale);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0.8;
}
.header-back:hover { opacity: 1; }

/* Variante minimal : fond blanc forcé */
.theme-scope[data-header-style="minimal"] .site-header { background: #FFFFFF; }

/* Variante floral : motif fleurs en superposition, teinté couleur accent */
.theme-scope[data-header-style="floral"] .site-header {
    position: relative;
    overflow: hidden;
}
.theme-scope[data-header-style="floral"] .site-header::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-color: var(--couleur-accent);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='140'%3E%3Cg fill='%23fff'%3E%3Cpath d='M30 20c8 10 24 10 24 10-8 4 0 16 0 16-10-6-18 4-18 4-2-10-16-8-16-8 8-6 0-18 0-18 8 2 10-4 10-4z'/%3E%3Cpath d='M120 90c8 10 24 10 24 10-8 4 0 16 0 16-10-6-18 4-18 4-2-10-16-8-16-8 8-6 0-18 0-18 8 2 10-4 10-4z'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='140'%3E%3Cg fill='%23fff'%3E%3Cpath d='M30 20c8 10 24 10 24 10-8 4 0 16 0 16-10-6-18 4-18 4-2-10-16-8-16-8 8-6 0-18 0-18 8 2 10-4 10-4z'/%3E%3Cpath d='M120 90c8 10 24 10 24 10-8 4 0 16 0 16-10-6-18 4-18 4-2-10-16-8-16-8 8-6 0-18 0-18 8 2 10-4 10-4z'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
    pointer-events: none;
}

/* ============================
   Séparateurs (entre header/contenu et contenu/footer)
   ============================ */

.site-separator {
    width: 100%;
    height: 28px;
    flex-shrink: 0;
}

.theme-scope[data-separateur="none"] .site-separator { height: 0; }

.theme-scope[data-separateur="vague"] .site-separator {
    background-color: var(--couleur-secondaire);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='28'%3E%3Cpath d='M0,8 C12,20 25,20 37,8 C50,-4 62,-4 75,8 C87,20 100,8 100,8 L100,28 L0,28 Z' fill='%23fff'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='28'%3E%3Cpath d='M0,8 C12,20 25,20 37,8 C50,-4 62,-4 75,8 C87,20 100,8 100,8 L100,28 L0,28 Z' fill='%23fff'/%3E%3C/svg%3E");
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
    -webkit-mask-size: 100px 28px;
    mask-size: 100px 28px;
}

.theme-scope[data-separateur="lambrequin"] .site-separator {
    background-color: var(--couleur-secondaire);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='28'%3E%3Cpath d='M 8,8 A 24,24 0 0 1 64,8 Z' fill='%23fff'/%3E%3Cpolygon points='64,8 72,8 72,20' fill='%23fff'/%3E%3Cpolygon points='0,8 8,8 0,20' fill='%23fff'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='28'%3E%3Cpath d='M 8,8 A 24,24 0 0 1 64,8 Z' fill='%23fff'/%3E%3Cpolygon points='64,8 72,8 72,20' fill='%23fff'/%3E%3Cpolygon points='0,8 8,8 0,20' fill='%23fff'/%3E%3C/svg%3E");
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
    -webkit-mask-size: 80px 28px;
    mask-size: 80px 28px;
}

.site-separator--bottom { transform: scaleY(-1); }

/* ============================
   Décorations latérales (desktop large uniquement)
   ============================ */

@media (min-width: 1100px) {
    .theme-scope main { padding-left: 70px; padding-right: 70px; }

    .theme-scope[data-decoration="creole"]::before,
    .theme-scope[data-decoration="creole"]::after,
    .theme-scope[data-decoration="floral"]::before,
    .theme-scope[data-decoration="floral"]::after {
        content: '';
        position: fixed;
        top: 0;
        width: 70px;
        height: 100vh;
        z-index: 20;
        pointer-events: none;
        background-color: var(--couleur-secondaire);
    }

    .theme-scope[data-decoration="creole"]::before,
    .theme-scope[data-decoration="floral"]::before { left: 0; }
    .theme-scope[data-decoration="creole"]::after,
    .theme-scope[data-decoration="floral"]::after { right: 0; }

    /* Créole — fenêtres et volets en Z, héritage du projet Carole */
    .theme-scope[data-decoration="creole"]::before,
    .theme-scope[data-decoration="creole"]::after {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='140'%3E%3Cg fill='none' stroke='%23fff' stroke-width='4'%3E%3Crect x='15' y='15' width='40' height='60' rx='2'/%3E%3Cpath d='M15 25 L55 35 M15 45 L55 55 M15 65 L55 35' /%3E%3C/g%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='140'%3E%3Cg fill='none' stroke='%23fff' stroke-width='4'%3E%3Crect x='15' y='15' width='40' height='60' rx='2'/%3E%3Cpath d='M15 25 L55 35 M15 45 L55 55 M15 65 L55 35' /%3E%3C/g%3E%3C/svg%3E");
        -webkit-mask-repeat: repeat-y;
        mask-repeat: repeat-y;
        -webkit-mask-size: 70px 140px;
        mask-size: 70px 140px;
    }

    /* Floral — tiges et feuilles */
    .theme-scope[data-decoration="floral"]::before,
    .theme-scope[data-decoration="floral"]::after {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='160'%3E%3Cg fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='M35 0 C35 40 15 50 35 80 C55 110 15 120 35 160'/%3E%3Cellipse cx='22' cy='30' rx='10' ry='5' transform='rotate(-30 22 30)'/%3E%3Cellipse cx='48' cy='95' rx='10' ry='5' transform='rotate(30 48 95)'/%3E%3C/g%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='160'%3E%3Cg fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='M35 0 C35 40 15 50 35 80 C55 110 15 120 35 160'/%3E%3Cellipse cx='22' cy='30' rx='10' ry='5' transform='rotate(-30 22 30)'/%3E%3Cellipse cx='48' cy='95' rx='10' ry='5' transform='rotate(30 48 95)'/%3E%3C/g%3E%3C/svg%3E");
        -webkit-mask-repeat: repeat-y;
        mask-repeat: repeat-y;
        -webkit-mask-size: 70px 160px;
        mask-size: 70px 160px;
    }
}

/* ============================
   Hero (accueil)
   ============================ */

.hero {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    text-align: center;
}

.hero-number {
    font-family: var(--font-titre);
    font-size: clamp(5rem, 18vw, 8rem);
    color: var(--couleur-principale);
    line-height: 0.9;
    margin-bottom: 1.5rem;
}

.hero-content {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* ============================
   Boutons
   ============================ */

.btn-cta {
    display: inline-block;
    background: var(--couleur-principale);
    color: #FFFFFF;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-family: var(--font-corps);
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    min-height: 48px;
    transition: filter 0.2s, transform 0.15s;
    line-height: 1.3;
}
.btn-cta:hover { filter: brightness(0.9); transform: translateY(-1px); }

.btn-cta--secondary { background: var(--couleur-secondaire); }
.btn-cta--small { padding: 0.5rem 1.2rem; font-size: 0.9rem; min-height: 36px; }

/* ============================
   Footer
   ============================ */

.site-footer { background: var(--couleur-secondaire); margin-top: auto; }

.site-footer-inner { padding: 1.25rem 1.5rem; text-align: center; }

.rgpd {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto;
}

.footer-love {
    color: #FFFFFF;
    font-family: var(--font-titre);
    font-size: 1.6rem;
}

/* ============================
   Alertes
   ============================ */

.alert { padding: 0.75rem 1rem; border-radius: 8px; margin: 1rem auto; max-width: 680px; }
.alert--error { background: #fde8e8; border: 1px solid #c00; color: #c00; }

/* ============================
   Formulaire multi-étapes
   ============================ */

.form-main { max-width: 540px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

.progress-bar { display: flex; align-items: center; margin-bottom: 2.5rem; }
.progress-step { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; flex-shrink: 0; }
.progress-dot { width: 20px; height: 20px; border-radius: 50%; background: #d4ccc3; border: 3px solid #d4ccc3; transition: background 0.3s, border-color 0.3s; }
.progress-step.active .progress-dot, .progress-step.done .progress-dot { background: var(--couleur-principale); border-color: var(--couleur-principale); }
.progress-label { font-size: 0.72rem; color: #aaa; white-space: nowrap; font-weight: 700; }
.progress-step.active .progress-label { color: var(--couleur-principale); }
.progress-step.done .progress-label { color: #888; }
.progress-line { flex: 1; height: 3px; background: #d4ccc3; margin: 0 0.5rem 1.5rem; transition: background 0.3s; }
.progress-line.done { background: var(--couleur-principale); }

.form-step.hidden { display: none; }

.step-title { font-family: var(--font-titre); font-size: 1.8rem; color: var(--couleur-principale); margin-bottom: 1.5rem; font-weight: 700; }

.prefill-notice { background: rgba(0,0,0,0.04); border: 1px solid var(--couleur-secondaire); border-radius: 8px; padding: 0.7rem 1rem; margin-bottom: 1.25rem; font-size: 0.95rem; }

.field { margin-bottom: 1.25rem; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; }
.field input[type="text"], .field input[type="email"], .field textarea {
    width: 100%; padding: 0.75rem 1rem; border: 2px solid #e0d8cf; border-radius: 8px;
    font-size: 1rem; font-family: var(--font-corps); background: #FFFFFF; color: var(--couleur-texte);
    transition: border-color 0.2s; outline: none; min-height: 48px;
}
.field input:focus, .field textarea:focus { border-color: var(--couleur-principale); }
.field input[readonly] { background: #f5f0eb; color: #888; cursor: not-allowed; }
.field textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.field-error { display: block; color: #c43f0d; font-size: 0.83rem; margin-top: 0.35rem; min-height: 1.2em; }
.field-hint { font-size: 0.82rem; color: #888; margin-top: 0.4rem; }
.field-hint--notice { color: var(--couleur-secondaire); font-style: italic; }
.required { color: var(--couleur-principale); }
.optional { font-size: 0.8rem; color: #aaa; font-weight: 400; }

.checkbox-label { display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer; font-weight: 400; }
.checkbox-label input[type="checkbox"] { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--couleur-principale); cursor: pointer; }

.char-counter { font-size: 0.8rem; color: #aaa; margin-top: 0.4rem; text-align: right; }
.char-hint { color: #bbb; }

.upload-zone {
    border: 2px dashed #c8bfb5; border-radius: 10px; padding: 1.5rem; text-align: center;
    background: rgba(0,0,0,0.02); transition: border-color 0.2s, background 0.2s; position: relative;
    cursor: pointer; min-height: 120px; display: flex; align-items: center; justify-content: center; color: var(--couleur-secondaire);
}
.upload-zone:hover { border-color: var(--couleur-principale); }
.upload-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.upload-prompt p { margin: 0.4rem 0 0; color: #666; font-size: 0.95rem; }
.upload-hint { font-size: 0.8rem; color: #aaa; }
.image-preview { position: relative; }
.image-preview img { max-height: 180px; border-radius: 8px; object-fit: contain; margin: 0 auto; }
.image-preview.hidden, .upload-prompt.hidden { display: none; }
.remove-photo { display: block; margin: 0.5rem auto 0; background: none; border: 1px solid #e0d8cf; border-radius: 6px; padding: 0.3rem 0.8rem; font-size: 0.8rem; cursor: pointer; color: #888; position: relative; z-index: 3; }
.remove-photo:hover { color: #c00; border-color: #c00; }

.recap-box { background: rgba(0,0,0,0.04); border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1.25rem; font-size: 0.9rem; }
.recap-message { color: #777; font-style: italic; margin-top: 0.25rem; }

.step-nav { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.btn-next, .btn-prev, .btn-submit { flex: 1; min-height: 52px; padding: 0.85rem 1.5rem; border: none; border-radius: 50px; font-size: 1rem; font-family: var(--font-corps); font-weight: 700; cursor: pointer; transition: filter 0.2s, transform 0.15s; }
.btn-next, .btn-submit { background: var(--couleur-principale); color: #FFFFFF; }
.btn-next:hover, .btn-submit:hover { filter: brightness(0.9); transform: translateY(-1px); }
.btn-prev { background: #ede8e0; color: #555; flex: 0 1 auto; min-width: 130px; }
.btn-prev:hover { background: #ddd8cf; }

/* ============================
   Prévisualisation polaroid (étape 4)
   ============================ */

.preview-wrap { display: flex; flex-direction: column; align-items: center; padding: 1.5rem 0 0.5rem; gap: 1.25rem; }
.preview-polaroid { background: #FFFFFF; padding: 10px 10px 40px; box-shadow: 0 6px 24px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.08); border-radius: 2px; transform: rotate(var(--rot, -1.5deg)); width: 230px; max-width: 85%; transition: transform 0.4s ease; }
.preview-polaroid-photo { width: 100%; min-height: 170px; background: #f0ebe4; display: flex; align-items: center; justify-content: center; color: var(--couleur-secondaire); }
.preview-polaroid-photo img { width: 100%; height: auto; display: block; }
.preview-polaroid-empty { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--couleur-fond); background: linear-gradient(135deg, color-mix(in srgb, var(--couleur-secondaire) 30%, white), color-mix(in srgb, var(--couleur-secondaire) 15%, white)); }
.preview-polaroid-caption { padding-top: 8px; text-align: center; font-family: var(--font-titre); color: var(--couleur-principale); font-size: 1.3rem; line-height: 1.2; }
.preview-message { max-width: 400px; text-align: center; color: #555; font-style: italic; line-height: 1.65; font-size: 1rem; }

/* ============================
   Merci
   ============================ */

.merci-main { max-width: 540px; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
.merci-card { background: #FFFFFF; border-radius: var(--radius); padding: 2.5rem 2rem; text-align: center; box-shadow: var(--shadow); }
.merci-icon { font-size: 3rem; margin-bottom: 1rem; }
.merci-title { font-family: var(--font-titre); font-size: 2.2rem; color: var(--couleur-principale); font-weight: 700; margin-bottom: 1rem; }
.merci-text { font-size: 1.05rem; color: #555; margin-bottom: 0.75rem; }
.merci-second { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #ede8e0; }
.merci-second-text { color: #666; margin-bottom: 1rem; }

/* ============================
   Slider public
   ============================ */

.page-slider { overflow-x: hidden; }
.slider-wrapper { position: relative; min-height: calc(100vh - 160px); display: flex; flex-direction: column; align-items: center; padding: 2rem 1rem; }
.slider-counter { font-family: var(--font-titre); font-size: 1.3rem; color: var(--couleur-principale); margin-bottom: 1.5rem; user-select: none; }
.slider-container { width: 100%; max-width: 900px; position: relative; min-height: 480px; display: flex; align-items: center; justify-content: center; }
.slide { display: none; width: 100%; animation: fadeIn 0.4s ease; }
.slide.active { display: flex; justify-content: center; align-items: flex-start; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slider-nav { display: flex; gap: 1.5rem; margin-top: 2rem; align-items: center; }
.slider-btn { width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--couleur-principale); color: #FFFFFF; font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: filter 0.2s, transform 0.15s; min-height: 48px; min-width: 48px; }
.slider-btn:hover { filter: brightness(0.9); transform: scale(1.05); }
.slider-btn:disabled { background: #d4ccc3; cursor: not-allowed; }

.slide-layout { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 1.5rem; }

.polaroid { background: #FFFFFF; padding: 0.75rem 0.75rem 1.5rem; box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08); border-radius: 2px; transform: rotate(var(--rot, 0deg)); transition: transform 0.3s; display: inline-flex; flex-direction: column; }
.polaroid-photo { width: 260px; background: #f0ebe4; display: flex; align-items: center; justify-content: center; color: var(--couleur-secondaire); }
.polaroid-photo img { width: 100%; height: auto; display: block; }
.polaroid-photo--empty { height: 200px; background: var(--couleur-fond); background: linear-gradient(135deg, color-mix(in srgb, var(--couleur-secondaire) 30%, white), color-mix(in srgb, var(--couleur-secondaire) 15%, white)); flex-direction: column; gap: 0.5rem; }
.polaroid-caption { padding-top: 0.6rem; text-align: center; min-height: 2rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.polaroid-raison { font-family: var(--font-titre); font-size: 1.6rem; color: var(--couleur-principale); line-height: 1; }
.polaroid-nom { font-size: 0.9rem; color: #888; font-style: italic; }

.slide-layout--solo-text { min-height: 400px; justify-content: center; }
.slide-text-card { background: var(--couleur-secondaire); border-radius: var(--radius); padding: 3rem 2rem; max-width: 600px; width: 100%; text-align: center; position: relative; overflow: hidden; color: #FFFFFF; }
.slide-motif { position: absolute; top: -20px; right: -20px; opacity: 0.25; color: var(--couleur-fond); }
.slide-quote { font-size: clamp(1.05rem, 2.5vw, 1.35rem); line-height: 1.7; font-style: italic; margin-bottom: 1.5rem; }
.slide-author { color: rgba(255,255,255,0.75); font-size: 0.95rem; }
.slide-message { max-width: 400px; font-size: 1rem; color: #555; line-height: 1.65; text-align: center; font-style: italic; }

.slide-layout--groupe { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.polaroid--small .polaroid-photo { width: 180px; }
.polaroid--small .polaroid-raison { font-size: 1.3rem; }
.groupe-messages { width: 100%; display: flex; flex-direction: column; gap: 0.75rem; max-width: 640px; margin: 0 auto; }
.groupe-message { font-size: 0.95rem; color: #555; line-height: 1.5; padding: 0.5rem 1rem; border-left: 3px solid var(--couleur-secondaire); }
.groupe-message strong { color: var(--couleur-principale); }

.mais-aussi { background: #FFFFFF; padding: 3rem 1.5rem 4rem; text-align: center; }
.mais-aussi-titre { font-family: var(--font-titre); font-size: 2.5rem; color: var(--couleur-secondaire); margin-bottom: 2.5rem; font-weight: 700; }
.mais-aussi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; max-width: 900px; margin: 0 auto; justify-items: center; }
@media (min-width: 700px) { .mais-aussi-grid { grid-template-columns: repeat(3, 1fr); } }
.polaroid--bonus { display: inline-flex; flex-direction: column; }
.polaroid--bonus .polaroid-photo { width: 140px; }
.bonus-message { max-width: 140px; font-size: 0.78rem; color: #777; text-align: center; margin-top: 0.4rem; line-height: 1.4; }

@media (max-width: 480px) {
    .polaroid-photo { width: 220px; }
    .slide-text-card { padding: 2rem 1.25rem; }
    .slider-wrapper { padding: 1.5rem 0.75rem; }
    .polaroid--small .polaroid-photo { width: 140px; }
}

/* ============================
   Admin — chrome neutre (indépendant du thème événement)
   ============================ */

body { background: #F4F1EC; }

.page-admin-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #F4F1EC; }
.admin-login-wrap { width: 100%; max-width: 380px; padding: 1rem; }
.admin-login-box { background: #FFFFFF; border-radius: 12px; padding: 2.5rem 2rem; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.admin-login-title { font-family: 'Playfair Display', Georgia, serif; font-size: 2.2rem; color: #9C7A52; margin-bottom: 0.25rem; }
.admin-login-sub { color: #888; font-size: 0.9rem; margin-bottom: 1.5rem; }

.admin-shell { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.admin-shell--narrow { max-width: 640px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.admin-title { font-family: 'Playfair Display', Georgia, serif; font-size: 2rem; color: #9C7A52; }
.admin-nav-back { color: #9C7A52; text-decoration: none; font-size: 0.9rem; font-weight: 700; }
.admin-nav { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin-nav a { padding: 0.5rem 1rem; background: #C9B79C; color: #fff; border-radius: 8px; text-decoration: none; font-size: 0.9rem; font-weight: 700; }
.admin-nav a:hover { background: #b6a085; }
.logout-link { color: #888; font-size: 0.85rem; text-decoration: none; }
.logout-link:hover { color: #c00; }

.success-msg { background: #e2f7f0; color: #2a7a5c; padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }

.stats-bar { display: flex; gap: 1.25rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.stat-box { background: #fff; border-radius: 12px; padding: 1rem 1.5rem; border-left: 4px solid #9C7A52; }
.stat-box strong { display: block; font-size: 1.8rem; color: #9C7A52; }
.stat-box span { font-size: 0.85rem; color: #666; }

.creer-evenement { margin-bottom: 2rem; }
.creer-evenement summary { cursor: pointer; list-style: none; }
.creer-form { background: #fff; border-radius: 12px; padding: 1.5rem; margin-top: 1rem; max-width: 480px; }

.contributions-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.contributions-table th { text-align: left; padding: 0.6rem 0.75rem; background: #efe9e0; font-size: 0.85rem; color: #555; }
.contributions-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #ede8e0; vertical-align: middle; font-size: 0.9rem; }
.contributions-table tr:hover td { background: #fbf6ee; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.thumb-placeholder, .item-thumb-empty { width: 48px; height: 48px; background: #e0dbd4; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 1.2rem; }
.statut-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.78rem; font-weight: 700; }
.statut-en_attente { background: #f0ebe4; color: #888; }
.statut-retenu { background: #e2f7f0; color: #2a7a5c; }
.statut-bonus { background: #fff4d6; color: #a07000; }
.statut-exclu { background: #fde8e8; color: #c00; }
.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; border: none; border-radius: 6px; cursor: pointer; font-weight: 700; min-height: 32px; }
.btn-retenir { background: #e2f7f0; color: #2a7a5c; }
.btn-bonus { background: #fff4d6; color: #a07000; }
.btn-exclure { background: #fde8e8; color: #c00; }
.btn-supprimer { background: #c00; color: #fff; }
.btn-group { background: #C9B79C; color: #fff; }
.btn-degroup { background: #f0ebe4; color: #555; }
.detail-link { color: #9C7A52; font-size: 0.8rem; text-decoration: none; }
.detail-link:hover { text-decoration: underline; }
.detail-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; align-items: center; justify-content: center; }
.detail-modal.open { display: flex; }
.detail-box { background: #fff; border-radius: 12px; padding: 2rem; max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.detail-box img { max-width: 100%; border-radius: 8px; margin-top: 1rem; }
.detail-meta { color: #888; font-size: 0.85rem; }
.detail-message { margin-top: 1rem; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.4rem; cursor: pointer; }

.slide-counter { font-size: 1.1rem; color: #555; margin-bottom: 1rem; }
.slide-counter strong { color: #9C7A52; }
.sortable-list { list-style: none; margin: 0 0 1.5rem; }
.sortable-item { display: flex; align-items: center; gap: 0.75rem; background: #fff; border: 2px solid #ede8e0; border-radius: 10px; padding: 0.6rem 0.75rem; margin-bottom: 0.5rem; cursor: grab; transition: box-shadow 0.2s; }
.sortable-item:active { cursor: grabbing; }
.sortable-item.dragging { opacity: 0.5; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.sortable-item.drag-over { border-color: #9C7A52; border-style: dashed; }
.sortable-item[data-groupe]:not([data-groupe=""]) { border-color: #C9B79C; background: #f6f2ec; }
.item-pos { font-weight: 700; color: #9C7A52; width: 28px; text-align: center; font-family: 'Playfair Display', Georgia, serif; font-size: 1.2rem; }
.item-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.item-info { flex: 1; min-width: 0; }
.item-nom { font-weight: 700; font-size: 0.9rem; }
.item-msg { font-size: 0.8rem; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-groupe-badge { font-size: 0.75rem; background: #C9B79C; color: #fff; border-radius: 20px; padding: 0.15rem 0.5rem; margin-left: 0.4rem; }
.item-actions { display: flex; gap: 0.4rem; }
.drag-handle { cursor: grab; color: #ccc; font-size: 1.2rem; }
.save-bar { position: sticky; bottom: 0; background: #F4F1EC; padding: 1rem 0; border-top: 1px solid #ede8e0; }

.publi-card, .send-card { background: #fff; border-radius: 12px; padding: 2rem; box-shadow: 0 2px 16px rgba(0,0,0,0.07); }
.publi-card { text-align: center; }
.publi-status { font-size: 1.1rem; margin-bottom: 1.5rem; }
.publi-status strong { color: #9C7A52; }
.status-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 0.5rem; }
.status-dot--on { background: #2a7a5c; }
.status-dot--off { background: #ccc; }
.publi-url { background: #f6f2ec; border: 1px solid #C9B79C; border-radius: 8px; padding: 0.75rem 1rem; margin: 1rem 0; word-break: break-all; font-family: monospace; font-size: 0.9rem; }
.send-info { color: #555; margin-bottom: 1.5rem; }
.send-card textarea { width: 100%; min-height: 140px; padding: 0.75rem 1rem; border: 2px solid #e0d8cf; border-radius: 8px; font-family: inherit; font-size: 1rem; margin-bottom: 1rem; }

.danger-zone { margin-top: 2rem; }
.danger-zone summary { cursor: pointer; color: #c00; font-weight: 700; }
.danger-zone form { margin-top: 1rem; }

/* ============================
   Éditeur de thème
   ============================ */

.theme-editor { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 900px) { .theme-editor { grid-template-columns: 360px 1fr; } }
.theme-editor-form { background: #fff; border-radius: 12px; padding: 1.5rem; }
.theme-editor-form fieldset { border: none; margin-bottom: 1.5rem; }
.theme-editor-form legend { font-weight: 700; margin-bottom: 0.75rem; color: #9C7A52; }
.field--inline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.field--inline input[type="color"] { width: 48px; height: 32px; border: none; border-radius: 6px; cursor: pointer; }
.theme-editor-form select { width: 100%; padding: 0.6rem 0.75rem; border: 2px solid #e0d8cf; border-radius: 8px; font-size: 0.95rem; background: #fff; }
.theme-editor-actions { margin-top: 1rem; }
.theme-reset-form { margin-top: 1.5rem; }

.theme-preview-label { font-size: 0.85rem; color: #888; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.theme-preview-mock { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 16px rgba(0,0,0,0.1); max-width: 480px; }
.theme-preview-mock .preview-mock-main { padding: 2rem 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
