/* =====================================================================
   LOJONA STUDIO - base commune a toutes les pages
   Variables, polices, base courte, en-tete, boutons, formes decoratives,
   pied de page et animations. Chaque page charge en plus sa propre feuille.
   ===================================================================== */

/* ---------------------------------------------------------------- polices
   Auto-hebergees, sous-ensemble latin. Fredoka One n'est plus distribuee :
   Fredoka graisse 600 en est la reprise officielle, au dessin identique. */
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- variables
   Palette mesuree sur le logo. Pour changer une couleur, il suffit de
   modifier la valeur ici : toutes les pages suivent. */
:root {
  --rose: #ff9fcd;
  --orange: #ffa28f;
  --rouge: #c90018;
  --sable: #f7e7c1;
  --bleu: #9fcbe0;
  --gris: #5e6a73;

  --blanc: #ffffff;

  /* Couleurs de texte des titres et libelles colores : les teintes exactes
     de la palette, choix de la cliente. Reserve d'accessibilite : sur le
     fond sable, elles n'atteignent qu'environ 1,5:1 (seuil WCAG AA : 3:1
     pour les gros titres, 4,5:1 pour le texte). Variante conforme, si la
     cliente change d'avis : #b4432e, #b0306e et #2f6f8f. */
  --texte-orange: var(--orange);
  --texte-rose: var(--rose);
  --texte-bleu: var(--bleu);

  --degrade-principal: linear-gradient(90deg, var(--orange), var(--rose));
  --degrade-secondaire: linear-gradient(90deg, var(--rose), var(--bleu));

  --police-titre: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --police-texte: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --largeur-zone: 88rem;
  --largeur-etroite: 70rem;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
  --rayon-carte: 1.75rem;
  --trait: 3px;

  }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  /* Les ancres et le focus ne passent jamais sous l'en-tete colle. */
  scroll-padding-top: 7.5rem;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sable);
  color: var(--gris);
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--police-titre);
  font-weight: 600;
  line-height: 1.1;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

/* Le conteneur picture ne sert qu'au choix du format (AVIF ou WebP) :
   il n'intervient pas dans la mise en page. */
picture {
  display: contents;
}

img {
  height: auto;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--rouge);
  outline-offset: 3px;
  border-radius: 4px;
}

.contenu-principal:focus {
  outline: none;
}

/* ---------------------------------------------------------------- utilitaires */
.hors-ecran {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.lien-evitement {
  position: absolute;
  top: -10rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--rouge);
  color: var(--sable);
  font-family: var(--police-titre);
  text-decoration: none;
}

.lien-evitement:focus {
  top: 1rem;
}

.zone {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--largeur-zone);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.zone-etroite {
  max-width: var(--largeur-etroite);
}

.lien-texte {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.lien-texte:hover {
  color: var(--rouge);
}

.a-valider {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border: 2px solid var(--rouge);
  border-radius: 0.4rem;
  color: var(--rouge);
  font-family: var(--police-titre);
}

/* ---------------------------------------------------------------- en-tete
   Pilule flottante, collee en haut de l'ecran au defilement. */
.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1.1rem var(--gouttiere) 0;
}

.entete-pilule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: 71.25rem;
  margin-inline: auto;
  padding: 0.6rem 0.75rem 0.6rem 1.75rem;
  border: 2px solid rgb(255 162 143 / 0.55);
  border-radius: 2.5rem;
  background: var(--sable);
  box-shadow: 0 6px 10px -2px rgb(255 162 143 / 0.6);
}

.entete-logo {
  display: block;
  border-radius: 0.5rem;
}

.logo {
  width: clamp(9.5rem, 16vw, 13.75rem);
}

.entete-bascule {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 2px solid var(--orange);
  border-radius: 50%;
  background: transparent;
  color: var(--gris);
  cursor: pointer;
}

.entete-bascule[hidden] {
  display: none;
}

.entete-bascule .icone {
  width: 1.4rem;
  height: 1.4rem;
}

.navigation {
  flex-basis: 100%;
}

.navigation[data-replie] {
  display: none;
}

.navigation-liste {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.5rem 0 0.75rem;
}

.navigation-lien {
  display: inline-block;
  padding: 0.5rem 0.25rem;
  color: var(--gris);
  font-family: var(--police-titre);
  font-size: 1.25rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.navigation-lien:hover {
  color: var(--rouge);
}

.navigation-lien[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

@media (min-width: 64em) {
  .entete-bascule,
  .entete-bascule[hidden] {
    display: none;
  }

  .navigation,
  .navigation[data-replie] {
    display: block;
    flex-basis: auto;
  }

  .navigation-liste {
    flex-direction: row;
    align-items: center;
    gap: 1.6rem;
    padding: 0;
  }

  .navigation-lien {
    padding: 0.35rem 0;
  }
}

/* ---------------------------------------------------------------- boutons */
.groupe-boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--degrade-principal);
  color: var(--blanc);
  font-family: var(--police-titre);
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.bouton:hover {
  transform: translateY(-3px) rotate(-1.5deg);
  box-shadow: 0 8px 16px -6px rgb(201 0 24 / 0.35);
}

.bouton:active {
  transform: translateY(0) scale(0.97);
}

/* Action secondaire : degrade rose vers bleu de la maquette. */
.bouton-secondaire {
  background: var(--degrade-secondaire);
}

.bouton-entete {
  min-height: 2.75rem;
  padding: 0.5rem 1.3rem;
}

/* ---------------------------------------------------------------- decors
   Bulles, etoiles et vagues : purement decoratives, masquees aux lecteurs
   d'ecran, et fixes. */
.bulle {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

.etoile {
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  color: var(--orange);
}

.vague {
  position: relative;
  z-index: 1;
  width: 100%;
  height: clamp(2.5rem, 6vw, 5.5rem);
  color: var(--rouge);
}

/* Vague posee sur le bas du hero : elle remonte sur la photo, et l'aplat
   sable sous le trait la masque, comme si le trait la coupait. */
.vague-coupe {
  z-index: 3;
  margin-top: calc(-1 * clamp(2.5rem, 6vw, 5.5rem) + 1px);
}

.vague-masque {
  fill: var(--sable);
}

/* ---------------------------------------------------------------- titres de section */
.titre-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--texte-orange);
  font-size: clamp(2rem, 3.4vw, 3rem);
  text-align: center;
}

.titre-section .etoile {
  width: 1.25em;
  height: 1.25em;
}

/* ---------------------------------------------------------------- pied de page */
.pied {
  position: relative;
  z-index: 1;
  padding: 2.5rem 0 3rem;
  border-top: var(--trait) solid var(--rouge);
  background: var(--sable);
}

.pied-grille {
  display: grid;
  gap: 2rem;
}

.pied-logo {
  width: clamp(11rem, 18vw, 21rem);
}

.pied-texte {
  max-width: 34rem;
  margin-top: 1.25rem;
  line-height: 1.25;
  font-size: 1.125rem;
}

.pied-liste {
  display: grid;
  gap: 0.4rem;
}

.pied-lien {
  display: inline-block;
  padding: 0.2rem 0;
  color: var(--gris);
  font-size: 1.2rem;
  text-decoration: none;
}

.pied-lien:hover {
  color: var(--rouge);
}

.pied-lien[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: 0.3em;
}

.pied-coordonnees {
  display: grid;
  gap: 0.75rem;
}

.pied-coordonnees-ligne {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pied-coordonnees-pastille {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
}

.pied-coordonnees-pastille .icone {
  width: 1.4rem;
  height: 1.4rem;
}

.pied-coordonnees-lien {
  color: var(--texte-orange);
  font-family: var(--police-titre);
  font-size: 1.2rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.pied-coordonnees-lien:hover {
  color: var(--rouge);
}

.pied-note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.pied-mention {
  margin-top: 2.5rem;
  font-size: 1.05rem;
}

@media (min-width: 48em) {
  .pied-grille {
    grid-template-columns: 1fr auto;
  }

  .pied-marque {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64em) {
  .pied-grille {
    grid-template-columns: 1fr auto auto;
    column-gap: clamp(3rem, 7vw, 7rem);
  }

  .pied-marque {
    grid-column: auto;
  }

  .pied-liste {
    gap: 0.55rem;
  }
}

/* ---------------------------------------------------------------- apparitions
   Le script ne masque que ce qui se trouve sous la ligne de flottaison au
   chargement : sans JavaScript, tout le contenu reste visible. */
.revele {
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.revele.est-cache {
  opacity: 0;
  transform: translateY(2rem);
}

.apparition {
  animation: monte 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.apparition + .apparition {
  animation-delay: 0.15s;
}


/* Mouvement seul : le texte du premier ecran reste lisible des le premier
   rendu, sans dependre de la fin de l'animation. */
@keyframes monte {
  from {
    transform: translateY(1.25rem);
  }
  to {
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }

  .revele.est-cache {
    opacity: 1;
    transform: none;
  }
}
