/* =========================================================================
   MonBien+ — feuille de style unique.
   Mobile d'abord, thème clair et sombre, animations sobres.
   Aucune police externe : la pile système est instantanée, même en 2G.
   ========================================================================= */

/* --- Jetons de conception ------------------------------------------------ */

:root {
  /* Vert acacia : la marque. Ocre latérite : l'accent, la terre. */
  --brand: #0f7a5a;
  --brand-dark: #0b5c44;
  --brand-light: #e7f4ef;
  --accent: #d97706;
  --accent-light: #fef3e2;

  --ink: #14201c;
  --ink-2: #3d4b46;
  --ink-3: #6b7a74;
  --ink-4: #9aa7a2;

  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f4f2ee;
  --surface-3: #eceae4;
  --line: #e3e0d9;
  --line-strong: #cfcbc1;

  --ok: #0f7a5a;
  --warn: #b45309;
  --danger: #c2410c;
  --error: #b91c1c;
  --info: #0369a1;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(20, 32, 28, 0.06), 0 1px 3px rgba(20, 32, 28, 0.04);
  --shadow-2: 0 4px 12px rgba(20, 32, 28, 0.07), 0 2px 4px rgba(20, 32, 28, 0.04);
  --shadow-3: 0 12px 32px rgba(20, 32, 28, 0.12), 0 4px 8px rgba(20, 32, 28, 0.05);
  --shadow-brand: 0 8px 24px rgba(15, 122, 90, 0.22);

  --wrap: 1220px;
  --header-h: 66px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 140ms;
  --normal: 240ms;
  --slow: 420ms;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-num: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

:root[data-theme='dark'],
html:not([data-theme='light']) {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --brand: #34d3a2;
    --brand-dark: #7defc4;
    --brand-light: #10312a;
    --accent: #fbbf5a;
    --accent-light: #33230d;

    --ink: #eef4f1;
    --ink-2: #c3d0cb;
    --ink-3: #8b9a95;
    --ink-4: #66756f;

    --bg: #0b1220;
    --surface: #121b2b;
    --surface-2: #1a2436;
    --surface-3: #223047;
    --line: #24314a;
    --line-strong: #35476a;

    --ok: #34d3a2;
    --warn: #fbbf5a;
    --danger: #fb923c;
    --error: #f87171;
    --info: #60a5fa;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 16px 40px rgba(0, 0, 0, 0.55);
    --shadow-brand: 0 8px 26px rgba(52, 211, 162, 0.2);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --brand: #34d3a2;
  --brand-dark: #7defc4;
  --brand-light: #10312a;
  --accent: #fbbf5a;
  --accent-light: #33230d;

  --ink: #eef4f1;
  --ink-2: #c3d0cb;
  --ink-3: #8b9a95;
  --ink-4: #66756f;

  --bg: #0b1220;
  --surface: #121b2b;
  --surface-2: #1a2436;
  --surface-3: #223047;
  --line: #24314a;
  --line-strong: #35476a;

  --ok: #34d3a2;
  --warn: #fbbf5a;
  --danger: #fb923c;
  --error: #f87171;
  --info: #60a5fa;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-brand: 0 8px 26px rgba(52, 211, 162, 0.2);
}

/* --- Remise à zéro -------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* L'attribut `hidden` doit toujours l'emporter : sans cette règle, un
   `display: flex` posé sur un composant garde visible un élément masqué. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3.1rem);
}
h2 {
  font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.05rem);
}
h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.muted {
  color: var(--ink-3);
}
.small {
  font-size: 0.86rem;
}
.center {
  text-align: center;
}
.block {
  display: block;
  width: 100%;
}
.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 999;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Boutons -------------------------------------------------------------- */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.15rem;
  border: 1px solid var(--btn-line);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
    background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.btn:active {
  transform: translateY(0) scale(0.985);
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
}

.btn-primary {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  --btn-line: var(--brand);
  box-shadow: var(--shadow-brand);
}
:root[data-theme='dark'] .btn-primary,
html:not([data-theme='light']) .btn-primary {
  --btn-fg: #06251c;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .btn-primary {
    --btn-fg: #fff;
  }
}
.btn-primary:hover {
  --btn-bg: var(--brand-dark);
  --btn-line: var(--brand-dark);
}

.btn-accent {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  --btn-line: var(--accent);
}
.btn-ghost {
  --btn-bg: transparent;
  --btn-line: transparent;
}
.btn-ghost:hover {
  --btn-bg: var(--surface-2);
}
.btn-outline {
  --btn-bg: transparent;
  --btn-line: var(--brand);
  --btn-fg: var(--brand);
}
.btn-danger {
  --btn-fg: var(--error);
  --btn-line: color-mix(in srgb, var(--error) 40%, transparent);
}
.btn-lg {
  padding: 0.85rem 1.7rem;
  font-size: 1.02rem;
}
.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* --- En-tête -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--normal) var(--ease), transform var(--normal) var(--ease);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-2);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.24rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover {
  text-decoration: none;
}
.logo-mark {
  color: var(--brand);
  transition: transform var(--normal) var(--ease-out);
}
.brand:hover .logo-mark {
  transform: translateY(-2px) rotate(-3deg);
}
.brand-plus {
  color: var(--accent);
}

.main-nav {
  display: none;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
.main-nav a {
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  font-weight: 550;
  font-size: 0.94rem;
  text-decoration: none;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.main-nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}
.header-actions .btn-ghost,
.header-actions .btn-primary {
  display: none;
}

.country-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.country-btn:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}
.flag {
  font-size: 1.1rem;
  line-height: 1;
}

.burger {
  flex-direction: column;
  gap: 4px;
}
.burger span {
  display: block;
  width: 19px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--normal) var(--ease), opacity var(--fast) var(--ease);
}
.burger[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.burger[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 900px) {
  .main-nav {
    display: flex;
  }
  .header-actions .btn-ghost,
  .header-actions .btn-primary {
    display: inline-flex;
  }
  .burger {
    display: none;
  }
}

/* Écrans très étroits — beaucoup de téléphones d'entrée de gamme font 320 px.
   On resserre l'en-tête plutôt que de laisser la page déborder. */
@media (max-width: 400px) {
  .header-inner {
    gap: 0.5rem;
  }
  .header-actions {
    gap: 0.1rem;
  }
  .country-btn {
    padding: 0.3rem 0.45rem;
  }
  .country-btn .country-code {
    display: none;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
  }
  .brand {
    font-size: 1.08rem;
    gap: 0.35rem;
  }
  .logo-mark {
    width: 26px;
    height: 26px;
  }
  .avatar {
    width: 34px;
    height: 34px;
  }
}

/* Menu mobile */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 45;
  background: var(--surface);
  padding: 1.2rem;
  overflow-y: auto;
  animation: slideDown var(--normal) var(--ease-out);
}
.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.mobile-nav a {
  padding: 0.9rem 0.6rem;
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.mobile-nav .btn {
  margin-top: 1rem;
  border-bottom: none;
}

/* Barre de quota */
.quota-bar {
  background: var(--brand-light);
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}
.quota-bar.is-low {
  background: var(--accent-light);
}
.quota-bar.is-empty {
  background: color-mix(in srgb, var(--error) 12%, var(--surface));
}
.quota-inner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem 0;
}
.quota-track {
  flex: 0 0 90px;
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  overflow: hidden;
}
.quota-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
  transition: width var(--slow) var(--ease-out);
}
.is-low .quota-fill {
  background: var(--accent);
}
.is-empty .quota-fill {
  background: var(--error);
}
.quota-text {
  color: var(--ink-2);
}

/* Menu utilisateur */
.user-menu {
  position: relative;
}
.avatar-btn {
  position: relative;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  object-fit: cover;
  transition: transform var(--fast) var(--ease);
}
.avatar-btn:hover .avatar {
  transform: scale(1.06);
}
.badge-pro {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  border: 2px solid var(--surface);
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  min-width: 250px;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3);
  display: flex;
  flex-direction: column;
  animation: popIn var(--fast) var(--ease-out);
  z-index: 60;
}
.menu-panel a {
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 550;
}
.menu-panel a:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}
.menu-panel a.is-admin {
  color: var(--accent);
}
.menu-panel hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0.4rem 0.3rem;
}
.menu-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.7rem 0.7rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.3rem;
}
.menu-head .muted {
  font-size: 0.8rem;
}
.plan-chip {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}
.plan-chip.is-free {
  background: var(--surface-3);
  color: var(--ink-3);
}

/* --- Dialogue pays -------------------------------------------------------- */

.country-dialog {
  width: min(94vw, 780px);
  max-height: 86vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.country-dialog::backdrop {
  background: rgba(10, 18, 15, 0.55);
  backdrop-filter: blur(3px);
}
.country-dialog[open] {
  animation: popIn var(--normal) var(--ease-out);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem 0.6rem;
}
.dialog-head h2 {
  margin: 0;
  font-size: 1.2rem;
}
.dialog-search {
  padding: 0 1.3rem 0.8rem;
}
.dialog-search input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
}
.dialog-note {
  margin: 0 1.3rem 0.8rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--ink-2);
  font-size: 0.86rem;
}
.country-groups {
  max-height: 58vh;
  overflow-y: auto;
  padding: 0 1.3rem 1.3rem;
}
.country-group h3 {
  position: sticky;
  top: 0;
  margin: 0.8rem 0 0.4rem;
  padding: 0.35rem 0;
  background: var(--surface);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-3);
}
.country-group ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.country-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 0.92rem;
}
.country-item:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}
.country-item.is-current {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
}
.country-item.is-locked {
  opacity: 0.55;
}
.country-item .lock {
  margin-left: auto;
  font-size: 0.8rem;
}

/* --- Formulaires ---------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.field > label {
  font-size: 0.87rem;
  font-weight: 650;
  color: var(--ink-2);
}
.field .hint {
  font-size: 0.8rem;
  color: var(--ink-3);
}
.field .error-text {
  font-size: 0.82rem;
  color: var(--error);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='url'],
input[type='number'],
input[type='date'],
select,
textarea {
  width: 100%;
  padding: 0.68rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-4);
}
textarea {
  min-height: 130px;
  resize: vertical;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}
input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  cursor: pointer;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  cursor: pointer;
}
.grid-2 {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Cartes et messages --------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.alert {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
}
.alert-body {
  flex: 1;
}
.alert p:last-child {
  margin-bottom: 0;
}
.alert-success {
  background: var(--brand-light);
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
}
.alert-warning {
  background: var(--accent-light);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.alert-error {
  background: color-mix(in srgb, var(--error) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--error) 35%, transparent);
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--ink-3);
}
.empty-art {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-4);
}
.empty-art .logo-mark {
  width: 40px;
  height: 40px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.breadcrumb li + li::before {
  content: '›';
  margin-right: 0.4rem;
  color: var(--ink-4);
}

/* --- Notifications flottantes -------------------------------------------- */

.toaster {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-3);
  animation: toastIn var(--normal) var(--ease-out);
}
.toast.is-out {
  animation: toastOut var(--normal) var(--ease) forwards;
}
.toast.is-error {
  background: var(--error);
  color: #fff;
}
.toast-action {
  margin-left: 0.6rem;
  padding: 0.15rem 0.7rem;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}
.toaster .toast {
  pointer-events: auto;
}

/* --- Pied de page --------------------------------------------------------- */

.site-footer {
  margin-top: 4rem;
  padding: 3rem 0 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1.6fr repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .footer-grid {
    grid-template-columns: 1.8fr repeat(4, 1fr);
  }
}
.footer-brand p {
  color: var(--ink-3);
  max-width: 34ch;
  margin-top: 0.9rem;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.footer-col h3 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-3);
}
.footer-col a,
.footer-countries a {
  color: var(--ink-2);
  font-size: 0.89rem;
}
.footer-countries {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.82rem;
}
.footer-note {
  max-width: 70ch;
}

/* --- Animations ----------------------------------------------------------- */

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes shimmer {
  to {
    background-position: 200% 0;
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Apparition à l'entrée dans l'écran, pilotée par app.js */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--slow) var(--ease-out), transform var(--slow) var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    var(--surface-3) 37%,
    var(--surface-2) 63%
  );
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
