/* Charte 1B2F : noir/blanc, Chivo + Gentium Plus, accents atelier (sauge, glycine, brique) */
:root {
    --ink: #313131;
    --ink-soft: #5d5d5d;
    --paper: #f6f3ee;
    --card: #ffffff;
    --line: #e4ded4;
    --sage: #7ea382;
    --sage-dark: #5e8362;
    --wisteria: #9b8fc4;
    --brick: #b4583f;
    --sans: 'Chivo', system-ui, -apple-system, sans-serif;
    --serif: 'Gentium Plus', Georgia, serif;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
body { margin: 0; font-family: var(--sans); font-weight: 300; color: var(--ink); background: var(--paper); line-height: 1.55; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
a { color: var(--ink); }
strong { font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 48px; }
.wrap--narrow { max-width: 420px; padding-top: 64px; }

/* Hero */
.hero {
    position: relative; min-height: 62vh; display: grid; place-items: center; text-align: center;
    color: #fff; background: #3a3a3a center / cover no-repeat; padding: 56px 16px;
}
.hero--short { min-height: 40vh; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .6)); }
.hero__inner { position: relative; max-width: 760px; width: 100%; min-width: 0; overflow-wrap: anywhere; }
.hero__brand img { width: 88px; height: 88px; border-radius: 50%; border: 3px solid #fff; box-shadow: var(--shadow); background: #fff; }
.hero__kicker { font-family: var(--sans); text-transform: uppercase; letter-spacing: .3em; font-size: .75rem; margin: 20px 0 8px; opacity: .9; }
.hero__title { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 400; margin: 0 0 12px; text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }
.hero__dates { font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin: 0; }
.hero__dates span { display: inline-block; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 40px); margin-top: 24px; }
.intro { margin-top: -48px; position: relative; }
.card__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.prose { font-family: var(--serif); font-size: 1.15rem; }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.facts li { background: var(--paper); border-radius: 10px; padding: 12px 14px; font-size: .95rem; }
.notice { border-left: 5px solid var(--wisteria); }
.legal { font-size: .8rem; color: var(--ink-soft); margin-top: 16px; }

/* Forms */
.form-row, .form-group, form > div { margin-bottom: 16px; }
label, .form-label { display: block; font-weight: 400; font-size: .9rem; margin-bottom: 6px; }
label.required::after { content: ' *'; color: var(--brick); }
.required-note { font-size: .8rem; color: var(--ink-soft); margin: -6px 0 20px; }
.form-section { margin: 24px 0 12px; }
input::placeholder, textarea::placeholder { color: #a9a39a; opacity: 1; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
input[type=datetime-local], input[type=file], textarea, select {
    width: 100%; font: inherit; font-weight: 300; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--sage); outline-offset: 1px; border-color: var(--sage); }
textarea { min-height: 140px; resize: vertical; }
.help-text, .form-help { font-size: .8rem; color: var(--ink-soft); display: block; margin-top: 4px; }
.grid-2 { display: grid; gap: 0 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2--always { grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-4 { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.checks { margin: 8px 0 20px; }
.checks > div { margin-bottom: 10px; }
.checks label, .form-check label { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; cursor: pointer; }
.checks input, .form-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--sage-dark); flex: none; }
/* Cases à cocher en boutons, comme les horaires */
.checks--toggles { display: grid; gap: 10px; }
.checks--toggles > div { margin: 0; }
.checks--toggles label {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border: 2px solid var(--line); border-radius: 10px; background: #fff; font-size: 1rem; transition: border-color .15s, background .15s;
}
.checks--toggles label:hover { border-color: var(--sage); }
.checks--toggles input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checks--toggles label::before {
    content: ''; flex: none; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 6px; background: #fff;
    transition: background .15s, border-color .15s;
}
.checks--toggles label:has(input:checked) { border-color: var(--sage-dark); background: #eef5ee; }
.checks--toggles label:has(input:checked)::before {
    background: var(--sage-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 16px no-repeat;
    border-color: var(--sage-dark);
}
.checks--toggles label:has(input:focus-visible) { outline: 2px solid var(--sage); outline-offset: 2px; }
ul.form-errors, .invalid-feedback { list-style: none; padding: 0; margin: 0 0 8px; }
.form-error-message, .invalid-feedback li { color: var(--brick); font-size: .85rem; }
.alert { padding: 12px 16px; border-radius: 8px; margin: 16px 0; }
.alert--error { background: #fbe9e4; color: var(--brick); }
.alert--success { background: #e7f1e7; color: var(--sage-dark); }

/* Slots */
.slots { border: 0; padding: 0; margin: 0 0 24px; }
.slots legend { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 12px; }
.slots legend label { font: inherit; margin: 0; }
.slots__day { margin-bottom: 20px; }
.slots__grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.slot {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 2px solid var(--line); border-radius: 10px; padding: 12px 8px; background: #fff; cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s; text-align: center; margin: 0;
}
.slot:hover { border-color: var(--sage); transform: translateY(-1px); }
.slot input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.slot:has(input:focus-visible) { outline: 2px solid var(--sage); outline-offset: 2px; }
.slot--checked, .slot:has(input:checked) { border-color: var(--sage-dark); background: #eef5ee; }
.slot--full { opacity: .5; cursor: not-allowed; background: var(--paper); text-decoration: line-through; }
.slot--full:hover { border-color: var(--line); transform: none; }
.slot__time { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.slot__meta { font-size: .75rem; color: var(--ink-soft); }
.slots__grid--admin .slot { cursor: default; text-decoration: none; }
.slots__grid--admin .slot--full { border-color: var(--wisteria); background: #efecf7; opacity: 1; }

.captcha { margin: 8px 0 20px; }

/* Boutons de choix (nombre de personnes) */
.pills { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pill {
    position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px;
    border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
    font-family: var(--serif); font-size: 1.2rem; font-weight: 700; margin: 0; transition: border-color .15s, background .15s;
}
.pill:hover { border-color: var(--sage); }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pill:has(input:checked) { border-color: var(--sage-dark); background: #eef5ee; }
.pill:has(input:focus-visible) { outline: 2px solid var(--sage); outline-offset: 2px; }

/* Buttons */
.btn {
    display: inline-block; font-family: var(--sans); font-weight: 400; border-radius: 999px; padding: 12px 26px; text-decoration: none;
    border: 2px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; font-size: 1rem; transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn--primary { background: var(--ink); color: #fff; width: 100%; padding: 14px; font-size: 1.05rem; }
.btn--primary:hover { background: var(--sage-dark); border-color: var(--sage-dark); }
.btn--small { padding: 6px 14px; font-size: .85rem; }
.btn--danger { border-color: var(--brick); color: var(--brick); }
.btn--danger:hover { background: var(--brick); color: #fff; }

/* Summary */
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0 0 20px; }
.summary dt { font-weight: 400; color: var(--ink-soft); }
.summary dd { margin: 0; }

/* Ajout au calendrier */
.calendar { background: var(--paper); border-radius: 10px; padding: 16px; margin: 0 0 20px; }
.calendar__label { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 10px; }
.calendar__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.calendar__btns .btn { display: inline-flex; align-items: center; gap: 8px; width: auto; padding: 11px 20px; font-size: .95rem; }
.link { color: var(--ink-soft); font-size: .9rem; }

/* Footer */
.footer { text-align: center; font-size: .85rem; color: var(--ink-soft); padding: 24px 16px 40px; }
.footer a { color: inherit; }

/* Admin */
.page-admin { background: #efece6; }
.adminbar { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; padding: 12px 16px; background: var(--ink); color: #fff; }
.adminbar a { color: #fff; text-decoration: none; padding: 6px 0; opacity: .85; }
.adminbar a:hover, .adminbar a.is-active { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.adminbar__brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.1rem; margin-right: auto; }
.adminbar__brand img { border-radius: 50%; background: #fff; }
.adminbar__logout { opacity: .6; }
.login-logo { display: block; margin: 0 auto 12px; border-radius: 50%; }
.thumb { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table th { font-weight: 400; color: var(--ink-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table form { margin: 0; }
h1 small { font-size: .6em; color: var(--ink-soft); }

@media (max-width: 600px) {
    .hero { min-height: 50vh; }
    .hero__dates { font-size: 1rem; }
    .slots__grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .summary { grid-template-columns: 1fr; gap: 2px 0; }
    .summary dd { margin-bottom: 10px; }
}

/* Formulaire d'inscription QR */
.pills--2 { grid-template-columns: repeat(2, 1fr); }
