/* ─────────────────────────────────────────
   MLinguistique : Feuille de style globale
   Chargée sur toutes les pages.
   Design tokens en :root : valeurs neutres,
   à affiner lors du cadrage graphique.
   Mobile first.
───────────────────────────────────────── */

:root {
  /* Palette : dérivée du logo client (bleu marine + violet), sobre pour l'instant */
  --ml-primary:        #0f2647;
  --ml-primary-dark:   #081527;
  --ml-primary-light:  #2a4a78;
  --ml-accent:         #661f80;
  --ml-accent-dark:    #4d1760;

  --ml-bg:             #ffffff;
  --ml-bg-alt:         #f5f6f8;
  --ml-bg-dark:        var(--ml-primary);

  --ml-text:           #1c2430;
  --ml-text-mid:       #4a5568;
  --ml-text-dim:       #78828f;
  --ml-text-on-dark:   #f4f6f9;

  --ml-border:         #dfe3e8;
  --ml-border-strong:  #c3cad3;

  /* Hiérarchie typographique */
  --ml-font-base:      system-ui, -apple-system, "Segoe UI", sans-serif;
  --ml-font-heading:   var(--ml-font-base);
  --ml-fs-base:        1rem;
  --ml-fs-sm:          0.875rem;
  --ml-fs-lg:          1.125rem;
  --ml-fs-h1:          clamp(2rem, 5vw, 3rem);
  --ml-fs-h2:          clamp(1.5rem, 3.5vw, 2.25rem);
  --ml-fs-h3:          clamp(1.25rem, 2.5vw, 1.5rem);
  --ml-lh-base:        1.6;
  --ml-lh-heading:     1.2;

  /* Espacements de chrome (header, footer) */
  --ml-space-xs:       0.5rem;
  --ml-space-sm:       1rem;
  --ml-space-md:       1.5rem;
  --ml-space-lg:       2.5rem;
  --ml-space-xl:       4rem;
  --ml-header-h:       72px;
  --ml-container-w:    1200px;
  --ml-radius:         8px;
  --ml-radius-lg:      16px;

  /* Élévations */
  --ml-shadow-sm:      0 1px 3px rgba(15, 38, 71, 0.08);
  --ml-shadow-md:      0 6px 20px rgba(15, 38, 71, 0.12);
  --ml-shadow-lg:      0 16px 40px rgba(15, 38, 71, 0.18);

  --ml-focus-ring:      0 0 0 3px rgba(102, 31, 128, 0.45);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.screen-reader-text:focus {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
}

/* ── Focus visible — accessibilité ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--ml-accent);
  outline-offset: 2px;
}

body.ml-site {
  background: var(--ml-bg);
  font-family: var(--ml-font-base);
  font-size: var(--ml-fs-base);
  line-height: var(--ml-lh-base);
  color: var(--ml-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ml-font-heading);
  line-height: var(--ml-lh-heading);
  color: var(--ml-primary);
  margin: 0 0 var(--ml-space-sm);
}
h1 { font-size: var(--ml-fs-h1); }
h2 { font-size: var(--ml-fs-h2); }
h3 { font-size: var(--ml-fs-h3); }

p { margin: 0 0 var(--ml-space-sm); }

/* ── Conteneur générique ── */
.ml-container {
  width: 100%;
  max-width: var(--ml-container-w);
  margin-inline: auto;
  padding-inline: var(--ml-space-sm);
}

/* ── Skip link ── */
.ml-skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--ml-primary);
  color: var(--ml-text-on-dark);
  padding: var(--ml-space-xs) var(--ml-space-sm);
  z-index: 1000;
}
.ml-skip-link:focus {
  top: 0;
}

/* ── Header chrome ── */
.ml-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ml-bg);
  border-bottom: 1px solid var(--ml-border);
}
.ml-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ml-space-md);
  max-width: var(--ml-container-w);
  margin-inline: auto;
  padding: var(--ml-space-xs) var(--ml-space-sm);
  min-height: var(--ml-header-h);
}
.ml-nav-logo img {
  max-height: 48px;
  width: auto;
}
.ml-nav-links {
  display: none;
  gap: var(--ml-space-md);
}
.ml-nav-burger {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: var(--ml-space-xs);
}
.ml-burger-bar {
  width: 24px;
  height: 2px;
  background: var(--ml-primary);
}

@media (min-width: 900px) {
  .ml-nav-links { display: flex; }
  .ml-nav-burger { display: none; }
}

/* ── Footer chrome ── */
.ml-footer {
  background: var(--ml-primary);
  color: var(--ml-text-on-dark);
  padding: var(--ml-space-xl) 0 var(--ml-space-lg);
}
.ml-footer a { color: var(--ml-text-on-dark); }
.ml-footer-grid {
  display: grid;
  gap: var(--ml-space-lg);
  max-width: var(--ml-container-w);
  margin-inline: auto;
  padding-inline: var(--ml-space-sm);
}
@media (min-width: 700px) {
  .ml-footer-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Boutons ── */
.ml-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--ml-space-xs);
  padding: 0.75em 1.5em;
  border-radius: var(--ml-radius);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
}
.ml-btn-primary {
  background: var(--ml-accent);
  color: #fff;
}
.ml-btn-primary:hover {
  background: var(--ml-accent-dark);
}
.ml-btn-secondary {
  background: transparent;
  border-color: var(--ml-primary);
  color: var(--ml-primary);
}

/* ── Sections génériques ── */
.ml-section {
  padding: var(--ml-space-xl) var(--ml-space-sm);
}
.ml-section-alt {
  background: var(--ml-bg-alt);
}

/* ── Placeholder de listing (zones alimentées plus tard par les CPT) ── */
.ml-listing-placeholder {
  border: 1px dashed var(--ml-border-strong);
  border-radius: var(--ml-radius);
  padding: var(--ml-space-lg);
  text-align: center;
  color: var(--ml-text-dim);
}

/* ── Grilles de cartes (séjours, langues) ── */
.ml-home-sejours-grid,
.ml-langues-grid {
  display: grid;
  gap: var(--ml-space-md);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .ml-home-sejours-grid,
  .ml-langues-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .ml-home-sejours-grid,
  .ml-langues-grid { grid-template-columns: repeat(3, 1fr); }
}
.ml-sejour-card,
.ml-langue-card {
  background: var(--ml-bg);
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius-lg);
  padding: var(--ml-space-md);
  box-shadow: var(--ml-shadow-sm);
}
.ml-sejour-card-img img,
.ml-langue-card-img img {
  border-radius: var(--ml-radius);
  margin-bottom: var(--ml-space-sm);
}

/* ── Zone de listing différée (CPT à venir) ── */
.ml-listing-zone {
  margin-top: var(--ml-space-md);
}

/* ── Page contact ── */
.ml-contact-grid {
  display: grid;
  gap: var(--ml-space-lg);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .ml-contact-grid { grid-template-columns: 3fr 2fr; }
}
.ml-contact-form-card,
.ml-contact-info {
  background: var(--ml-bg);
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius-lg);
  padding: var(--ml-space-lg);
}
.ml-contact-form p { margin-bottom: var(--ml-space-sm); }
.ml-contact-form label { display: block; font-weight: 600; margin-bottom: 0.25em; }
.ml-contact-form input,
.ml-contact-form textarea {
  width: 100%;
  padding: 0.65em 0.85em;
  border: 1px solid var(--ml-border-strong);
  border-radius: var(--ml-radius);
  font: inherit;
}
.ml-field-honeypot { position: absolute; left: -9999px; }
.ml-info-list li {
  padding: var(--ml-space-xs) 0;
  border-bottom: 1px solid var(--ml-border);
}
.ml-info-list li:last-child { border-bottom: none; }
.ml-info-list span {
  display: block;
  font-size: var(--ml-fs-sm);
  color: var(--ml-text-dim);
}

/* ─────────────────────────────────────────
   Éléments de marque : globe et bulles

   Le globe sert de filigrane de section, jamais de contenu : il est
   décoratif, donc invisible pour les lecteurs d'écran. Les bulles
   « Hi », « Hola », « Ciao », « Hallo » sont un rappel de l'univers
   du client, une par langue enseignée. À employer avec parcimonie :
   une ou deux par page, jamais une nuée.
───────────────────────────────────────── */

/* Filigrane du globe. Le SVG lit currentColor, donc la teinte se règle
   par `color` sur le conteneur. */
.ml-watermark {
  position: relative;
  isolation: isolate;
}
.ml-watermark::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block-start: 50%;
  inset-inline-end: -4%;
  translate: 0 -50%;
  inline-size: min(52vw, 460px);
  aspect-ratio: 311 / 334;
  background-color: currentColor;
  -webkit-mask: url('../img/globe.svg') no-repeat center / contain;
          mask: url('../img/globe.svg') no-repeat center / contain;
  color: var(--ml-accent);
  opacity: 0.06;
  pointer-events: none;
}

/* Sur fond sombre, le filigrane doit s'éclaircir, pas s'assombrir. */
.ml-watermark.is-on-dark::before {
  color: #fff;
  opacity: 0.08;
}

/* Bulles décoratives. Positionnées par le template, animées avec
   parcimonie. Elles sont purement ornementales : le markup doit porter
   aria-hidden="true". */
.ml-bubble {
  position: absolute;
  inline-size: clamp(64px, 9vw, 132px);
  block-size: auto;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  translate: 0 12px;
  rotate: -4deg;
}

/* Apparition douce, puis flottement continu très léger. Le flottement
   démarre après l'entrée pour ne pas la contrarier. Chaque bulle d'une
   même section entre en décalé : les deux délais suivent l'ordre des
   deux animations. */
.ml-bubble.is-visible {
  animation:
    ml-bubble-in 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards,
    ml-bubble-float 6s ease-in-out 900ms infinite;
}
.ml-bubble:nth-of-type(2).is-visible { animation-delay: 140ms, 1040ms; }
.ml-bubble:nth-of-type(3).is-visible { animation-delay: 280ms, 1180ms; }

@keyframes ml-bubble-in {
  from { opacity: 0; translate: 0 12px; rotate: -4deg; scale: 0.94; }
  to   { opacity: 1; translate: 0 0;    rotate: -2deg; scale: 1; }
}
@keyframes ml-bubble-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -7px; }
}

/* Respect du réglage système : aucun mouvement, la bulle reste visible. */
@media (prefers-reduced-motion: reduce) {
  .ml-bubble,
  .ml-bubble.is-visible {
    animation: none;
    opacity: 1;
    translate: 0;
    rotate: -2deg;
  }
}
