/* ═══════════════════════════════════════════════════════════
   LEONIO ADVENTURE : composants UI partagés
   À importer après design-tokens.css.
   ═══════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.55;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
table { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ── Typo utilitaires ── */
.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.02;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50, "WONK" 0;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--text-1);
  font-optical-sizing: auto;
}

h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 400; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 500; }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-family: var(--f-body); font-weight: 700; letter-spacing: -0.005em; line-height: 1.3; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--slate);
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: inline-block;
}

.eyebrow-coral { color: var(--coral); }

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-2);
  line-height: 1.6;
  max-width: 640px;
  font-weight: 400;
}

.italic-serif {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
}

.mono { font-family: var(--f-mono); }

/* ── Layout ── */
.container    { max-width: var(--container);    margin: 0 auto; padding: 0 24px; }
.container-md { max-width: var(--container-md); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: var(--container-sm); margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: var(--container-xs); margin: 0 auto; padding: 0 24px; }

section { padding: clamp(72px, 11vw, 130px) 0; position: relative; }
section.compact { padding: clamp(48px, 7vw, 80px) 0; }
section.bg-soft { background: var(--bg-soft); }
section.bg-accent { background: var(--bg-accent); }
section.bg-dark { background: var(--bg-dark); color: var(--text-on-dark); }
section.bg-dark h1, section.bg-dark h2, section.bg-dark h3, section.bg-dark h4 { color: var(--white); }
section.bg-dark .lead { color: rgba(255,255,255,0.78); }

/* ── Section tag ── */
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  font-family: var(--f-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text-2); margin-bottom: 1.5rem;
  background: var(--white);
}
.section-tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 10px var(--coral-glow);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: var(--r-pill);
  font-family: var(--f-body); font-weight: 700; font-size: 0.95rem;
  transition: var(--tr); text-align: center; line-height: 1; white-space: nowrap;
  letter-spacing: 0;
}

.btn-primary { background: var(--coral); color: var(--white); box-shadow: var(--shadow-coral); }
.btn-primary:hover { background: var(--coral-deep); transform: translateY(-2px); box-shadow: 0 18px 44px var(--coral-glow); }

.btn-secondary { background: var(--marine); color: var(--white); }
.btn-secondary:hover { background: var(--marine-deep); transform: translateY(-2px); box-shadow: var(--shadow-marine); }

.btn-ghost { background: transparent; color: var(--marine); border: 1.5px solid var(--marine); }
.btn-ghost:hover { background: var(--marine); color: var(--white); }

.btn-ghost-light { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.4); }
.btn-ghost-light:hover { background: var(--white); color: var(--marine); border-color: var(--white); }

.btn-link { color: var(--marine); padding: 0; border-radius: 0; }
.btn-link:hover { color: var(--coral); }

.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-lg { padding: 18px 32px; font-size: 1rem; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--tr);
}
.card-flat { box-shadow: none; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }

/* ── Pills / chips ── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--bg-accent); color: var(--marine);
  font-family: var(--f-mono); font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.pill-coral { background: var(--coral); color: var(--white); }
.pill-glacier { background: var(--glacier); color: var(--marine-ink); }
.pill-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--text-2); }
.pill-warning { background: rgba(214,158,46,0.16); color: var(--warning); }

/* ── Form ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field-label {
  font-family: var(--f-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em;
  font-weight: 700; color: var(--text-2);
}
.field-hint { font-size: 0.82rem; color: var(--text-3); }

.input, .textarea, .select {
  width: 100%;
  padding: 13px 16px;
  background: var(--white);
  color: var(--text-1);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  transition: var(--tr-fast);
  font-family: var(--f-body);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--marine); box-shadow: 0 0 0 3px rgba(10, 37, 64,0.12);
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.5; }

.checkbox-row, .radio-row {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  cursor: pointer; transition: var(--tr-fast); font-size: 0.92rem;
}
.checkbox-row:hover, .radio-row:hover { border-color: var(--slate); }
.checkbox-row input, .radio-row input { accent-color: var(--marine); }
.checkbox-row[data-checked="true"], .radio-row[data-checked="true"] {
  border-color: var(--marine); background: var(--mist);
}

/* ── Navigation top ── */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 248, 251, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.topnav-brand { display: flex; align-items: center; gap: 12px; }
.topnav-logo {
  height: 36px; display: block;
}

/* ── Logo wordmark : halo bleu glacial, plus de pastille blanche ── */
.la-logo-pill {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.la-logo-pill img {
  display: block; height: 44px; width: auto;
  filter: drop-shadow(0 0 3px rgba(0, 168, 200, 0.9)) drop-shadow(0 0 10px rgba(0, 168, 200, 0.5));
}
.la-logo-pill.la-logo-pill-sm img { height: 34px; }
.la-logo-pill.la-logo-pill-lg img { height: 64px; }
.la-logo-pill.la-logo-pill-xl img { height: 92px; }
.la-logo-pill.la-logo-pill-hero img { height: 140px; }
/* Variante fond sombre : halo glacial plus large pour détacher le logo blanc */
.la-logo-pill-on-dark img {
  filter: drop-shadow(0 0 4px rgba(0, 168, 200, 0.95)) drop-shadow(0 0 14px rgba(0, 168, 200, 0.6));
}

.topnav-links { display: flex; align-items: center; gap: 28px; }
.topnav-links a { color: var(--text-2); font-weight: 500; font-size: 0.94rem; transition: var(--tr-fast); }
.topnav-links a:hover { color: var(--marine); }
.topnav-cta { display: flex; align-items: center; gap: 10px; }

@media (max-width: 880px) {
  .topnav-links { display: none; }
}

/* ── Footer ── */
.footer {
  background: var(--marine-deep);
  color: rgba(255,255,255,0.78);
  padding: 64px 0 32px;
  font-size: 0.9rem;
}
.footer a { color: rgba(255,255,255,0.78); transition: var(--tr-fast); }
.footer a:hover { color: var(--white); }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 48px;
}
.footer-col h5 {
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--glacier); font-weight: 700; margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 0.82rem; color: rgba(255,255,255,0.55);
}
.footer-poweredby {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.footer-poweredby .pastille {
  background: var(--white); padding: 6px 12px; border-radius: 10px;
}
.footer-poweredby .pastille img { height: 16px; display: block; }

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Grids utilitaires ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Texture marine de fond (utilisable en section) ── */
.bg-marine-wave {
  background:
    radial-gradient(ellipse at 18% 0%, rgba(0, 168, 200,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 82% 100%, rgba(255, 77, 46,0.10) 0%, transparent 55%),
    linear-gradient(180deg, var(--sand) 0%, var(--sand-soft) 100%);
}

/* ── Helpers ── */
.text-marine { color: var(--marine); }
.text-coral  { color: var(--coral); }
.text-slate  { color: var(--slate); }
.text-pebble { color: var(--pebble); }
.text-muted  { color: var(--text-3); }
.bg-white-soft { background: var(--white); }
.center-text { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }

/* ── Toast simple ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--marine); color: var(--white);
  padding: 14px 22px; border-radius: var(--r-pill); font-weight: 600; font-size: 0.92rem;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: var(--tr);
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.coral { background: var(--coral); }
.toast.success { background: var(--ok); }

/* ═══════════════════════════════════════════════════════════
   PASS MOBILE GLOBALE (transverse à toutes les pages)
   ═══════════════════════════════════════════════════════════ */

/* Sur mobile, iOS Safari zoome automatiquement quand on tape dans
   un champ dont la taille de police est inférieure à 16px. On force
   donc 16px sur tous les champs en dessous de 768px : la mise en
   page visuelle reste compacte (le padding des pages est conservé),
   mais le focus ne déclenche plus de zoom intempestif. */
@media (max-width: 768px) {
  input, select, textarea,
  .input, .textarea, .select {
    font-size: 16px;
  }
}

/* Garde-fou anti-débordement horizontal : aucune image/média ne
   peut élargir la page au-delà de l'écran. */
img, picture, video, canvas, svg, iframe { max-width: 100%; }
