/* Feuille de style unique, sans framework.
   Les couleurs de marque (--brand-*) sont surchargées par le gabarit à partir
   du modèle Event ; les tokens sémantiques en dérivent. */
:root {
  --brand-bg: #2B3F7A;
  --brand-ink: #141E52;
  --brand-ac: #3557B7;
  --brand-hi: #8FA6E6;
  --brand-btn: #141E52;

  --bg: var(--brand-bg);
  --card: #fff;
  --ink: var(--brand-ink);
  --mut: #5B6B85;
  --ac: var(--brand-ac);
  --hi: var(--brand-hi);
  --line: #E2E6F2;
  --btn: var(--brand-btn);
  --note: #D7DEF5;
  --ok: #1E8E5A;
  --warn: #B7791F;
  --bad: #C0392B;

  --serif: Georgia, "Times New Roman", serif;
  --sans: Calibri, Arial, sans-serif;
  --ui: Arial, Helvetica, sans-serif;
  --mono: ui-monospace, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

/* L'attribut hidden doit primer sur les display des composants. */
[hidden] { display: none !important; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}

.page { max-width: 632px; margin: 0 auto; padding: 40px 16px; }
@media (max-width: 480px) { .page { padding-top: 20px; } }

/* Cartes */
.card {
  background: var(--card);
  border-radius: 10px;
  padding: 28px 40px;
  margin-bottom: 20px;
  text-align: center;
}
.card-hero { padding: 34px 40px; }
.card-tight { padding: 20px; }
.card-map { padding: 20px; }
.card-left { text-align: left; }
@media (max-width: 480px) {
  .card, .card-hero { padding: 24px 20px; }
  .card-map, .card-tight { padding: 16px; }
}

/* Logo */
.logo img { display: inline-block; width: 140px; max-width: 60%; height: auto; }
.logo-sm img { width: 100px; }
.logo-text { font: 700 26px/1 var(--serif); color: var(--ac); }

/* Typographie */
h1, .headline { font: 400 30px/1.2 var(--serif); margin: 6px 0 0; color: var(--ink); }
.headline-small { font-size: 26px; }
.strong { font: 700 17px/1.4 var(--ui); }
.date { font: 700 19px/1.4 var(--ui); margin: 10px 0 0; }
.time { color: var(--mut); font-size: 14px; margin-top: 4px; }
.muted { color: var(--mut); font-size: 14px; }
.small { font-size: 13px; }
.intro { color: var(--mut); font-size: 15px; line-height: 1.6; margin: 20px 0 0; }
.eyebrow { color: var(--ac); font: 400 10.5px/1.4 var(--ui); letter-spacing: 2px; text-transform: uppercase; margin: 0; }
.eyebrow-sm { font: 400 11px/1.4 var(--sans); letter-spacing: 1.5px; }
.text { margin: 12px 0; }
.card-text { font-size: 14px; color: var(--mut); line-height: 1.7; }
.card-text strong { color: var(--ink); }
.card-text hr { margin: 18px auto; }
.card-text p { margin: 0; }
.personal { color: var(--mut); font-size: 11.5px; font-style: italic; margin: 16px 0 0; }
.cta-intro { color: var(--mut); font-size: 13px; margin-bottom: 16px; }
.block { display: block; }
p { margin: 0; }

/* Pastille « INVITATION » */
.pill {
  display: inline-block;
  margin-top: 22px;
  padding: 6px 18px;
  border: 1px solid var(--ac);
  color: var(--ac);
  font: 700 11px var(--ui);
  letter-spacing: 2px;
}

hr { border: 0; height: 1px; background: var(--line); margin: 20px auto; max-width: 380px; }
hr.full { max-width: none; }

/* Liens */
a { color: var(--ac); }
.link { color: var(--ac); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }
.venue-link { display: block; margin-top: 8px; color: inherit; text-decoration: none; }
.address { color: var(--mut); font-size: 13.5px; }
.maps-link { display: inline-block; padding-top: 14px; font: 700 12px var(--ui); letter-spacing: .3px; color: var(--ac); text-decoration: none; }
.maps-link:hover { text-decoration: underline; }

/* Carte Google Maps */
.map { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.map iframe { display: block; width: 100%; height: 200px; border: 0; }

/* Bouton : bleu marine, filet bleu clair en bas */
.button {
  display: inline-block;
  margin-top: 18px;
  padding: 13px 30px;
  background: var(--btn);
  color: #fff;
  border: 0;
  border-bottom: 2px solid var(--hi);
  border-radius: 0;
  font: 700 13px/1.2 var(--ui);
  letter-spacing: .5px;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(1.2); }
.button-lg { margin-top: 0; padding: 14px 34px; }
.button-small { margin: 0; padding: 7px 14px; font-size: 12px; }
.button-block { display: block; width: 100%; padding: 12px; }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }

/* Pied de page posé sur le fond */
.note { color: var(--note); font-size: 11.5px; text-align: center; line-height: 1.8; margin: 0; padding: 10px 8px 0; }
.note strong { color: #fff; }
.note a { color: #fff; }

/* Formulaires */
.form { text-align: left; }
.form-title { margin-bottom: 4px; }
.field { margin: 0; border: 0; padding: 0; min-width: 0; }
.field label {
  display: block;
  margin: 12px 0 4px;
  color: var(--mut);
  font: 600 12px var(--ui);
}
input[type=text], input[type=email], input[type=search], input[type=password], select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: 15px var(--sans);
}
select option { color: #141E52; }
.has-error input, .has-error select { border-color: var(--bad); }
.error { color: var(--bad); font-size: 13px; margin: 4px 0 0; }

.consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; color: var(--mut); font-size: 12.5px; }
.consent input { width: auto; margin-top: 3px; }
.consent label { margin: 0; font: 12.5px var(--sans); color: var(--mut); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 12px 14px; margin-bottom: 8px; border-radius: 6px; font-size: 13px; color: #fff; background: var(--bad); text-align: left; }
.cta { text-align: center; }
.back { text-align: center; margin-top: 14px; font-size: 13px; }

/* Barre du personnel (invitation et bilan) */
.staff-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 20px; }
.staff-bar a {
  padding: 7px 14px;
  border: 1px solid var(--hi);
  border-radius: 6px;
  color: #fff;
  font: 600 13px var(--ui);
  text-decoration: none;
}
.staff-bar a:hover { background: #fff; color: var(--brand-ink); }

/* Tableau de synthèse */
.table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 14px; }
.table th { color: var(--mut); font: 600 12px var(--ui); text-align: right; padding: 6px 0; border-bottom: 1px solid var(--line); }
.table td { text-align: right; padding: 8px 0; border-bottom: 1px solid var(--line); }
.table th:first-child, .table td:first-child { text-align: left; }

.export { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

/* QR code et boutons d'agenda */
.qr-box { display: inline-block; margin: 18px 0 6px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.qr-box img { display: block; width: 180px; height: 180px; image-rendering: pixelated; }
.code { font: 700 15px var(--mono); letter-spacing: 2px; }
.calendar-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.calendar-actions .button { margin-top: 0; }
.button-light { background: #fff; color: var(--btn); border: 1px solid var(--btn); border-bottom: 2px solid var(--hi); }
.button-light:hover { filter: none; background: #F4F6FB; }

/* Accueil Powher Events */
.wordmark { font: 400 30px/1.1 var(--serif); color: var(--ac); letter-spacing: .5px; }
.event-links { font-size: 13px; }
.event-links .link { font-weight: 600; }
.event-row { position: relative; border-radius: 8px; transition: background .15s; }
.event-row:hover { background: #F4F6FB; }
.event-row-link { color: inherit; text-decoration: none; }
.event-row-link::after { content: ""; position: absolute; inset: 0; }
.event-links .link { position: relative; z-index: 1; }

/* Bilan : actions des managers */
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.row-actions { display: flex; gap: 10px; }
.row-actions form { margin: 0; }
.linkish.danger { color: var(--bad); }
.flash { margin-bottom: 12px; padding: 10px 14px; border-radius: 6px; background: #E3F4EA; color: #1E6B45; font-size: 14px; }
.flash-error { background: #FBE7E5; color: var(--bad); }
