/* Site vitrine HEKIMA — mise en page inspirée d'ello.com, couleurs et polices de l'app HEKIMA. */
:root {
  --fond: #f1f6f8;
  --carte: #ffffff;
  --titre: #17394a;
  --texte: #34505e;
  --doux: #5f7783;
  --encre: #1c1b22;
  --jaune: #ffc857;
  --jaune-fonce: #e9a92c;
  --lagon: #13897f;
  --lagon-fonce: #0d6a62;
  --corail: #f2766b;
  --menthe: #d6f0e6;
  --lavande: #e4defc;
  --bleu-pale: #dfe7ff;
  --corail-pale: #fde0dc;
  --jaune-pale: #fff1cc;
  --rayon: 28px;
  --ombre: 0 18px 40px rgba(23, 57, 74, 0.08);
  --titre-police: "Fredoka", "Nunito", system-ui, sans-serif;
  --texte-police: "Nunito", system-ui, sans-serif;
  /* Marge latérale : 16 px sur téléphone, jusqu'à 72 px sur grand écran */
  --marge: clamp(16px, 4vw, 72px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--texte-police);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--lagon-fonce);
}

h1,
h2,
h3 {
  font-family: var(--titre-police);
  color: var(--titre);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}

h2 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1em;
}

.evitement {
  position: absolute;
  left: -9999px;
}

.evitement:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--carte);
  padding: 8px 16px;
  border-radius: 12px;
}

:focus-visible {
  outline: 3px solid var(--lagon);
  outline-offset: 3px;
}

/* Mot surligné, comme les mots en couleur des titres d'Ello */
.surligne {
  display: inline-block;
  padding: 0 0.18em;
  border-radius: 0.2em;
  background: var(--jaune);
  color: var(--encre);
  transform: rotate(-2deg);
}

/* Mot du titre qui change (lire, écrire…), comme les mots animés d'Ello */
.mot-tournant {
  display: block;
  white-space: nowrap;
  margin-top: 0.08em;
}

.mot-tournant .surligne {
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.mot-tournant .surligne.sort {
  opacity: 0;
  transform: rotate(-2deg) translateY(0.3em);
}

.visuellement-cache {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.surligne-corail {
  background: var(--corail);
  color: #fff;
}

/* Boutons en pilule, avec un bord bas comme une touche */
.bouton {
  display: inline-block;
  font-family: var(--titre-police);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--encre);
  background: var(--jaune);
  border-radius: 14px;
  padding: 14px 28px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--jaune-fonce);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.bouton:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--jaune-fonce);
}

.bouton:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--jaune-fonce);
}

.bouton-petit {
  font-size: 1rem;
  padding: 10px 20px;
}

.bouton-lagon {
  background: var(--lagon);
  color: #fff;
  box-shadow: 0 4px 0 var(--lagon-fonce);
}

.bouton-lagon:hover {
  box-shadow: 0 6px 0 var(--lagon-fonce);
}

.sous-bouton {
  margin-top: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--titre);
}

.etiquette {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lagon-fonce);
}

.source {
  font-size: 0.82rem;
  color: var(--doux);
}

/* Barre flottante */
.barre {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: calc(100% - 2 * var(--marge));
  max-width: 1760px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: var(--ombre);
}

.marque {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--titre-police);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--titre);
}

.marque img {
  border-radius: 10px;
}

.barre-liens {
  display: none;
  gap: 28px;
}

.barre-liens a {
  color: var(--titre);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.barre-liens a:hover {
  color: var(--lagon);
}

/* 1. Accueil */
.accueil {
  position: relative;
  padding: 104px 16px 0;
  text-align: center;
}

.accueil-texte {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

.chapeau {
  font-size: 1.15rem;
  color: var(--texte);
  margin-bottom: 1.4em;
}

.accueil-image video {
  display: block;
  width: 100%;
  margin-top: 28px;
  border-radius: var(--rayon);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 72% 60%;
}

/* Les objets flottants dépassent volontairement des cartes : pas de défilement horizontal */
main {
  overflow-x: clip;
}

/* Sections */
.section {
  padding: 72px 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.centre {
  text-align: center;
}

.intro {
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 1.1rem;
}

.carte {
  background: var(--carte);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 28px 24px;
}

/* 2. Tablette */
.tablette-scene {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0 8px;
}

.tablette {
  background: var(--titre);
  padding: 14px;
  border-radius: 34px;
  box-shadow: 0 30px 60px rgba(23, 57, 74, 0.18);
  transform: rotate(1.5deg);
}

.tablette img {
  border-radius: 22px;
}

.tablette-maki {
  position: absolute;
  width: 26%;
  left: -6%;
  bottom: 8%;
  filter: drop-shadow(0 12px 18px rgba(23, 57, 74, 0.2));
}

.flotte {
  position: absolute;
  width: 18%;
  animation: flotter 6s ease-in-out infinite;
}

.flotte-gauche {
  left: -14%;
  top: -12%;
}

.flotte-droite {
  right: -12%;
  top: 40%;
  animation-delay: -3s;
}

.tablette-scene figcaption {
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--doux);
}

@keyframes flotter {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-14px) rotate(3deg);
  }
}

/* Grande carte texte + image */
.carte-large {
  display: grid;
  gap: 24px;
  align-items: center;
  background: var(--carte);
  border-radius: 36px;
  box-shadow: var(--ombre);
  padding: 32px 24px;
  overflow: hidden;
}

.carte-large-image {
  border-radius: 24px;
}

.citation {
  font-family: var(--titre-police);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--titre);
  border-left: 5px solid var(--jaune);
  padding-left: 14px;
}

.carte-large .source {
  margin-top: 18px;
}

/* 3. Activités */
.grille-activites,
.grille-garde-fous {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  text-align: left;
}

.grille-activites p,
.grille-garde-fous p {
  margin: 0;
}

.pastille {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 22px;
  margin-bottom: 16px;
  color: var(--titre);
  overflow: hidden;
}

.pastille img {
  width: 92%;
  margin-top: 10%;
}

.pastille-jaune {
  background: var(--jaune);
}

.pastille-corail {
  background: var(--corail);
}

.pastille-menthe {
  background: var(--menthe);
}

.pastille-lavande {
  background: var(--lavande);
}

.pastille-bleu {
  background: var(--bleu-pale);
}

/* 4. Chiffres */
.bande-chiffres {
  background: var(--titre);
  color: #e6f1f4;
  border-radius: 36px;
  padding: 48px 24px;
}

.bande-chiffres h2 {
  color: #fff;
  text-align: center;
}

.chiffres {
  display: grid;
  gap: 32px;
  margin-top: 24px;
}

.nombre {
  font-family: var(--titre-police);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 4rem);
  line-height: 1;
  color: var(--jaune);
  margin-bottom: 12px;
}

.bande-chiffres .source {
  color: #a9c4cd;
}

/* 5. Garde-fous */
.carte-texte h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.carte-texte h3::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--jaune);
  box-shadow: 0 0 0 5px var(--jaune-pale);
}

/* 6. Retours */
.retours {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  background: var(--carte);
  border-radius: 36px;
  box-shadow: var(--ombre);
  padding: 48px 24px 36px;
}

.nombre-grand {
  color: var(--lagon);
  font-size: clamp(3.4rem, 10vw, 5.4rem);
  margin: 8px 0 4px;
}

.retours-phrase {
  font-family: var(--titre-police);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--titre);
}

.flotte-livre {
  position: absolute;
  width: 110px;
  right: -12px;
  top: -48px;
  animation: flotter 7s ease-in-out infinite;
}

/* 7. Équipe */
.grille-equipe {
  display: grid;
  gap: 20px;
  text-align: left;
}

.personne img {
  border-radius: 20px;
  margin-bottom: 16px;
}

.personne > img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 50%;
}

.role {
  font-weight: 800;
  color: var(--lagon-fonce);
  margin-top: -6px;
}

.logo-rond {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--fond);
  margin-bottom: 16px;
}

.logo-rond img {
  width: 56px;
  margin: 0;
  border-radius: 0;
}

/* 8. Parrainage */
.carte-parrain {
  background: var(--jaune-pale);
}

.parrain-maki {
  width: 220px;
  margin: 0 auto;
}

/* 9. Questions */
.faq {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--carte);
  border-radius: 20px;
  box-shadow: var(--ombre);
  padding: 4px 24px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--titre-police);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--titre);
  padding: 16px 32px 16px 0;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--lagon);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  padding-bottom: 8px;
}

/* 10. Bandeau final */
.bandeau {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--ombre);
  background: #cfeefc;
}

.bandeau video {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 360px;
  object-fit: cover;
  object-position: 70% 50%;
}

.bandeau-texte {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
  padding: 40px 16px;
}

.bandeau-texte h2 {
  text-shadow: 0 2px 16px rgba(255, 255, 255, 0.9);
}

/* Pastille claire : lisible quel que soit le décor derrière (collines, lagon) */
.bandeau .sous-bouton {
  justify-self: center;
  margin-top: 14px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 12px rgba(23, 57, 74, 0.12);
}

/* Pied de page */
.pied {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 16px 56px;
  border-top: 1px solid #d5e2e7;
  font-size: 0.92rem;
  color: var(--doux);
}

.pied-haut {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.pied-liens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.pied-liens a {
  color: var(--titre);
  font-weight: 700;
  text-decoration: none;
}

.pied-note {
  font-size: 0.82rem;
}

/* Mentions légales */
.legal {
  max-width: 760px;
  padding-top: 120px;
}

.legal h2 {
  font-size: 1.4rem;
  margin-top: 1.6em;
}

/* Téléphone : les objets flottants restent dans l'écran */
@media (max-width: 699px) {
  .tablette-maki {
    left: -2%;
    bottom: 22%;
    width: 24%;
  }

  .flotte-gauche {
    left: 0;
    top: -16%;
  }

  .flotte-droite {
    right: 0;
  }

  .flotte-livre {
    right: 4px;
    width: 88px;
  }
}

/* Tablette et ordinateur */
@media (min-width: 700px) {
  .grille-activites {
    grid-template-columns: repeat(2, 1fr);
  }

  .grille-garde-fous,
  .chiffres {
    grid-template-columns: repeat(3, 1fr);
  }

  .grille-equipe {
    grid-template-columns: repeat(2, 1fr);
    max-width: 860px;
    margin: 0 auto;
  }

  .bande-chiffres {
    padding: 64px 48px;
  }
}

@media (min-width: 900px) {
  .barre-liens {
    display: flex;
  }

  /* Accueil comme sur ello.com : le texte centré au-dessus, l'image en pleine largeur dessous */
  .accueil {
    padding: 120px 0 0;
  }

  .accueil-texte {
    max-width: 880px;
  }

  .accueil h1 {
    font-size: clamp(2.6rem, 4.2vw, 3.8rem);
  }

  .accueil .chapeau {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }

  .accueil-image {
    position: relative;
    z-index: 0; /* le fondu reste sous le texte */
    margin-top: -64px;
  }

  /* Le haut du salon se fond dans le fond de page, sous le texte */
  .accueil-image::before {
    content: "";
    position: absolute;
    inset: -2px 0 auto; /* déborde de 2 px : pas de liseré au bord haut de la vidéo */
    height: calc(30% + 2px);
    z-index: 1;
    background: linear-gradient(var(--fond), rgba(241, 246, 248, 0));
  }

  .accueil-image video {
    margin: 0;
    border-radius: 0;
    aspect-ratio: 12 / 5;
    max-height: 70vh;
    object-position: 60% 100%;
  }

  .grille-activites {
    grid-template-columns: repeat(3, 1fr);
  }

  .carte-large {
    grid-template-columns: 1fr 1.1fr;
    padding: 48px;
    gap: 48px;
  }

  .carte-parrain {
    grid-template-columns: 0.7fr 1.3fr;
  }

  .parrain-maki {
    width: 100%;
    max-width: 300px;
  }

  .bandeau-texte {
    align-content: center;
    padding: 40px 30%;
  }

  .retours {
    padding: 56px 64px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .flotte,
  .flotte-livre {
    animation: none;
  }

  .bouton {
    transition: none;
  }
}
