/* Espace administrateur — Compagnie Les Chouquet's
   Pensé pour être lu et utilisé sans effort : gros caractères, gros boutons, un seul geste par écran. */
:root {
  --rouge: #B02323; --rouge-fonce: #8E1B1B; --braise: #4A0D0D; --dore: #C9A85C; --dore-clair: #E6D19A;
  --creme: #FBF6E7; --creme-chaud: #F3E9D0; --noir: #1A0E0A; --gris: #6D5A50;
  --vert: #1F7A3E; --vert-fonce: #175C2F; --orange: #FFF1CF; --orange-bord: #E3B94F;
  --ligne: rgba(74, 13, 13, 0.16); --blanc: #fff; --rayon: 16px;
  --ombre: 0 8px 26px rgba(26, 14, 10, 0.10);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-size: 19px; line-height: 1.55;
  background: var(--creme); color: var(--noir); min-height: 100vh; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; letter-spacing: -0.01em; color: var(--braise); }
h1 { font-size: clamp(28px, 4vw, 38px); }
h2 { font-size: clamp(23px, 3vw, 29px); }
h3 { font-size: 21px; }
a { color: var(--rouge); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 4px solid var(--dore); outline-offset: 3px; border-radius: 6px; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 12px 26px;
  border-radius: 14px; border: 2px solid transparent; font-weight: 700; font-size: 19px; text-decoration: none; text-align: center;
  line-height: 1.2; transition: transform .12s ease, background .15s ease, box-shadow .15s ease; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 24px; height: 24px; flex: 0 0 auto; }
.btn-main { background: var(--rouge); color: #fff; box-shadow: 0 6px 16px rgba(176, 35, 35, .28); }
.btn-main:hover { background: var(--rouge-fonce); }
.btn-go { background: var(--vert); color: #fff; box-shadow: 0 6px 16px rgba(31, 122, 62, .3); }
.btn-go:hover { background: var(--vert-fonce); }
.btn-soft { background: #fff; color: var(--braise); border-color: var(--ligne); }
.btn-soft:hover { border-color: var(--rouge); color: var(--rouge); }
.btn-danger { background: #fff; color: var(--rouge); border-color: rgba(176, 35, 35, .45); }
.btn-danger:hover { background: #FDECEC; border-color: var(--rouge); }
.btn-lg { min-height: 68px; font-size: 21px; padding: 14px 34px; }
.btn-sm { min-height: 48px; padding: 8px 18px; font-size: 17px; border-radius: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-block { display: flex; width: 100%; }

/* ---------- en-tête ---------- */
.top { background: var(--noir); color: var(--creme); position: sticky; top: 0; z-index: 50; border-bottom: 3px solid var(--dore); }
.top-in { max-width: 1100px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top-brand { display: flex; align-items: center; gap: 12px; color: var(--creme); text-decoration: none; margin-right: auto; }
.top-brand img { width: 44px; height: 44px; }
.top-brand b { font-family: 'Playfair Display', serif; font-size: 21px; display: block; line-height: 1.1; }
.top-brand small { color: var(--dore-clair); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.top .btn { min-height: 46px; padding: 6px 16px; font-size: 16px; border-radius: 12px; background: transparent; color: var(--creme); border-color: rgba(251, 246, 231, .35); }
.top .btn:hover { background: rgba(251, 246, 231, .12); color: #fff; }

/* ---------- bandeau « mise en ligne » ---------- */
.pub { background: #E6F4EA; border-bottom: 2px solid #A9D6B7; color: #14532D; }
.pub.is-dirty { background: var(--orange); border-bottom-color: var(--orange-bord); color: var(--noir); }
.pub-in { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pub-txt { flex: 1 1 280px; font-weight: 600; font-size: 19px; }
.pub-txt small { display: block; font-weight: 400; font-size: 16px; opacity: .85; }
.pub-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- page ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 90px; }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font-weight: 700; text-decoration: none; padding: 10px 6px; }
.back svg { width: 22px; height: 22px; }
.page-head { margin-bottom: 26px; }
.page-head p { margin-top: 8px; color: var(--gris); max-width: 62ch; }
.hello { margin-bottom: 8px; }
.lede { color: var(--gris); margin-top: 6px; max-width: 64ch; }
.sect { margin: 40px 0 16px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sect small { color: var(--gris); font-size: 17px; }

/* ---------- tuiles du tableau de bord ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.tile {
  display: flex; align-items: center; gap: 18px; text-align: left; padding: 20px 22px; background: #fff; color: var(--noir);
  border: 2px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre); text-decoration: none; min-height: 104px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--rouge); box-shadow: 0 12px 30px rgba(176, 35, 35, .16); }
.tile-ico { flex: 0 0 62px; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--rouge); color: var(--dore-clair); }
.tile-ico svg { width: 32px; height: 32px; }
.tile.alt .tile-ico { background: var(--braise); }
.tile b { display: block; font-family: 'Playfair Display', serif; font-size: 22px; line-height: 1.2; color: var(--braise); }
.tile span { display: block; color: var(--gris); font-size: 17px; line-height: 1.35; margin-top: 4px; }

/* ---------- cartes de liste ---------- */
.add-bar { margin: 4px 0 22px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cards { display: grid; gap: 16px; }
.card {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center; background: #fff; padding: 16px;
  border: 2px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre);
}
.card.no-thumb { grid-template-columns: 1fr auto; }
.card-thumb { width: 110px; height: 110px; border-radius: 12px; overflow: hidden; background: var(--creme-chaud); display: grid; place-items: center; color: var(--gris); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb.contain img { object-fit: contain; }
.card-thumb svg { width: 52px; height: 52px; }
.card-body { min-width: 0; }
.card-body h3 { font-size: 22px; margin-bottom: 4px; overflow-wrap: anywhere; }
.card-body p { color: var(--gris); font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.card-body .tag { display: inline-block; margin-top: 6px; padding: 2px 12px; border-radius: 999px; background: var(--creme-chaud); font-size: 15px; font-weight: 600; color: var(--braise); }
.card-body .tag.warn { background: #FDE9C8; color: #7A4B00; }
.card-acts { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 150px; }
.card-acts .row { display: flex; gap: 8px; }
.card-acts .row .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
.card.is-past { opacity: .7; }
.empty { padding: 30px; text-align: center; background: #fff; border: 2px dashed var(--ligne); border-radius: var(--rayon); color: var(--gris); }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.person-card { background: #fff; border: 2px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.person-card .card-thumb { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto; }
.person-card h3 { font-size: 21px; }
.person-card .card-acts { min-width: 0; }

/* ---------- albums / photos ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.photo-card { background: #fff; border: 2px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--ombre); }
.photo-card .pic { aspect-ratio: 4 / 3; background: var(--creme-chaud); display: grid; place-items: center; }
.photo-card .pic img { width: 100%; height: 100%; object-fit: contain; display: block; background: #f3ece0; }
.photo-card .pc-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.photo-card input[type=text] { width: 100%; font: inherit; font-size: 17px; padding: 10px 12px; border: 2px solid #CDBFA8; border-radius: 10px; min-height: 48px; background: #fff; }
.photo-card input[type=text]:focus { outline: none; border-color: var(--rouge); box-shadow: 0 0 0 4px rgba(176, 35, 35, .15); }
.photo-card .row { display: flex; gap: 8px; }
.photo-card .row .btn { flex: 1; padding: 6px 8px; min-height: 46px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.35; cursor: pointer; }
.check input { width: 26px; height: 26px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--rouge); }

/* ---------- formulaires ---------- */
.form { display: grid; gap: 22px; }
.fld label, .fld > .lbl { display: block; font-weight: 700; margin-bottom: 6px; color: var(--braise); }
.fld .hint { display: block; font-size: 16px; color: var(--gris); margin-top: 5px; line-height: 1.4; }
.fld input[type=text], .fld input[type=email], .fld input[type=password], .fld input[type=date], .fld input[type=tel], .fld textarea, .fld select {
  width: 100%; font: inherit; font-size: 19px; padding: 14px 16px; border: 2px solid #CDBFA8; border-radius: 12px; background: #fff; color: var(--noir); min-height: 56px;
}
.fld textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: none; border-color: var(--rouge); box-shadow: 0 0 0 4px rgba(176, 35, 35, .15); }
.fld .count { text-align: right; font-size: 14px; color: var(--gris); margin-top: 2px; }
.photo-fld { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.photo-fld .prev { width: 140px; height: 140px; border-radius: 12px; border: 2px solid var(--ligne); background: var(--creme-chaud); overflow: hidden; display: grid; place-items: center; color: var(--gris); text-align: center; font-size: 15px; padding: 6px; }
.photo-fld .prev img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-fld .prev.round { border-radius: 50%; }
.photo-fld .prev.round img { object-fit: cover; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rows { display: grid; gap: 10px; }
.inline-row { display: flex; gap: 10px; align-items: stretch; }
.inline-row input { flex: 1; }
.inline-row .btn { flex: 0 0 auto; }
.panel { background: #fff; border: 2px solid var(--ligne); border-radius: var(--rayon); padding: 24px; box-shadow: var(--ombre); }
.panel + .panel { margin-top: 18px; }
.acc { background: #fff; border: 2px solid var(--ligne); border-radius: var(--rayon); margin-bottom: 12px; overflow: hidden; }
.acc > summary { list-style: none; padding: 18px 22px; font-weight: 700; font-size: 20px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--braise); }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: '＋'; font-size: 26px; color: var(--rouge); }
.acc[open] > summary::after { content: '−'; }
.acc .acc-body { padding: 4px 22px 22px; display: grid; gap: 18px; }

/* ---------- fenêtre de saisie (feuille) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(26, 14, 10, .6); z-index: 200; display: grid; place-items: start center; overflow-y: auto; padding: 24px 14px; }
.sheet { background: var(--creme); width: 100%; max-width: 760px; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: hidden; margin: auto 0; }
.sheet-head { background: var(--noir); color: var(--creme); padding: 18px 24px; border-bottom: 3px solid var(--dore); }
.sheet-head h2 { color: var(--creme); font-size: 26px; }
.sheet-body { padding: 24px; }
.sheet-foot { padding: 16px 24px 24px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; position: sticky; bottom: 0; background: var(--creme); border-top: 1px solid var(--ligne); }
.sheet-foot .btn { flex: 1 1 200px; }
.sheet .err { background: #FDECEC; border: 2px solid rgba(176, 35, 35, .5); color: #7A1111; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.dlg { max-width: 560px; }
.dlg p { margin-bottom: 8px; }

/* ---------- messages ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 400; pointer-events: none; padding: 0 14px; }
.toast { background: var(--noir); color: #fff; padding: 16px 24px; border-radius: 14px; font-weight: 600; font-size: 19px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); max-width: 640px; animation: pop .25s ease; pointer-events: auto; }
.toast.ok { background: var(--vert); }
.toast.err { background: var(--rouge); }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.spin { width: 26px; height: 26px; border: 4px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: rot .8s linear infinite; display: inline-block; }
.spin.dark { border-color: rgba(26, 14, 10, .2); border-top-color: var(--rouge); }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- connexion ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(1200px 500px at 50% -10%, rgba(176, 35, 35, .16), transparent 60%), var(--creme); }
.login-card { width: 100%; max-width: 520px; background: #fff; border: 2px solid var(--ligne); border-radius: 22px; box-shadow: 0 24px 70px rgba(26, 14, 10, .18); overflow: hidden; }
.login-head { background: var(--noir); color: var(--creme); text-align: center; padding: 30px 24px 24px; border-bottom: 4px solid var(--dore); }
.login-head img { width: 74px; height: 74px; margin-bottom: 8px; }
.login-head h1 { color: var(--creme); font-size: 30px; }
.login-head p { color: var(--dore-clair); margin-top: 4px; }
.login-body { padding: 28px; display: grid; gap: 20px; }
.login-body .btn { width: 100%; }
.show-pw { display: flex; align-items: center; gap: 12px; font-size: 17px; cursor: pointer; }
.show-pw input { width: 24px; height: 24px; accent-color: var(--rouge); }
.small-links { text-align: center; font-size: 17px; color: var(--gris); }

/* ---------- divers ---------- */
.steps { display: grid; gap: 16px; counter-reset: s; }
.step { background: #fff; border: 2px solid var(--ligne); border-radius: var(--rayon); padding: 18px 20px 18px 78px; position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: var(--rouge); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; }
.step b { display: block; color: var(--braise); }
.hist { display: grid; gap: 12px; }
.hist-item { background: #fff; border: 2px solid var(--ligne); border-radius: var(--rayon); padding: 14px 18px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hist-item small { display: block; color: var(--gris); font-size: 16px; }
.success { text-align: center; padding: 10px 6px; }
.success .big { width: 92px; height: 92px; border-radius: 50%; background: var(--vert); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; }
.success .big svg { width: 52px; height: 52px; }
.success h2 { margin-bottom: 6px; }
.loading { text-align: center; padding: 70px 20px; color: var(--gris); }

@media (max-width: 760px) {
  body { font-size: 18px; }
  main { padding: 20px 14px 90px; }
  .card { grid-template-columns: 84px 1fr; }
  .card.no-thumb { grid-template-columns: 1fr; }
  .card-thumb { width: 84px; height: 84px; }
  .card-acts { grid-column: 1 / -1; min-width: 0; flex-direction: row; flex-wrap: wrap; }
  .card-acts > .btn, .card-acts .row { flex: 1 1 150px; }
  .row2 { grid-template-columns: 1fr; }
  .top-in { padding: 8px 14px; gap: 10px; }
  .top-brand { flex: 1 1 100%; }
  .top-brand img { width: 38px; height: 38px; }
  .top .btn { flex: 1 1 0; min-height: 44px; padding: 4px 10px; font-size: 15px; }
  .top .btn svg { width: 20px; height: 20px; }
  .pub-in { padding: 10px 14px; gap: 10px; }
  .pub-txt { font-size: 17px; flex-basis: 100%; }
  .pub-txt small { font-size: 15px; }
  .pub-btns { width: 100%; }
  .pub-btns .btn-go { order: -1; flex: 1 1 100%; }
  .pub-btns .btn-sm { flex: 1 1 0; }
  .tiles { grid-template-columns: 1fr; }
  .sheet-body { padding: 18px; }
  .sheet-head { padding: 16px 18px; }
  .sheet-foot { padding: 14px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
