/* ==========================================================
   Thème Noël commun — Mobile First
   Charte : rouge, vert, or, blanc
   ========================================================== */

@import url("santa-logo.css?v=20261109");

:root {
    /* Palette */
    --rouge: #b53245;
    --rouge-dark: #8f2436;
    --vert: #176b52;
    --vert-dark: #104b3b;
    --or: #f2c55c;
    --or-dark: #d29a28;
    --blanc: #fffefa;
    --ciel: #dff2f3;

    /* Rôles */
    --ink: #203331;
    --muted: #647572;
    --line: #d8e4df;
    --surface: var(--blanc);
    --danger: #b53245;
    --danger-bg: #fef2f2;
    --danger-line: #fecaca;

    /* Divers */
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 12px 32px #104b3b12;
    --gap: 16px;
}

/* ---------- Reset ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 16px;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    background-color: #edf7f2;
    background-image: radial-gradient(#c9e2d8 0.8px, transparent 0.8px);
    background-size: 18px 18px;
}

img {
    max-width: 100%;
}

h1,
h2,
h3 {
    color: var(--vert-dark);
    overflow-wrap: break-word;
}

/* ---------- Conteneurs ---------- */

.shell {
    width: min(920px, 100%);
    margin: 0 auto;
}

.card {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 22px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card--wide {
    max-width: 900px;
}

/* ---------- Boutons ---------- */

.btn {
    display: inline-block;
    min-height: 48px;
    padding: 14px 22px;
    margin: 0;
    border: 0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    background: var(--vert);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.btn:hover:not(:disabled) {
    background: var(--vert-dark);
}

.btn:active:not(:disabled) {
    transform: scale(.97);
}

.btn:disabled {
    opacity: .58;
    cursor: not-allowed;
}

.btn--rouge { background: var(--rouge); }
.btn--rouge:hover:not(:disabled) { background: var(--rouge-dark); }

.btn--or { background: var(--or-dark); }
.btn--or:hover:not(:disabled) { background: #b8862a; }

.btn--gris { background: #607976; }
.btn--gris:hover:not(:disabled) { background: #4c625f; }

.btn--large { width: 100%; }
.btn--small { min-height: 40px; padding: 9px 15px; font-size: .9rem; }

/* Rangée de boutons adaptative */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* ---------- Formulaires ---------- */

label {
    display: block;
    margin: 0 0 7px;
    font-weight: 700;
    font-size: .95rem;
}

input,
select {
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    border: 2px solid #9eb8ad;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--vert);
    box-shadow: 0 0 0 3px #176b5233;
}

select {
    appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23647572' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

/* ---------- Alertes ---------- */

.alert {
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--danger-line);
    border-radius: var(--radius-sm);
    color: var(--danger);
    background: var(--danger-bg);
    font-size: .9rem;
    text-align: center;
}

.notice {
    min-height: 20px;
    color: var(--muted);
    font-size: .9rem;
}

.loading,
.empty {
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

.error {
    padding: 18px;
    color: var(--danger);
    text-align: center;
}

/* ---------- Modales ---------- */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    width: 100%;
    height: 100%;
    padding: 16px;
    overflow-y: auto;
    background: rgba(0, 0, 0, .6);
    -webkit-overflow-scrolling: touch;
}

.modal.is-open {
    display: block;
}

.modal__content {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: var(--radius);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.modal__close {
    float: right;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

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

/* ---------- Tableaux ---------- */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.table th,
.table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table thead th {
    background: #f5f8f7;
    font-weight: 700;
}

.table tbody tr:hover {
    background: #fafbfa;
}

/* ---------- Utilitaires ---------- */

.hidden {
    display: none !important;
}

.muted {
    color: var(--muted);
}

.text-center {
    text-align: center;
}

/* ---------- Tablette ---------- */

@media (min-width: 600px) {
    body {
        padding: 24px;
    }

    .card {
        padding: 30px;
    }
}

/* ---------- Bureau ---------- */

@media (min-width: 900px) {
    .btn-row {
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
    }
}