:root {
    --bg: #faf8f6;
    --surface: #ffffff;
    --text: #222222;
    --muted: #6b6b6b;
    --border: #e6e1dc;
    --primary: #A32D2D;
    --primary-dark: #832020;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

a { color: var(--primary); }

.btn {
    display: inline-block;
    padding: .65rem 1.1rem;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--primary-dark); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

/* Organizer layout */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1.5rem;
    background: var(--surface);
    border-bottom: 3px solid var(--primary);
}
.topbar .brand { font-weight: 700; color: var(--primary); text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

/* Guest layout: designed for phones first */
.guest-wrap { max-width: 480px; margin: 0 auto; padding: 1rem; }
.guest-wrap header { text-align: center; padding: 1rem 0; color: var(--primary); font-weight: 700; }
.guest-wrap .btn { display: block; width: 100%; text-align: center; }

/* Groups and guests */
.notice { background: #eef6ee; border: 1px solid #b9d8b9; border-radius: 8px; padding: .6rem 1rem; }
.notice.error { background: #fbeeee; border-color: #e3b5b5; }
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin: 1rem 0; }
.inline-form { display: inline-flex; gap: .5rem; align-items: center; }
.btn.small { padding: .35rem .7rem; font-size: .9rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.form label { display: block; margin: .6rem 0; }
.form label.check { display: flex; gap: .5rem; align-items: center; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=date], .form input[type=number], .form select, .form textarea { display: block; width: 100%; max-width: 32rem; padding: .45rem; }
.card { margin: 1rem 0; }
input.wide { width: 100%; max-width: 40rem; padding: .45rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Guest answer flow */
.guest-wrap { overflow-wrap: anywhere; }
.guest-wrap h1 { font-size: 1.4rem; margin: .5rem 0; }
.guest-wrap h2 { font-size: 1.1rem; }
.muted { color: var(--muted); }
.event-name { margin: 0; text-align: center; }
.progress-label { margin: .5rem 0 .25rem; font-size: .9rem; color: var(--muted); }
.progress { display: block; width: 100%; height: .6rem; margin-bottom: 1rem; accent-color: var(--primary); }
.choice { border: 1px solid var(--border); border-radius: 10px; margin: 1rem 0; padding: .5rem .85rem .85rem; min-width: 0; }
.choice legend { font-weight: 600; padding: 0 .35rem; }
.option { display: flex; align-items: center; gap: .75rem; min-height: 48px; margin: .35rem 0; padding: .4rem .75rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.option input { width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--primary); }
.option:has(input:checked) { border-color: var(--primary); background: #fbf1f1; }
.guest-wrap .form input[type=text], .guest-wrap .form select, .guest-wrap .form textarea { max-width: 100%; min-height: 44px; font-size: 1rem; }
.guest-wrap .form textarea { display: block; width: 100%; }
.guest-wrap .btn { min-height: 48px; margin-top: 1rem; }
.answer { padding-left: 1.1rem; }
.back { text-align: center; }

/* Event contents */
.hero { display: block; width: 100%; height: auto; max-height: 16rem; object-fit: cover; border-radius: 10px; margin-bottom: 1rem; }
.hero-preview { max-width: 100%; max-height: 12rem; border-radius: 8px; }
.prose { white-space: pre-line; overflow-wrap: anywhere; margin: .4rem 0; }
.block { margin: 1.25rem 0; }
.guest-wrap h3 { font-size: 1rem; margin: .9rem 0 .2rem; }
.item { border-top: 1px solid var(--border); padding-top: .25rem; }
.item h3 { margin-top: .5rem; }
.map { display: block; width: 100%; height: 14rem; border: 1px solid var(--border); border-radius: 8px; margin: .75rem 0; }
.guest-wrap .when, .guest-wrap .where { margin: .2rem 0; }

/* Event dashboard */
.dash { overflow-wrap: anywhere; }
.dash h2 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
.dash .brief { max-width: 60rem; }
.dash .map { max-width: 40rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1rem; }
.timeline { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .5rem 0; counter-reset: stage; }
.timeline li { flex: 1 1 8rem; min-width: 0; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); counter-increment: stage; }
.timeline li::before { content: counter(stage) ". "; }
.timeline li.done { color: var(--text); }
.timeline li.done::after { content: " (fait)"; color: var(--muted); font-size: .85rem; }
.timeline li.current { border-color: var(--primary); border-width: 2px; color: var(--primary); font-weight: 700; }
.todos { list-style: none; padding: 0; margin: .75rem 0; }
.todos > li { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: .6rem .85rem; margin: .5rem 0; }
.todos .count { font-weight: 700; color: var(--primary); }
.todos .btn { margin-top: .4rem; }
.todos ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.stats-grid .card { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: .75rem 1rem; margin: 0; }
.stats-grid .card.current { border-color: var(--primary); }
.stats-grid h3 { margin: 0 0 .5rem; font-size: 1rem; }
.stats-grid dl { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; margin: 0; }
.stats-grid dt { color: var(--muted); }
.stats-grid dd { margin: 0; font-weight: 700; text-align: right; }
@media (max-width: 480px) {
    .container { padding: 1rem; }
    .timeline li { flex-basis: 100%; }
    .nav-links .btn, .todos .btn { display: block; width: 100%; text-align: center; }
}

/* The long personal link of a message preview must not widen the page. */
.sample { overflow-wrap: anywhere; }
.sample a { word-break: break-all; }

.pre-wrap { white-space: pre-wrap; }
.site-footer { margin-top: 1.5rem; font-size: .85rem; text-align: center; }
.site-footer .tagline { color: #777; font-size: .8rem; font-style: italic; }

/* Preview of an e-mail body (the sent message carries its own inline styles). */
.email-preview { font-family: Arial, sans-serif; line-height: 1.5; }
.email-preview-rule { border: 0; border-top: 1px solid #ddd; margin: 24px 0; }

/* Pagination (resources/views/vendor/pagination/francais.blade.php). */
.pagination { margin: 1rem 0; text-align: center; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.pagination-summary { margin: 0 0 .5rem; font-size: .9rem; }
.pagination .btn.disabled { background: var(--border); color: var(--muted); cursor: default; }
.pagination .btn.current { background: var(--primary-dark); }
.pagination-gap { padding: .35rem .5rem; color: var(--muted); }
