/* Salles communales de Mortagne-sur-Gironde — couleurs du logo communal, mobile d'abord. */
:root {
  --navy: #0b3d6b;        /* « Mortagne » */
  --navy-dark: #072a4b;
  --sea: #2a8fa8;         /* l'estuaire */
  --sea-light: #e3f2f6;
  --sun: #f7b718;         /* le soleil */
  --sun-light: #fff4d6;
  --vine: #8dbb4f;        /* les coteaux */
  --grape: #6d3b6f;       /* le raisin */
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1b2733;
  --muted: #5b6774;
  --line: #e1ddd3;
  --ok: #2f7d4f;
  --danger: #b3261e;
  --warn: #9a5b00;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 61, 107, .06), 0 6px 20px rgba(11, 61, 107, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-title: "Avenir Next", Avenir, "Century Gothic", Futura, "Trebuchet MS", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: var(--sea); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-title); color: var(--navy); line-height: 1.2; margin: 0 0 .6em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4.2vw, 2.4rem); }
h2 { font-size: 1.3rem; margin-top: 1.4em; }
h3 { font-size: 1.08rem; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.is-admin .wrap { max-width: 1480px; } /* l'administration profite des grands écrans */
@media (min-width: 1100px) { .wrap { padding: 0 28px; } }
main.wrap { padding-top: 28px; padding-bottom: 56px; flex: 1; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 72ch; }
.hint { font-size: .875rem; color: var(--muted); margin: .3em 0 1em; }
.opt { font-weight: 400; color: var(--muted); font-size: .85em; }
.warn { color: var(--warn); font-size: .85rem; font-weight: 600; }
.section-title { display: flex; align-items: center; gap: 12px; margin: 40px 0 16px; font-size: 1.5rem; }
.section-title::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--sun), var(--vine) 40%, var(--sea) 70%, transparent); opacity: .7; }
.page-intro { margin-bottom: 24px; }

/* ---------- En-tête ---------- */
.site-header { background: var(--surface); box-shadow: 0 1px 0 var(--line); position: relative; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { height: 76px; width: auto; }
.brand-text { border-left: 2px solid var(--line); padding-left: 16px; line-height: 1.25; }
.brand-text strong { display: block; font-family: var(--font-title); color: var(--navy); font-size: 1.15rem; font-weight: 600; }
.brand-text small { color: var(--sea); font-size: .85rem; font-weight: 600; letter-spacing: .02em; }
.nav { background: var(--navy); }
.is-admin .nav { background: linear-gradient(90deg, var(--navy-dark), var(--navy)); }
.nav-inner { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav a, .nav .link { color: #fff; text-decoration: none; padding: 12px 14px; font: inherit; font-size: .95rem; font-weight: 500; background: none; border: 0; cursor: pointer; border-bottom: 3px solid transparent; }
.nav a:hover, .nav .link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a[aria-current] { border-bottom-color: var(--sun); background: rgba(255, 255, 255, .08); }
.nav-spacer { flex: 1; }
.nav-aside { font-size: .88rem !important; opacity: .85; }
.nav-form { margin: 0; }
.nav-toggle { display: none; background: var(--navy); color: #fff; border: 0; border-radius: var(--radius-sm); padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; }

@media (max-width: 820px) {
  .brand img { height: 46px; }
  .brand-text { padding-left: 12px; }
  .brand-text strong { font-size: 1rem; }
  .nav-toggle { display: block; }
  .nav { display: none; }
  .nav.open { display: block; }
  .nav-inner { flex-direction: column; align-items: stretch; padding: 6px 0; }
  .nav a, .nav .link { border-bottom: 0; border-left: 4px solid transparent; text-align: left; width: 100%; }
  .nav a[aria-current] { border-left-color: var(--sun); }
  .nav-spacer { display: none; }
}
@media (max-width: 460px) {
  .brand-text { display: none; }
}

/* ---------- Pied de page ---------- */
.site-footer { margin-top: auto; color: #d5e2ee; }
.footer-wave { display: block; width: 100%; height: 40px; fill: var(--navy); }
.footer-body { background: var(--navy); padding: 18px 0 30px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: .92rem; }
.footer-inner strong { color: #fff; font-family: var(--font-title); font-size: 1.05rem; }
.footer-inner p { margin: .3em 0 0; }
.footer-inner nav { display: flex; flex-direction: column; gap: 4px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sun); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--navy); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--navy); color: var(--navy); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--navy-dark); }
.btn-sun:hover { background: #ffc93d; border-color: #ffc93d; color: var(--navy-dark); }
.btn-ghost { background: rgba(255, 255, 255, .7); border-color: rgba(11, 61, 107, .25); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { color: #fff; background: #256641; }
.btn-danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: .875rem; }
.btn-lg { padding: 13px 24px; font-size: 1.05rem; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* ---------- Bandeau d'accueil ---------- */
.hero { position: relative; overflow: hidden; display: grid; gap: 24px; align-items: end; padding: 36px 28px 30px; border-radius: 22px; margin-bottom: 8px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 210, 74, .95) 0, rgba(247, 183, 24, .55) 14%, rgba(247, 183, 24, 0) 34%),
    linear-gradient(180deg, #fffaf0 0%, #fdf3dc 55%, var(--sea-light) 100%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 46' preserveAspectRatio='none'%3E%3Cpath d='M0 22 C200 2 400 40 600 22 S1000 4 1200 20 V46 H0Z' fill='%232a8fa8' opacity='.35'/%3E%3Cpath d='M0 32 C220 18 420 46 640 30 S1020 20 1200 30 V46 H0Z' fill='%232a8fa8' opacity='.55'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat; }
.hero > * { position: relative; z-index: 1; }
.hero-text { max-width: 640px; }
.eyebrow { margin: 0 0 6px; color: var(--sea); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.hero h1 { margin-bottom: .35em; }
.hero h1 span { color: var(--sea); }
.hero p { color: #3a4a5a; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.hero-steps li { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .8); border-radius: 12px; padding: 10px 14px; font-weight: 500; color: var(--navy); box-shadow: 0 1px 3px rgba(11, 61, 107, .08); }
.hero-steps span { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: .9rem; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.5fr 1fr; padding: 48px 44px 52px; } .hero-steps { margin-bottom: 18px; } }

/* ---------- Alertes, badges ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; border: 1px solid; }
.alert ul { margin: .3em 0; padding-left: 1.2em; }
.alert-success { background: #ebf6ef; border-color: #b9dcc5; color: #1d5133; }
.alert-error { background: #fbeceb; border-color: #f0c4c0; color: #7d1a14; }
.alert-info { background: var(--sea-light); border-color: #bcdde7; color: #164e5f; }
.badge { display: inline-block; font-family: var(--font); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; vertical-align: middle; white-space: nowrap; letter-spacing: 0; }
.badge-demande { background: var(--sun-light); color: #7a4a00; }
.badge-confirmee { background: #e2f2e8; color: #1d5133; }
.badge-refusee, .badge-annulee { background: #eceae4; color: #555; }
.tag { display: inline-block; font-family: var(--font); font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: #eceae4; color: var(--muted); vertical-align: middle; }
.count { display: inline-grid; place-items: center; min-width: 1.7em; padding: 0 .45em; height: 1.7em; border-radius: 99px; background: var(--sun); color: var(--navy-dark); font-family: var(--font); font-size: .78rem; font-weight: 700; vertical-align: middle; }

/* ---------- Mise en page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 10px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.panel > h2:first-child { margin-top: 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.grid-2 > .panel { margin-bottom: 18px; }

/* ---------- Visuels et cartes des salles ---------- */
.room-visual { display: block; width: 100%; object-fit: cover; background: var(--sea-light); }
.room-visual-card { aspect-ratio: 16 / 9; height: auto; }
.room-visual-hero { aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius); }
.room-visual-thumb { width: 64px; height: 64px; border-radius: 12px; flex: none; }
svg.room-visual .rv-name { font-family: var(--font-title); font-size: 26px; font-weight: 600; fill: #fff; }
svg.room-visual .rv-note { font-family: var(--font); font-size: 13px; fill: #fff; opacity: .85; letter-spacing: .04em; text-transform: uppercase; }
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.room-card { transition: transform .18s, box-shadow .18s; }
.room-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(11, 61, 107, .14); color: inherit; }
.room-card .card-body { border-top: 4px solid var(--room, var(--sea)); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h2, .card-body h3 { margin: 0 0 .3em; font-size: 1.2rem; }
.card-body p { margin: 0 0 .4em; }
.meta { color: var(--muted); font-size: .9rem; }
.more { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--sea); font-size: .92rem; }
.is-off { opacity: .55; }

/* ---------- Fiche salle ---------- */
.room-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; border-left: 6px solid var(--room); padding-left: 16px; margin-bottom: 20px; }
.room-head h1 { margin-bottom: .2em; }
.room-head .lead { margin: 0; }
.room-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .room-grid { grid-template-columns: 1.6fr 1fr; } }
.room-photo { margin-bottom: 18px; }
.prose { max-width: 70ch; }
.ticks { padding-left: 0; list-style: none; columns: 2 220px; }
.ticks li { padding-left: 26px; position: relative; margin-bottom: 4px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--vine); font-weight: 700; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }
.facts.small { font-size: .9rem; }
.free-note { color: var(--ok); font-weight: 600; font-size: .95rem; background: #ebf6ef; padding: 8px 12px; border-radius: var(--radius-sm); }

/* ---------- Tableaux ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tariffs, .table { border-collapse: collapse; width: 100%; background: var(--surface); }
.table { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tariffs th, .tariffs td, .table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tariffs thead th, .table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #faf9f6; }
.tariffs td { white-space: nowrap; }
.tariffs.edit input { width: 90px; }
.table tbody tr:hover { background: #fbfaf7; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--room); margin-right: 6px; }
@media (max-width: 720px) {
  .table.responsive { box-shadow: none; background: none; }
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 6px 0; background: var(--surface); }
  .table.responsive td { display: flex; gap: 10px; border: 0; padding: 4px 12px; }
  .table.responsive td::before { content: attr(data-label); flex: 0 0 96px; font-weight: 600; color: var(--muted); font-size: .85rem; }
}

/* ---------- Formulaires ---------- */
.form { max-width: none; } /* les écrans de saisie suivent la largeur disponible */
.form.narrow, .auth-box { max-width: 440px; }
.auth-box { margin: 24px auto; background: var(--surface); padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); border-top: 5px solid var(--sun); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; margin: 0 0 18px; background: var(--surface); min-width: 0; box-shadow: 0 1px 2px rgba(11, 61, 107, .04); }
legend { font-family: var(--font-title); font-weight: 600; color: var(--navy); padding: 0 8px; font-size: 1.05rem; }
label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 12px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=password], input[type=search], input[type=file], select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--ink);
  background: #fff; border: 1.5px solid #d3cfc4; border-radius: var(--radius-sm); min-height: 44px; }
input[type=color] { display: block; margin-top: 4px; width: 64px; height: 44px; padding: 2px; border: 1.5px solid #d3cfc4; border-radius: var(--radius-sm); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--sea); outline: 3px solid rgba(42, 143, 168, .18); }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input, .radio input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--navy); }
.radios { margin-bottom: 8px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.estimate { font-weight: 600; color: var(--navy); min-height: 1.2em; margin: 0 0 12px; }
.estimate:not(:empty) { background: var(--sun-light); border-left: 4px solid var(--sun); padding: 8px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.asso-pick { background: var(--sea-light); border-radius: var(--radius-sm); padding: 12px 14px 4px; margin-bottom: 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.photo-preview img { max-height: 120px; border-radius: var(--radius-sm); margin-bottom: 6px; }
.danger-zone { margin-top: 18px; border: 1px dashed var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--surface); }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; }

.filters { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 2px; margin-bottom: 12px; }
.filters > label { flex: 1 1 170px; }
.filters > label:has(input[type=search]) { flex: 3 1 260px; }
.filters > .check { flex: 0 1 auto; align-self: flex-end; align-items: center; min-height: 44px; margin-bottom: 12px; }
.filters > .check input { margin-top: 0; }
.filter-actions { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.edit-layout { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .edit-layout { grid-template-columns: minmax(0, 1fr) 330px; } }
.log { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.log li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.log time { display: block; color: var(--muted); font-size: .8rem; }

/* ---------- Listes ---------- */
.res-list { list-style: none; margin: 0; padding: 0; }
.res-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-left: 4px solid var(--room, var(--line)); padding: 10px 12px; margin-bottom: 8px; background: #faf9f6; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.res-main { display: flex; flex-direction: column; color: inherit; text-decoration: none; flex: 1 1 260px; min-width: 0; }
.res-main:hover strong { color: var(--sea); }
.res-main span { font-size: .9rem; }
.res-actions { display: flex; gap: 6px; margin: 0; }
.res-list.compact li { padding: 8px 10px; }
.user-list { list-style: none; padding: 0; margin: 0 0 16px; }
.user-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.user-list form { margin: 0; }

.room-order { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 860px; }
.room-order li { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--room); border-radius: var(--radius-sm); padding: 10px 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.order-btns { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.order-btns .btn { padding: 2px 10px; min-width: 38px; }
.order-main { flex: 1 1 200px; display: flex; flex-direction: column; }
.order-main strong { font-family: var(--font-title); color: var(--navy); font-size: 1.08rem; }

/* ---------- Agenda ---------- */
.room-filter { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 12px; background: none; box-shadow: none; }
.room-filter legend { font-family: var(--font); font-size: .85rem; color: var(--muted); font-weight: 600; padding: 0; margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 14px; border-radius: 99px; border: 2px solid var(--chip); background: var(--surface); color: var(--ink); font-size: .9rem; font-weight: 600; cursor: pointer; user-select: none; }
.chip:has(input:checked) { background: var(--chip); color: #fff; }
.chip input { accent-color: var(--chip); margin: 0; }
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: var(--muted); margin: 10px 0 24px; }
.lg-block::before, .lg-pending::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-block::before { background: repeating-linear-gradient(-45deg, #6b7280 0 3px, #9ca3af 3px 6px); }
.lg-pending::before { background: repeating-linear-gradient(45deg, var(--sea) 0 3px, #9fd0dc 3px 6px); }
.fc { --fc-border-color: var(--line); --fc-today-bg-color: var(--sun-light); --fc-button-bg-color: var(--navy); --fc-button-border-color: var(--navy);
  --fc-button-hover-bg-color: var(--navy-dark); --fc-button-hover-border-color: var(--navy-dark); --fc-button-active-bg-color: var(--sea); --fc-button-active-border-color: var(--sea);
  --fc-neutral-bg-color: #faf9f6; --fc-list-event-hover-bg-color: var(--sea-light); font-size: .92rem; }
.fc .fc-toolbar-title { font-family: var(--font-title); color: var(--navy); font-size: 1.3rem; text-transform: capitalize; }
.fc .fc-button { font-size: .85rem; padding: .4em .8em; border-radius: 999px !important; margin: 0 2px !important; text-transform: capitalize; }
.fc .fc-col-header-cell-cushion { color: var(--navy); text-transform: capitalize; font-weight: 600; text-decoration: none; padding: 8px 4px; }
.fc .fc-daygrid-day-number { color: var(--muted); text-decoration: none; font-size: .85rem; }
.fc .fc-list-day-cushion { background: var(--sea-light); }
.fc .fc-list-day-text, .fc .fc-list-day-side-text { color: var(--navy); text-decoration: none; text-transform: capitalize; }
.fc-event { cursor: pointer; border-radius: 6px; padding: 1px 3px; }
.fc .ev-demande { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.3) 0 6px, transparent 6px 12px); border-style: dashed !important; }
.fc .ev-blocage { background-image: repeating-linear-gradient(-45deg, rgba(0,0,0,.18) 0 5px, transparent 5px 10px); }
.fc-list-event.ev-demande td { font-style: italic; }
@media (max-width: 720px) {
  .calendar { padding: 8px; }
  .fc .fc-toolbar { gap: 6px; }
  .fc .fc-toolbar-title { font-size: 1.05rem; }
}

.event-dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(92vw, 470px); box-shadow: 0 16px 50px rgba(7, 42, 75, .3); border-top: 6px solid var(--sun); }
.event-dialog::backdrop { background: rgba(7, 42, 75, .45); }
.event-dialog form { padding: 22px; }
.event-dialog .ev-room { margin: 0; color: var(--sea); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.event-dialog .ev-title { margin: .2em 0 .3em; }
.event-dialog .ev-when { font-weight: 600; margin: 0 0 .5em; text-transform: capitalize; }
.event-dialog .ev-desc { white-space: pre-line; }
.event-dialog p:empty { display: none; }

/* ---------- Demande : confirmation par e-mail, nettoyage ---------- */
.req { display: inline-block; margin-left: 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--danger); }
.steps-note { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--sun); border-radius: var(--radius-sm); padding: 14px 18px; margin: 14px 0 6px; max-width: 760px; }
.steps-note ol { margin: 6px 0 0; padding-left: 1.3em; }
.steps-note li { margin-bottom: 4px; }
.callout { background: var(--sun-light); border-left: 5px solid var(--sun); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 14px 2px; margin: 4px 0 14px; }
.callout label { margin-bottom: 6px; }
.callout .hint { color: #5a4a1e; }
.confirm-box { text-align: center; max-width: 640px; margin: 10px auto 28px; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--ok); border-radius: var(--radius); padding: 30px 24px; box-shadow: var(--shadow); }
.confirm-box.confirm-pending { border-top-color: var(--sun); }
.confirm-box .lead { margin: 0 auto 14px; }
.confirm-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: #ebf6ef; color: var(--ok); }
.confirm-pending .confirm-icon { background: var(--sun-light); color: #9a6a00; }
.inline-form { display: inline-block; margin: 6px 0 0; }
.fc .ev-cleaning { background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.55) 0 5px, transparent 5px 10px); border-style: dotted !important; }

/* Tarifs par lignes (fiche salle publique et administration) */
.rate-groups { display: grid; gap: 12px; margin: 0 0 12px; }
.rate-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface); }
.rate-group h3 { font-size: .95rem; margin: 0 0 6px; }
.rate-list { list-style: none; margin: 0; padding: 0; }
.rate-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.rate-list li:last-child { border-bottom: 0; }
.rate-list strong { text-align: right; white-space: normal; }
.rate-list small { display: block; font-weight: normal; color: var(--muted); font-size: .8rem; }
.rate-meta { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.rate-extra-title { font-size: .95rem; margin: 14px 0 6px; }
.tariff-alert .tariff-rooms { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rate-extras strong { white-space: nowrap; }
.rate-list .rate-price { text-align: right; flex: none; }
.rate-list .rate-price small { white-space: nowrap; }
.rate-list li > span { min-width: 0; }

/* Administration : une fiche par ligne de tarif */
.rate-rows { display: grid; gap: 10px; margin: 6px 0 4px; }
.rate-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 4px 12px; padding: 12px 14px 4px; border: 1px solid var(--line); border-left: 4px solid var(--navy);
  border-radius: var(--radius-sm); background: var(--surface); }
.rate-row.rate-new { border-left-color: #d3cfc4; border-style: dashed; background: #fbfaf7; }
.rate-row label { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.rate-row input[type=text], .rate-row select { min-height: 40px; padding: 8px 10px; font-size: .95rem; color: var(--ink); }
.rate-row .rr-note { grid-column: span 2; }
.rate-row .rr-remove { align-self: end; justify-self: start; color: var(--danger, #b3261e); font-size: .9rem; margin-bottom: 18px; }
.rate-row:has(.rr-remove input:checked) { opacity: .55; border-left-color: var(--danger, #b3261e); }
@media (min-width: 1100px) {
  .rate-row { grid-template-columns: minmax(0, 2.2fr) minmax(0, 2.6fr) 90px minmax(0, 1.3fr) 100px 100px; }
  .rate-row .rr-note { grid-column: 1 / 6; }
  .rate-row .rr-remove { grid-column: 6; }
}
@media (max-width: 720px) {
  .rate-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rate-row .rr-cat, .rate-row .rr-label, .rate-row .rr-note { grid-column: 1 / -1; }
}
.alert-warn { background: var(--sun-light); border-color: var(--sun); color: #5a4300; }

/* Connexion */
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--sea); text-decoration: underline; cursor: pointer; }
.code-input { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; max-width: 260px; font-variant-numeric: tabular-nums; }
.nav .nav-login::before { content: "🔒"; font-size: .85em; margin-right: 6px; }

/* Administration : en-tête et nom de la fiche toujours visibles, barre d'enregistrement en bas */
.is-admin .site-header { position: sticky; top: 0; z-index: 30; }
.sticky-head { position: sticky; top: var(--sticky-top, 0px); z-index: 20; background: var(--bg); padding: 10px 0; margin: -10px 0 14px; border-bottom: 1px solid var(--line); }
.sticky-head h1 { font-size: clamp(1.35rem, 3vw, 2rem); }
.is-admin fieldset, .is-admin [id] { scroll-margin-top: calc(var(--sticky-top, 0px) + 90px); }
.save-bar { position: sticky; bottom: 0; z-index: 15; justify-content: space-between; align-items: center; margin: 8px 0 0;
  background: rgba(255, 255, 255, .97); border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  padding: 12px 16px; box-shadow: 0 -6px 18px rgba(11, 61, 107, .08); }
.save-status { color: var(--muted); font-size: .93rem; }
.save-bar.is-dirty { border-top-color: var(--sun); }
.save-bar.is-dirty .save-status { color: #5a4300; font-weight: 600; }
.save-bar.is-dirty .save-status::before { content: "● "; color: var(--sun); }

/* État des lieux (photos sur smartphone) */
.edl-head { align-items: flex-end; }
.edl-sub { margin: 2px 0 0; }
.edl-tabs { display: flex; gap: 6px; }
.edl-tabs a { padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--navy); font-weight: 600; font-size: .9rem; }
.edl-tabs a.is-done { border-color: var(--ok); }
.edl-tabs a.is-done::before { content: "✔ "; color: var(--ok); }
.edl-tabs .count { display: inline-block; min-width: 1.5em; text-align: center; background: var(--bg); border-radius: 99px; font-size: .8rem; padding: 0 5px; }
.edl-contact { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.edl-contact a[href^="tel:"] { font-weight: 700; }
.edl-phases { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .edl-phases { grid-template-columns: 1fr 1fr; align-items: start; } }
.edl-phase { margin: 0; }
.edl-phase-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.edl-phase-head h2 { margin: 0 0 10px; }
.edl-phase-head small { font-size: .8rem; color: var(--muted); font-weight: 500; margin-left: 6px; }
.badge-ok { background: #e2f2e8; color: #1d5133; }
.edl-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.edl-buttons .btn { justify-content: center; text-align: center; margin: 0; }
@media (max-width: 460px) { .edl-buttons { grid-template-columns: 1fr; } }
.edl-caption { font-size: .85rem; }
.edl-upload.is-busy .edl-buttons { opacity: .5; pointer-events: none; }
.edl-progress { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--radius-sm); background: #eef4f9; color: var(--navy); font-weight: 600; }
.edl-progress.is-error { background: #fbe9e7; color: var(--danger); }
.edl-gallery { list-style: none; padding: 0; margin: 4px 0 14px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.edl-thumb { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #000; cursor: zoom-in; position: relative; }
.edl-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.edl-thumb-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 4px; font-size: .72rem; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edl-empty { margin: 6px 0 14px; }
.edl-notes { border-top: 1px solid var(--line); padding-top: 12px; }
.edl-viewer { width: min(96vw, 1100px); max-height: 96vh; padding: 0; border: 0; border-radius: var(--radius); background: #111; color: #fff; }
.edl-viewer::backdrop { background: rgba(0, 0, 0, .8); }
.edl-viewer-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; font-size: .9rem; }
.edl-viewer-top form { margin: 0; }
.edl-viewer-img { position: relative; display: flex; justify-content: center; background: #000; }
.edl-viewer-img img { max-width: 100%; max-height: 72vh; object-fit: contain; }
.edl-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; font-size: 2rem; cursor: pointer; }
.edl-nav.prev { left: 6px; } .edl-nav.next { right: 6px; }
.edl-viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; }
.edl-viewer-actions form { margin: 0; display: flex; gap: 6px; align-items: center; }
.edl-caption-form { flex: 1 1 260px; }
.edl-caption-form input { margin: 0; min-height: 36px; padding: 6px 10px; }
.res-edl { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; text-decoration: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); white-space: nowrap; }
