/* ==========================================================
   Ludothèque de Savigny – espace d'administration
   Mêmes couleurs que le site (logo) : rose #e0457b / taupe #9c8069
   ========================================================== */
:root {
    --pink: #e0457b;
    --pink-600: #c93768;
    --pink-700: #a92b55;
    --pink-50: #fdeef3;
    --pink-100: #f9d7e3;
    --taupe: #9c8069;
    --taupe-600: #7d6553;
    --ink: #2e2621;
    --slate: #6f6259;
    --cream: #f7f3ef;
    --line: rgba(46, 38, 33, .10);
    --white: #fff;
}

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

body {
    font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.5;
    padding: 0 0 60px;
}

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 2px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Connexion ---------- */
.login-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at 15% 20%, rgba(224, 69, 123, .12), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(156, 128, 105, .18), transparent 45%),
        var(--cream);
}
.login-box {
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 5px solid var(--pink);
    border-radius: 18px;
    padding: 34px 32px 26px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 30px 60px -30px rgba(46, 38, 33, .35);
    text-align: center;
}
.login-box img { height: 54px; width: auto; margin: 0 auto 18px; display: block; }
.login-box h1 { font-size: 1.25rem; margin-bottom: 4px; }
.login-box p { color: var(--slate); font-size: .9rem; margin-bottom: 20px; }
.login-box input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    font: inherit;
    margin-bottom: 14px;
}
.login-box input:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px rgba(224, 69, 123, .15); }
.login-box button {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 100px;
    background: var(--pink-600);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.login-box button:hover { background: var(--pink-700); }
.login-box .err { color: var(--pink-700); background: var(--pink-50); border-radius: 8px; padding: 8px 10px; font-size: .85rem; margin-bottom: 12px; }
.login-back { display: inline-block; margin-top: 16px; font-size: .85rem; color: var(--slate); text-decoration: none; }
.login-back:hover { color: var(--pink-600); }

/* ---------- Barre supérieure ---------- */
.top {
    background: var(--ink);
    color: #fff;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.top-left { display: flex; align-items: center; gap: 14px; }
.top-logo {
    display: block;
    background: #fff;
    border-radius: 10px;
    padding: 5px 10px;
}
.top-logo img { height: 32px; width: auto; display: block; }
.top h1 { font-size: 1.1rem; font-weight: 600; }
.top .right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.backsite {
    color: #fff;
    font-size: .82rem;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--pink-600);
    font-weight: 600;
    white-space: nowrap;
}
.backsite:hover { background: var(--pink-700); }
.backsite.ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .3); }
.backsite.ghost:hover { background: rgba(255, 255, 255, .1); }
.logout { color: rgba(255, 255, 255, .6); font-size: .8rem; text-decoration: none; padding: 6px 4px; }
.logout:hover { color: #fff; }

.range { display: flex; gap: 6px; flex-wrap: wrap; }
.range a {
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    font-size: .82rem;
    padding: 6px 12px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, .2);
    white-space: nowrap;
}
.range a:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.range a.on { background: var(--pink); color: #fff; border-color: var(--pink); }

/* ---------- Contenu ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px; }
.intro { margin-bottom: 24px; }
.intro h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.muted { color: var(--slate); font-size: .88rem; }
.foot-note { text-align: center; margin-top: 20px; font-size: .78rem; }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 22px;
}
.card h2 {
    font-size: 1rem;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

/* Accueil admin : tuiles */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
a.tool {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.tool:hover { border-color: var(--pink); box-shadow: 0 18px 40px -28px rgba(224, 69, 123, .6); transform: translateY(-2px); }
.ico {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--pink-50);
    color: var(--pink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ico svg { width: 28px; height: 28px; }
a.tool h3 { font-size: 1.1rem; }
a.tool p { color: var(--slate); font-size: .9rem; flex: 1; }
.cta {
    align-self: flex-start;
    color: #fff;
    background: var(--pink-600);
    font-size: .85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
}
a.tool:hover .cta { background: var(--pink-700); }
.count {
    position: absolute;
    top: 22px; right: 24px;
    background: var(--pink);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 100px;
}
.tool-stat { font-size: .82rem; color: var(--taupe-600); }
.tool-stat strong { color: var(--pink-600); font-size: 1rem; }

/* ---------- Statistiques ---------- */
.alert {
    background: var(--pink-50);
    border: 1px solid var(--pink-100);
    color: var(--pink-700);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: .92rem;
}

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.kpi .n { font-size: 2rem; font-weight: 800; color: var(--pink); line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .78rem; color: var(--slate); text-transform: uppercase; letter-spacing: .06em; margin-top: 8px; }

/* 2 colonnes : chaque carte garde la hauteur de son contenu */
.grid { column-count: 2; column-gap: 22px; }
.grid > .card { break-inside: avoid; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--slate); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; color: var(--slate); font-size: .78rem; }
td.path { overflow-wrap: anywhere; }
td.path .sub { overflow-wrap: normal; }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px; align-items: center; font-size: .85rem; }
.bar-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--pink-50); border-radius: 6px; height: 10px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--pink); border-radius: 6px; }
.bar-v { text-align: right; color: var(--slate); font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--slate); font-weight: 400; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 170px; margin-top: 8px; }
.chart .col { flex: 1; min-width: 0; height: 100%; background: var(--pink-50); border-radius: 4px 4px 0 0; position: relative; }
.chart .col span { position: absolute; left: 0; right: 0; bottom: 0; min-height: 2px; background: var(--pink); border-radius: 4px 4px 0 0; }
.chart .col span.v2 { background: var(--taupe); opacity: .85; left: 25%; right: 25%; }
.chart .col:hover span { filter: brightness(.9); }
.chart.dense .col, .chart.dense .col span { border-radius: 1px 1px 0 0; }
.chart-x { display: flex; gap: 3px; margin-top: 6px; }
.chart-x div { flex: 1; min-width: 0; position: relative; height: 1em; line-height: 1; font-size: .6rem; color: var(--slate); white-space: nowrap; }
.chart-x div span { position: absolute; left: 50%; transform: translateX(-50%); }

.hours { display: flex; align-items: flex-end; gap: 2px; height: 90px; }
.hours .h { flex: 1; background: var(--pink); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.hours-x { display: flex; justify-content: space-between; font-size: .65rem; color: var(--slate); margin-top: 4px; }

a.sess { color: var(--pink-600); text-decoration: none; font-size: .82rem; }
a.sess:hover { text-decoration: underline; }
.sess-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.per { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pill {
    color: var(--ink);
    text-decoration: none;
    font-size: .8rem;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid var(--line);
    background: var(--white);
}
.pill:hover { border-color: var(--pink); color: var(--pink-600); }
.pill.on { background: var(--pink-600); border-color: var(--pink-600); color: #fff; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pager .gap { color: var(--slate); padding: 0 2px; }

.journey { list-style: none; margin-top: 8px; counter-reset: j; }
.journey li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .88rem; display: flex; gap: 12px; align-items: baseline; }
.journey li::before {
    counter-increment: j;
    content: counter(j);
    flex: 0 0 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--pink-50);
    color: var(--pink-700);
    font-size: .75rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}
.journey .t { color: var(--slate); font-variant-numeric: tabular-nums; white-space: nowrap; }
.journey .d { margin-left: auto; color: var(--slate); font-size: .78rem; white-space: nowrap; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; background: var(--cream); padding: 1px 6px; border-radius: 4px; }

@media (max-width: 760px) {
    .top { padding: 14px 16px; }
    .wrap { padding: 20px 16px; }
    .grid { column-count: 1; }
    .bar-row { grid-template-columns: 90px 1fr 70px; }
    .top-logo img { height: 26px; }
    .chart-x div span:not(.major) { display: none; }
    .card { padding: 18px 16px; }
}

/* ---------- Pages de gestion (comité…) ---------- */
.flash { border-radius: 12px; padding: 12px 18px; margin-bottom: 22px; font-size: .9rem; border: 1px solid var(--line); }
.flash.ok { background: #e9f7ee; color: #1e6b40; border-color: #c6e9d3; }
.flash.err { background: var(--pink-50); color: var(--pink-700); border-color: var(--pink-100); }

.scroll { overflow-x: auto; }
.table-admin th, .table-admin td { padding: 12px 8px; vertical-align: middle; }
.table-admin th { white-space: nowrap; }
.order { display: flex; align-items: center; gap: 10px; }
.order .n { min-width: 22px; font-weight: 600; color: var(--slate); font-variant-numeric: tabular-nums; }
.mvs { display: flex; gap: 4px; }
.mv {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(46, 38, 33, .2);
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: .95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mv:hover:not(:disabled) { border-color: var(--pink); color: var(--pink-600); }
.mv:disabled { opacity: .3; cursor: not-allowed; }
tr:target td, tr.editing td { background: var(--pink-50); }
td.date { white-space: nowrap; color: var(--slate); font-variant-numeric: tabular-nums; font-size: .85rem; }
td .who { font-weight: 600; }
.small-link { font-size: .8rem; color: var(--pink-600); text-decoration: none; }
.small-link:hover { text-decoration: underline; }
tr.off .who { color: var(--slate); }
tr.off .thumb { opacity: .5; }

.thumb, .avatar-lg {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--pink-50);
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--pink-100);
}
.thumb img, .avatar-lg img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.thumb.ph, .avatar-lg.ph { color: var(--pink-600); font-weight: 700; font-size: .95rem; letter-spacing: .04em; }
.avatar-lg { width: 96px; height: 96px; }
.avatar-lg.ph { font-size: 1.6rem; }

.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 10px; border-radius: 100px; white-space: nowrap; }
.badge.on { background: #e7f5ec; color: #1e7e4a; }
.badge.off { background: #efeae6; color: var(--slate); }

.actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.head-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
form.inline { display: inline; margin: 0; }
.btn {
    display: inline-block;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: .8rem;
    padding: 7px 16px;
    border-radius: 100px;
    text-decoration: none;
    white-space: nowrap;
}
.btn-on { background: var(--pink-600); color: #fff; }
.btn-on:hover { background: var(--pink-700); }
.btn-off { background: transparent; color: var(--ink); border: 1px solid rgba(46, 38, 33, .2); }
.btn-off:hover { border-color: var(--pink); color: var(--pink-600); }
.btn-danger { background: transparent; color: #b3261e; border: 1px solid rgba(179, 38, 30, .3); }
.btn-danger:hover { background: #b3261e; color: #fff; border-color: #b3261e; }

/* Formulaire d'ajout / modification */
.card-form { border: 1px solid var(--pink-100); box-shadow: 0 18px 40px -30px rgba(224, 69, 123, .6); }
.edit-form { display: flex; flex-direction: column; gap: 18px; }
.form-photo { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field-wide { grid-column: 1 / -1; }
.lbl { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.lbl .muted { font-weight: 400; font-size: .8rem; }
.edit-form input[type="text"], .edit-form input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    font: inherit;
    background: var(--white);
}
.edit-form input[type="text"]:focus, .edit-form input[type="url"]:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px rgba(224, 69, 123, .15); }
.edit-form input[type="file"] { font: inherit; font-size: .85rem; max-width: 100%; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; margin-top: 6px; }
.check input { width: 18px; height: 18px; accent-color: var(--pink-600); }
.small { font-size: .78rem; margin-top: 4px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); padding-top: 16px; }
.form-actions .btn { font-size: .9rem; padding: 10px 22px; }

@media (max-width: 760px) {
    .form-grid { grid-template-columns: 1fr; }
    /* Tableau en fiches sur mobile */
    .table-admin tr:first-child { display: none; }
    .table-admin, .table-admin tbody, .table-admin tr, .table-admin td { display: block; width: 100%; }
    .table-admin tr { border-bottom: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: 56px 1fr; gap: 4px 12px; }
    .table-admin td { border: 0; padding: 0; }
    .table-admin td[data-l="Photo"] { grid-row: 1 / span 3; grid-column: 1; }
    .table-admin td[data-l="Ordre"] { grid-column: 2; order: 10; }
    .table-admin td[data-l="Modifié le"] { display: none; }
    .table-admin td:last-child { grid-column: 1 / -1; order: 11; }
    .actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 6px; }
}

/* ---------- Jeux des animations ---------- */
.edit-form textarea, .edit-form input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    font: inherit;
    background: var(--white);
    resize: vertical;
}
.edit-form textarea:focus, .edit-form input[type="number"]:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px rgba(224, 69, 123, .15); }
.edit-form input[type="number"] { max-width: 180px; }

.pos {
    width: 52px;
    padding: 4px 6px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    font-size: .85rem;
    text-align: center;
    color: var(--slate);
    background: var(--white);
    font-variant-numeric: tabular-nums;
}
.pos:focus { border-color: var(--pink); outline: none; color: var(--ink); box-shadow: 0 0 0 3px rgba(224, 69, 123, .15); }
.table-jeux td.jeu { min-width: 220px; }
.table-jeux .desc { font-size: .82rem; color: var(--slate); line-height: 1.4; margin-top: 2px; }
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .78rem;
    white-space: nowrap;
    background: var(--cream);
    color: var(--taupe-600);
    border: 1px solid var(--line);
}
.tag-pink { background: var(--pink-50); color: var(--pink-700); border-color: var(--pink-100); }

@media (max-width: 760px) {
    .table-jeux tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
    .table-jeux td { width: 100%; }
    .table-jeux td[data-l="Matériel"], .table-jeux td[data-l="Espace"], .table-jeux td[data-l="Statut"] { width: auto; }
    .table-jeux td.jeu { min-width: 0; }
}
.wrap-wide { max-width: 1280px; }
.table-jeux .actions { flex-wrap: wrap; }

/* ---------- Soirées ---------- */
.form-grid-3 { grid-template-columns: 1fr 1fr 2fr; }
.edit-form select, .edit-form input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    font: inherit;
    background: var(--white);
    color: var(--ink);
}
.edit-form select:focus, .edit-form input[type="date"]:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px rgba(224, 69, 123, .15); }

.quick-add { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--pink-100); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid rgba(46, 38, 33, .18);
    background: var(--white);
    font-size: .85rem;
    transition: background .15s, border-color .15s, color .15s;
}
.chip span::before { content: "+ "; color: var(--pink); font-weight: 700; }
.chip:hover span { border-color: var(--pink); }
.chip input:checked + span { background: var(--pink-600); border-color: var(--pink-600); color: #fff; }
.chip input:checked + span::before { content: "✓ "; color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }

form.remarque-form { display: flex; gap: 6px; align-items: center; }
.remarque-form input {
    width: 100%;
    min-width: 140px;
    padding: 6px 10px;
    border: 1px solid rgba(46, 38, 33, .15);
    border-radius: 8px;
    font: inherit;
    font-size: .85rem;
    background: var(--cream);
}
.remarque-form input:focus { border-color: var(--pink); outline: none; background: var(--white); }
.btn-sm { padding: 5px 12px; font-size: .75rem; }

.kpi-text .n { font-size: 1.8rem; }

details.past { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.past summary { cursor: pointer; font-size: .88rem; color: var(--slate); font-weight: 600; }
details.past summary:hover { color: var(--pink-600); }
details.past ul { list-style: none; margin-top: 10px; columns: 2; column-gap: 24px; }
details.past li { padding: 5px 0; font-size: .85rem; color: var(--slate); break-inside: avoid; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

@media (max-width: 760px) {
    .form-grid-3 { grid-template-columns: 1fr; }
    details.past ul { columns: 1; }
    .table-soirees tr { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
    .table-soirees td { width: auto; }
    .table-soirees td[data-l="Date"], .table-soirees td[data-l="Remarque"], .table-soirees td:last-child { width: 100%; }
}
.count-pill { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: .78rem; font-weight: 600; background: var(--pink-50); color: var(--pink-700); white-space: nowrap; }
.count-pill.zero { background: var(--cream); color: var(--slate); font-weight: 400; }

/* ---------- Inscrits ---------- */
a.count-pill { text-decoration: none; transition: background .15s, color .15s; }
a.count-pill:hover { background: var(--pink-600); color: #fff; }
.soiree-picker { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.picker-form { flex: 1 1 360px; }
.picker-form select {
    width: 100%;
    max-width: 560px;
    padding: 10px 12px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    font: inherit;
    background: var(--white);
    color: var(--ink);
}
.picker-form select:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px rgba(224, 69, 123, .15); }
.picker-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.card h2 .badge, .card h2 .tag { margin-left: 6px; vertical-align: middle; }
@media (max-width: 760px) {
    .table-inscrits tr { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
    .table-inscrits td { width: auto; }
    .table-inscrits td[data-l="#"], .table-inscrits td[data-l="Inscrit le"] { display: none; }
    .table-inscrits td[data-l="E-mail"], .table-inscrits td:last-child { width: 100%; }
}

/* ---------- Demandes de contact ---------- */
.search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 11px 14px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    font: inherit;
    font-size: .95rem;
    background: var(--white);
    color: var(--ink);
}
.search input[type="search"]:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px rgba(224, 69, 123, .15); }
.search .btn { padding: 11px 22px; font-size: .9rem; }

td .sub { font-size: .8rem; color: var(--slate); overflow-wrap: anywhere; }
td.preview { color: var(--slate); font-size: .85rem; min-width: 220px; }
a.name-link { color: inherit; text-decoration: none; }
a.name-link:hover { color: var(--pink-600); }
.table-contact tr.unsent td { background: #fff6f8; }
.table-contact tr.done .who, .table-contact tr.done td.preview { color: var(--slate); opacity: .8; }

.badge.ok { background: var(--cream); color: var(--slate); }
.badge.ko { background: var(--pink-50); color: var(--pink-700); }
.badge.todo { background: var(--pink-50); color: var(--pink-700); }
.badge.done { background: #e7f5ec; color: #1e7e4a; }

.pager-split { justify-content: space-between; }
.pager-split .links { display: flex; gap: 8px; }

.detail { display: grid; grid-template-columns: 150px 1fr; gap: 10px 18px; font-size: .92rem; margin-bottom: 20px; }
.detail dt { color: var(--slate); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.detail dd { overflow-wrap: anywhere; margin: 0; }
.detail a { color: var(--pink-600); text-decoration: none; }
.detail a:hover { text-decoration: underline; }
.detail-tech { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.msg {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: var(--cream);
    border: 1px solid var(--line);
    border-left: 4px solid var(--pink);
    border-radius: 12px;
    padding: 16px 18px;
    font-size: .95rem;
    margin-bottom: 20px;
}
.tech { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; color: var(--slate); word-break: break-all; }
.card > .actions { justify-content: flex-start; flex-wrap: wrap; }

@media (max-width: 760px) {
    .detail { grid-template-columns: 1fr; gap: 2px; }
    .detail dd { margin-bottom: 10px; }
    .table-contact tr { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
    .table-contact td { width: 100%; }
    .table-contact td[data-l="Statut"], .table-contact td[data-l="E-mail"] { width: auto; }
    .table-contact td.preview { min-width: 0; }
}
.table-contact td[data-l="Contact"] { min-width: 180px; }
@media (max-width: 760px) { .table-contact td[data-l="Contact"] { min-width: 0; } }

/* ---------- Newsletter ---------- */
.copy-box { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.copy-box textarea {
    flex: 1 1 320px;
    min-height: 70px;
    padding: 10px 12px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .8rem;
    color: var(--slate);
    background: var(--cream);
    resize: vertical;
}
.grid-2-admin { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-2-admin .card { margin-bottom: 22px; }
.grid-2-admin .edit-form { gap: 10px; }
@media (max-width: 760px) {
    .grid-2-admin { grid-template-columns: 1fr; gap: 0; }
    .table-news tr { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
    .table-news td { width: auto; }
    .table-news td[data-l="E-mail"], .table-news td:last-child { width: 100%; }
}

/* ---------- Newsletter : onglets de la section ---------- */
.tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tabs a {
    padding: 10px 16px;
    margin-bottom: -1px;
    font-weight: 600;
    font-size: .92rem;
    color: var(--slate);
    text-decoration: none;
    border-bottom: 3px solid transparent;
}
.tabs a:hover { color: var(--pink-600); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--pink); }
.tabs a.tab-new { margin-left: auto; color: var(--pink-600); border-bottom: 0; }
.tabs a.tab-new:hover { text-decoration: underline; }
.tab-n {
    display: inline-block;
    min-width: 20px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 100px;
    background: var(--pink-50);
    color: var(--pink-700);
    font-size: .72rem;
    line-height: 20px;
    text-align: center;
}
.kpi .n.kpi-date { font-size: 1.35rem; line-height: 1.5; }
.badge.err { background: #fde8e6; color: #b3261e; }
@media (max-width: 760px) {
    .table-nl tr { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
    .table-nl td { width: auto; }
    .table-nl td[data-l="Objet"], .table-nl td[data-l="E-mail"], .table-nl td:last-child { width: 100%; }
    .table-nl .actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* ---------- Newsletter : éditeur ---------- */
.nl-page { padding-bottom: 110px; }
.wrap-wide { max-width: 1440px; }
.nl-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.nl-right { position: sticky; top: 16px; }

.nl-meta input, .nl-block input[type="text"], .nl-block select, .nl-block textarea, .nl-dialog input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    font: inherit;
    font-size: .95rem;
    background: var(--white);
    color: var(--ink);
}
.nl-meta input:focus, .nl-block input:focus, .nl-block select:focus, .nl-block textarea:focus, .nl-dialog input:focus {
    border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px rgba(224, 69, 123, .15);
}
.nl-meta input + .lbl { margin-top: 14px; }
#nl-sujet { font-size: 1.05rem; font-weight: 600; }

.nl-block { padding: 16px 18px 18px; border-left: 4px solid var(--pink-100); transition: border-color .2s, box-shadow .2s; }
.nl-block:focus-within { border-left-color: var(--pink); box-shadow: 0 14px 30px -26px rgba(224, 69, 123, .9); }
.nl-block.flash-move { animation: nlflash .8s ease; }
@keyframes nlflash { from { background: var(--pink-50); } to { background: var(--white); } }
.nl-block-separateur, .nl-block-soirees { border-left-color: #e8ddd4; }
.nl-bhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.nl-btype { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--taupe-600); }
.nl-bactions { display: flex; gap: 4px; }
.nl-bactions .mv-del:hover:not(:disabled) { border-color: #b3261e; color: #b3261e; }
.nl-field { display: block; flex: 1 1 200px; min-width: 0; }
.nl-field + .nl-field, .nl-rich + .nl-field, .nl-field + .nl-rich { margin-top: 12px; }
.nl-row { display: flex; gap: 12px; flex-wrap: wrap; }
.nl-row .nl-field + .nl-field { margin-top: 0; }
.nl-row + .nl-row, .nl-drop + .nl-row { margin-top: 12px; }
.nl-row .nl-field:has(select) { flex: 0 1 190px; }

.nl-rich { border: 1px solid rgba(46, 38, 33, .18); border-radius: 10px; overflow: hidden; background: var(--white); }
.nl-rich:focus-within { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(224, 69, 123, .15); }
.nl-rich textarea { border: 0 !important; box-shadow: none !important; border-radius: 0; resize: vertical; line-height: 1.55; min-height: 90px; }
.nl-toolbar { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 6px 8px; background: var(--cream); border-bottom: 1px solid var(--line); }
.nl-tool {
    min-width: 32px; height: 30px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    font: inherit;
    font-size: .85rem;
    color: var(--ink);
    cursor: pointer;
}
.nl-tool:hover { background: var(--white); border-color: var(--line); color: var(--pink-600); }
.nl-tool-hint { margin-left: auto; font-size: .72rem; color: var(--slate); }

.nl-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    min-height: 120px;
    padding: 18px;
    border: 2px dashed var(--pink-100);
    border-radius: 12px;
    background: #fffafc;
    text-align: center;
    transition: border-color .2s, background .2s;
}
.nl-drop.over { border-color: var(--pink); background: var(--pink-50); }
.nl-drop.has { flex-direction: row; justify-content: flex-start; border-style: solid; border-color: var(--line); background: var(--white); min-height: 0; }
.nl-drop img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; }
.nl-drop-msg { font-size: .8rem; color: var(--slate); }
.nl-drop-msg.err { color: #b3261e; font-weight: 600; }
.nl-drop-msg:empty { display: none; }

.nl-empty { text-align: center; color: var(--slate); border-style: dashed; }
.nl-add .lbl { margin-bottom: 10px; }
.nl-add-btns { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.nl-add-btns button {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(46, 38, 33, .15);
    border-radius: 10px;
    background: var(--white);
    font: inherit; font-size: .85rem; font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}
.nl-add-btns button span {
    display: grid; place-items: center;
    width: 26px; height: 26px; flex: none;
    border-radius: 7px;
    background: var(--pink-50);
    color: var(--pink-600);
    font-size: .85rem;
}
.nl-add-btns button:hover { border-color: var(--pink); color: var(--pink-600); }

/* Aperçu */
.nl-preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.seg { display: inline-flex; background: var(--white); border: 1px solid var(--line); border-radius: 100px; padding: 3px; }
.seg button { border: 0; background: transparent; font: inherit; font-size: .8rem; font-weight: 600; padding: 5px 14px; border-radius: 100px; color: var(--slate); cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.nl-inbox {
    display: block;
    padding: 10px 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    font-size: .82rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nl-inbox-from { font-weight: 700; margin-right: 8px; }
.nl-inbox-subj { font-weight: 600; }
.nl-inbox-pre { color: var(--slate); }
.nl-frame-wrap { background: #e9e2dc; border: 1px solid var(--line); border-radius: 0 0 14px 14px; overflow: hidden; }
.nl-frame-wrap iframe { display: block; width: 100%; height: calc(100vh - 330px); min-height: 420px; border: 0; background: #f7f3ef; margin: 0 auto; transition: width .25s; }
.nl-frame-wrap.mobile { padding: 14px 0; }
.nl-frame-wrap.mobile iframe { height: calc(100vh - 358px); width: 375px; max-width: 100%; border-radius: 18px; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .5); }

/* Barre d'enregistrement (en bas de l'écran) */
.nl-savebar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 28px;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px -24px rgba(0, 0, 0, .5);
}
.nl-savebar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-savebar .btn { font-size: .88rem; padding: 10px 20px; }
.nl-savebar .btn:disabled { opacity: .45; cursor: not-allowed; }
.nl-status { font-size: .85rem; color: var(--slate); }
.nl-status.ok { color: #1e7e4a; }
.nl-status.warn { color: var(--taupe-600); }
.nl-status.err { color: #b3261e; font-weight: 600; }

/* Fenêtre e-mail de test */
.nl-dialog { border: 0; border-radius: 18px; padding: 26px; width: min(460px, calc(100% - 32px)); margin: auto; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .4); }
.nl-dialog::backdrop { background: rgba(46, 38, 33, .45); }
.nl-dialog h3 { font-size: 1.1rem; margin-bottom: 6px; }
.nl-dialog .muted { margin-bottom: 14px; }
.nl-dialog-msg { font-size: .85rem; min-height: 1.4em; margin: 10px 0 0; }
.nl-dialog-msg.ok { color: #1e7e4a; }
.nl-dialog-msg.err { color: #b3261e; }
.nl-dialog-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.nl-dialog-btns .btn { font-size: .88rem; padding: 9px 18px; }

/* Envoi / archive */
.nl-recap { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin-bottom: 16px; font-size: .95rem; }
.nl-recap dt { color: var(--slate); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.nl-recap dd { margin: 0; overflow-wrap: anywhere; }
.nl-confirm-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.nl-confirm-btns .btn { font-size: .9rem; padding: 10px 22px; }
.nl-progress { height: 14px; background: var(--pink-50); border-radius: 100px; overflow: hidden; margin: 6px 0 12px; }
.nl-progress span { display: block; height: 100%; background: var(--pink); border-radius: 100px; transition: width .4s; }
.nl-progress-info { font-weight: 600; margin-bottom: 4px; }
.nl-archive { padding: 22px 0 0; overflow: hidden; }
.nl-archive h2 { padding: 0 24px; }
.nl-archive-frame { display: block; width: 100%; min-height: 400px; border: 0; background: #f7f3ef; }
details summary { cursor: pointer; }
details[open] summary { margin-bottom: 12px; }

@media (max-width: 1000px) {
    .nl-editor { grid-template-columns: 1fr; }
    .nl-right { position: static; }
    .nl-frame-wrap iframe, .nl-frame-wrap.mobile iframe { height: 75vh; }
}
@media (max-width: 760px) {
    .nl-savebar { padding: 10px 14px; }
    .nl-savebar .btn { padding: 9px 14px; font-size: .82rem; }
    .nl-status { width: 100%; }
    .nl-tool-hint { display: none; }
    .nl-recap { grid-template-columns: 1fr; gap: 2px; }
    .nl-recap dd { margin-bottom: 8px; }
    .tabs a.tab-new { margin-left: 0; }
}

/* ---------- Règlement ---------- */
.edit-form input[type="date"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    font: inherit;
    background: var(--white);
    color: var(--ink);
}
.edit-form input[type="date"]:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px rgba(224, 69, 123, .15); }
.reg-doc {
    display: inline-flex; align-items: center; gap: 14px;
    padding: 12px 18px 12px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    transition: border-color .2s;
}
.reg-doc:hover { border-color: var(--pink); }
.reg-doc strong { display: block; }
.reg-ico {
    display: grid; place-items: center;
    width: 46px; height: 54px; flex: none;
    border-radius: 8px;
    background: var(--pink-50);
    color: var(--pink-600);
    font-size: .72rem; font-weight: 800; letter-spacing: .05em;
}
.reg-file { margin: 0 0 8px; }
@media (max-width: 760px) {
    .table-reg tr { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
    .table-reg td { width: auto; }
    .table-reg td[data-l="Texte affiché"], .table-reg td:last-child { width: 100%; }
    .table-reg .actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* ---------- Planning des bénévoles ---------- */
.plan-current { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.plan-mode { flex: 1 1 260px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.plan-mode p { margin: 0; }
.plan-pwd { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.reg-ico.xls { background: #e7f5ec; color: #1e7e4a; }
.table-reg td[data-l="Fichier"] { white-space: nowrap; }

/* ---------- Page d'accueil (bandeau) ---------- */
.acc-editor { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.acc-form { gap: 14px; }
.acc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.acc-hint { margin-top: -6px; }
.acc-count { font-variant-numeric: tabular-nums; }
.acc-count.acc-full { color: var(--pink-600); font-weight: 600; }
.edit-form input.acc-invalid { border-color: #b3261e; box-shadow: 0 0 0 4px rgba(179, 38, 30, .12); }
.acc-preview { position: sticky; top: 16px; }
.acc-frame-wrap { position: relative; background: #e9e2dc; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
/* Le cadre garde la taille réelle d'un écran (1280 × 720 ou 390 × 760) et est réduit pour tenir dans la colonne */
.acc-frame-wrap iframe { position: absolute; top: 0; left: 0; display: block; width: 1280px; height: 720px; border: 0; background: #3f342c; transform-origin: 0 0; }
.acc-frame-wrap.mobile iframe { width: 390px; height: 760px; border-radius: 22px; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .5); }
.acc-preview .acc-hint { margin-top: 8px; }

.acc-current { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.acc-current .who { font-size: 1rem; margin-bottom: 4px; }
.acc-current .btn { margin-top: 10px; }
.acc-hero-mini {
    flex: 1 1 340px; max-width: 520px;
    padding: 22px 24px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(100deg, rgba(74, 60, 49, .92), rgba(156, 128, 105, .85) 60%, rgba(224, 69, 123, .55)), url("../img/accueil-1.jpg") center / cover;
}
.acc-hero-mini .k { font-size: 1.35rem; font-weight: 700; margin-bottom: 10px; }
.acc-hero-mini .b { display: inline-block; padding: 7px 16px; border-radius: 999px; background: var(--pink-600); font-weight: 600; font-size: .85rem; }
.acc-hero-mini .t { margin-top: 12px; font-style: italic; font-size: .9rem; line-height: 1.5; opacity: .95; }
.acc-resume { min-width: 260px; font-size: .88rem; }
.acc-resume .sub { display: block; margin-top: 4px; }
.acc-btn-mini { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--pink-50); color: var(--pink-700); font-size: .75rem; font-weight: 600; white-space: nowrap; }

@media (max-width: 1000px) {
    .acc-editor { grid-template-columns: 1fr; }
    .acc-preview { position: static; }
}
@media (max-width: 760px) {
    .acc-row { grid-template-columns: 1fr; }
    .table-acc tr { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
    .table-acc td { width: 100%; }
    .table-acc td[data-l="Statut"] { width: auto; }
    .table-acc .actions { justify-content: flex-start; flex-wrap: wrap; }
    .acc-resume { min-width: 0; }
}
.acc-mode { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-mode label { position: relative; cursor: pointer; }
.acc-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acc-mode span {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 100px;
    font-size: .88rem; font-weight: 600;
    color: var(--slate);
    background: var(--white);
    transition: background .2s, color .2s, border-color .2s;
}
.acc-mode label:hover span { border-color: var(--pink); color: var(--pink-600); }
.acc-mode input:checked + span { background: var(--pink-600); border-color: var(--pink-600); color: #fff; }
.acc-mode input:focus-visible + span { box-shadow: 0 0 0 4px rgba(224, 69, 123, .25); }
.acc-panel[hidden] { display: none; }

/* ---------- Newsletter : origine des adresses / import des locations ---------- */
.src-badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 10px; border-radius: 100px; white-space: nowrap; background: var(--cream); color: var(--slate); }
.src-badge.src-locations { background: #e8f0fb; color: #2a5ea8; }
.src-badge.src-admin { background: #f3ece5; color: var(--taupe-600); }
.src-badge.src-formulaire { background: var(--pink-50); color: var(--pink-700); }
.src-select { padding: 11px 12px; border: 1px solid rgba(46, 38, 33, .18); border-radius: 10px; font: inherit; font-size: .9rem; background: var(--white); color: var(--ink); }
.imp-last { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); line-height: 1.6; }

/* ---------- Accueil admin : personnaliser l'ordre / l'affichage des modules ---------- */
.intro-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.intro-row .btn { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; padding: 9px 18px; }
.btn-ico { width: 16px; height: 16px; }
.mod-hidden-note { text-align: center; margin-top: 22px; }
.mod-form { padding: 10px 14px 18px; }
.mod-list { list-style: none; margin: 0; padding: 0; }
.mod-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    border-radius: 12px;
    transition: background .15s, opacity .15s, box-shadow .15s;
}
.mod-item:last-child { border-bottom: 0; }
.mod-item.dragging { opacity: .55; background: var(--pink-50); box-shadow: 0 10px 24px -18px rgba(224, 69, 123, .9); }
.mod-item.is-hidden .mod-ico, .mod-item.is-hidden .mod-txt { opacity: .45; }
.mod-grip { cursor: grab; color: #c4b6aa; font-size: 1rem; letter-spacing: -2px; user-select: none; padding: 0 2px; }
.mod-item.dragging .mod-grip { cursor: grabbing; }
.mod-pos { min-width: 20px; font-weight: 700; color: var(--slate); font-variant-numeric: tabular-nums; text-align: right; }
.mod-ico { width: 40px; height: 40px; flex: none; margin: 0; }
.mod-ico svg { width: 22px; height: 22px; }
.mod-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mod-txt .small { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-switch { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: none; min-width: 100px; }
.mod-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mod-switch-ui { position: relative; width: 40px; height: 24px; border-radius: 100px; background: #d9cfc6; transition: background .2s; flex: none; }
.mod-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.mod-switch input:checked + .mod-switch-ui { background: var(--pink-600); }
.mod-switch input:checked + .mod-switch-ui::after { transform: translateX(16px); }
.mod-switch input:focus-visible + .mod-switch-ui { box-shadow: 0 0 0 4px rgba(224, 69, 123, .25); }
.mod-switch-lbl { font-size: .82rem; font-weight: 600; color: var(--slate); }
.mod-actions { margin-top: 10px; padding-left: 10px; }
.mod-reset { margin-left: auto; }
@media (max-width: 760px) {
    .mod-item { flex-wrap: wrap; gap: 10px; }
    .mod-txt { flex-basis: calc(100% - 120px); }
    .mod-txt .small { white-space: normal; }
    .mod-grip { display: none; }
    .mod-switch { margin-left: auto; }
    .mod-reset { margin-left: 0; }
}

/* Barre du haut : bouton « Personnaliser » (icône seule, même hauteur que « Retour au site ») */
.backsite.ghost.top-perso { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; line-height: 0; }
.top-perso svg { width: 14px; height: 14px; display: block; }

/* ---------- Chiffres de l'accueil : modification directe, comme sur le site ---------- */
.ch-form { margin-bottom: 20px; }
.ch-board {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 30px 30px 24px;
    box-shadow: 0 24px 50px -38px rgba(74, 60, 49, .45);
}
.ch-board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.ch-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pink-600); margin-bottom: 6px; }
.ch-board-head h2 { font-size: 1.45rem; margin: 0 0 4px; display: block; }
.ch-hint { color: var(--slate); font-size: .9rem; }
.ch-site { font-size: .85rem; font-weight: 600; color: var(--pink-600); text-decoration: none; white-space: nowrap; padding: 8px 14px; border-radius: 100px; background: var(--pink-50); }
.ch-site:hover { background: var(--pink-100); }

.ch-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ch-item {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    padding: 46px 14px 22px;
    border-radius: 18px;
    text-align: center;
    min-width: 0;
}
.ch-item.is-auto { background: var(--cream); }
.ch-item.is-edit {
    background: linear-gradient(180deg, #fff 0%, #fff7fa 100%);
    border: 1.5px solid var(--pink-100);
    transition: border-color .2s, box-shadow .2s;
}
.ch-item.is-edit:hover, .ch-item.is-edit:focus-within { border-color: var(--pink); box-shadow: 0 18px 36px -26px rgba(224, 69, 123, .8); }

.ch-badge {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 100px;
    background: #ece5df; color: var(--slate);
    white-space: nowrap;
}
.ch-badge svg { width: 11px; height: 11px; }
.ch-badge-edit { background: var(--pink-50); color: var(--pink-700); }

.ch-big { font-size: 2.9rem; font-weight: 800; line-height: 1; color: #b8a99c; font-variant-numeric: tabular-nums; min-height: 64px; display: flex; align-items: center; }
.ch-bar { display: block; width: 34px; height: 3px; margin: 14px auto 12px; background: var(--taupe); border-radius: 3px; }
.ch-item.is-auto .ch-bar { opacity: .5; }
.ch-cap { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--taupe-600); min-height: 2.6em; display: flex; align-items: center; }

/* Chiffre modifiable */
.ch-numrow { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 64px; flex-wrap: nowrap; }
.ch-numwrap { display: inline-flex; align-items: baseline; cursor: text; border-radius: 12px; padding: 0 2px; transition: background .2s; min-width: 0; }
.ch-numwrap:hover { background: rgba(224, 69, 123, .06); }
.ch-input-num {
    width: 3.2ch; min-width: 1.4ch; max-width: 5.4ch;
    border: 0; background: transparent; padding: 0;
    font: inherit; font-size: 2.9rem; font-weight: 800; line-height: 1.1;
    color: var(--pink); text-align: center;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    border-bottom: 2px dashed transparent;
    transition: border-color .2s;
}
.ch-input-num::-webkit-outer-spin-button, .ch-input-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ch-input-num:hover { border-bottom-color: var(--pink-100); }
.ch-input-num:focus { outline: none; border-bottom-color: var(--pink); }
.ch-plus-sign { font-size: 2.9rem; font-weight: 800; line-height: 1.1; color: var(--pink); margin-left: -.04em; }
.ch-round {
    width: 32px; height: 32px; flex: none;
    border-radius: 50%;
    border: 1px solid rgba(46, 38, 33, .14);
    background: var(--white);
    color: var(--slate);
    font: inherit; font-size: 1.15rem; font-weight: 600; line-height: 1;
    cursor: pointer;
    opacity: .55;
    transition: opacity .2s, background .2s, color .2s, border-color .2s, transform .1s;
}
.ch-item.is-edit:hover .ch-round, .ch-item.is-edit:focus-within .ch-round { opacity: 1; }
.ch-round:hover { background: var(--pink-600); border-color: var(--pink-600); color: #fff; }
.ch-round:active { transform: scale(.92); }

/* Texte modifiable sous le chiffre */
.ch-capwrap { display: block; width: 100%; }
.ch-input-cap {
    width: 100%;
    border: 0; border-bottom: 1px dashed transparent;
    background: transparent;
    font: inherit; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--taupe-600); text-align: center;
    padding: 4px 2px; min-height: 2.6em;
    border-radius: 0;
    transition: border-color .2s, background .2s;
}
.ch-input-cap:hover { border-bottom-color: #d7c9be; }
.ch-input-cap:focus { outline: none; border-bottom-color: var(--pink); background: rgba(224, 69, 123, .04); }

/* Pastille « + » */
.ch-chip { margin-top: 14px; cursor: pointer; user-select: none; }
.ch-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ch-chip span {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid rgba(46, 38, 33, .16);
    font-size: .74rem; font-weight: 600;
    color: var(--slate);
    background: var(--white);
    transition: background .2s, color .2s, border-color .2s;
}
.ch-chip:hover span { border-color: var(--pink); color: var(--pink-600); }
.ch-chip input:checked + span { background: var(--pink-600); border-color: var(--pink-600); color: #fff; }
.ch-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(224, 69, 123, .25); }
.ch-date { margin-top: 10px; font-size: .7rem; color: #a3958a; }

.ch-note { margin-top: 20px; text-align: center; font-size: .82rem; color: var(--slate); }

/* Barre d'enregistrement */
.ch-savebar {
    position: sticky; bottom: 16px; z-index: 5;
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 18px;
    padding: 12px 14px 12px 22px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: 100px;
    box-shadow: 0 14px 30px -20px rgba(46, 38, 33, .45);
}
.ch-status { font-size: .86rem; color: var(--slate); display: inline-flex; align-items: center; gap: 8px; }
.ch-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #cfc3b9; }
.ch-status.is-dirty { color: var(--pink-700); font-weight: 600; }
.ch-status.is-dirty::before { background: var(--pink); box-shadow: 0 0 0 4px rgba(224, 69, 123, .18); }
.ch-savebar-btns { display: flex; gap: 8px; }
.ch-savebar .btn { font-size: .88rem; padding: 10px 22px; }

@media (max-width: 980px) {
    .ch-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .ch-board { padding: 22px 16px 18px; border-radius: 18px; }
    .ch-strip { gap: 10px; }
    .ch-item { padding: 42px 8px 18px; }
    .ch-big, .ch-input-num, .ch-plus-sign { font-size: 2.1rem; }
    .ch-round { opacity: 1; width: 28px; height: 28px; }
    .ch-cap, .ch-input-cap { font-size: .7rem; letter-spacing: .03em; }
    .ch-savebar { border-radius: 18px; padding: 12px; }
    .ch-savebar-btns { width: 100%; }
    .ch-savebar-btns .btn { flex: 1; text-align: center; }
}

/* Chiffre avec « + » : un peu plus petit pour garder les boutons dans la carte */
@media (min-width: 981px) and (max-width: 1200px) {
    .ch-input-num, .ch-plus-sign { font-size: 2.5rem; }
}

/* ==========================================================
   Animations ponctuelles (animations.php / animations_inscrits.php)
   ========================================================== */
.an-hours { display: flex; align-items: center; gap: 10px; }
.edit-form input[type="time"] {
    font: inherit; font-size: .92rem;
    padding: 10px 12px;
    border: 1px solid rgba(46, 38, 33, .18);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    min-width: 0;
    flex: 1;
}
.edit-form input[type="time"]:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px rgba(224, 69, 123, .15); }
.an-inline { display: inline-flex; margin: 0 0 0 12px; }

.an-insc {
    margin: 22px 0 14px;
    padding: 16px 18px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: var(--cream);
    transition: border-color .2s, background .2s;
}
.an-insc.is-on { border-color: #f3b9cd; background: var(--pink-50); }
.an-switch { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.an-switch > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.an-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.an-switch-ui {
    flex: none;
    position: relative;
    width: 44px; height: 26px;
    border-radius: 100px;
    background: #d6cbc2;
    transition: background .2s;
}
.an-switch-ui::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .2s;
}
.an-switch input:checked + .an-switch-ui { background: var(--pink-600); }
.an-switch input:checked + .an-switch-ui::after { transform: translateX(18px); }
.an-switch input:focus-visible + .an-switch-ui { box-shadow: 0 0 0 4px rgba(224, 69, 123, .25); }
.an-insc-opts { margin: 14px 0 0 58px; display: flex; flex-direction: column; gap: 10px; }
.an-insc-opts[hidden] { display: none; }
.an-places { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.an-places .check { margin: 0; }
.edit-form .an-places input[type="number"] { width: 110px; padding: 7px 10px; }
.edit-form .an-places input[type="number"]:disabled { opacity: .45; }

.an-count { color: var(--ink); text-decoration: none; font-weight: 600; }
.an-count:hover { color: var(--pink-600); }
.an-count .sub, .table-anim .date .sub { display: block; font-weight: 400; }
.table-anim .date strong { white-space: nowrap; }

details.an-past > summary { list-style: none; }
details.an-past > summary::-webkit-details-marker { display: none; }
details.an-past > summary h2 { margin: 0; }
details.an-past > summary h2::after { content: "▾"; color: var(--slate); font-size: .9rem; margin-left: auto; transition: transform .2s; }
details.an-past[open] > summary h2::after { transform: rotate(180deg); }

@media (max-width: 560px) {
    .an-insc-opts { margin-left: 0; }
}
@media (max-width: 760px) {
    .table-anim tr { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
    .table-anim td { width: auto; }
    .table-anim td[data-l="Date"], .table-anim td[data-l="Animation"], .table-anim td:last-child { width: 100%; }
    .table-anim td[data-l="Date"] strong, .table-anim td[data-l="Date"] .sub { display: inline; margin-right: 8px; }
    .table-anim td[data-l="PDF"]:has(.muted) { display: none; }
    .table-anim .an-count .sub { display: inline; margin-left: 4px; }
    .table-anim .actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* ==========================================================
   Réponses automatiques du formulaire de contact
   (contact_reponses.php / contact_reponse_edit.php)
   ========================================================== */
.cr-current { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.cr-eyebrow { margin: 0 0 6px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #2e9d57; display: flex; align-items: center; gap: 8px; }
.cr-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(46, 157, 87, .15); }
.cr-eyebrow-off { color: var(--slate); }
.cr-eyebrow-off::before { box-shadow: none; opacity: .5; }
.card h2.cr-title { display: block; font-size: 1.35rem; margin: 0 0 8px; }
.cr-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 18px; font-size: .9rem; }
.cr-facts dt { color: var(--slate); font-weight: 600; }
.cr-facts dd { margin: 0; }
.cr-actions { justify-content: flex-start; }
.cr-mini {
    position: relative;
    height: 330px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--cream);
}
.cr-mini iframe {
    position: absolute; top: 0; left: 0;
    width: 640px; height: 1000px;
    border: 0;
    transform: scale(.47);
    transform-origin: 0 0;
    pointer-events: none;
}
.cr-mini::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60px; background: linear-gradient(transparent, var(--cream)); }
.table-cr tr.cr-on td { background: #f1faf4; }
.cr-meta-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cr-meta-head .lbl { margin: 0; }
.cr-meta-head + input { margin-top: 6px; }
.cr-champs { margin: 14px 0 0; line-height: 1.7; }
.cr-champs code { background: var(--pink-50); color: var(--pink-700); padding: 1px 6px; border-radius: 6px; font-size: .8rem; }
.nl-tool.nl-tool-champ { color: var(--pink-700); background: var(--pink-50); }

@media (max-width: 860px) {
    .cr-current { grid-template-columns: 1fr; }
    .cr-mini { display: none; }
}
@media (max-width: 760px) {
    .table-cr tr { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
    .table-cr td { width: auto; }
    .table-cr td[data-l="Nom"], .table-cr td[data-l="Objet"], .table-cr td:last-child { width: 100%; }
    .table-cr .actions { justify-content: flex-start; flex-wrap: wrap; }
}
