/* ==========================================================================
   MyPC — accueil général (refonte « C mixte », validée le 7 octobre 2026)
   Source : maquettes/c-mixte/style.css, réduite aux règles qu'utilise
   site/index.html : base, boutons sur fond sombre, section « Accueil
   général » et mouvement réduit. Les pages particuliers ont leur propre
   feuille (site/particuliers/assets/style.css), car chaque dossier est
   publié comme une racine indépendante.
   Règle : aucune couleur ni taille écrite en dur, tout vient de tokens.css.
   Mobile d'abord. Seuils : 40em (640 px), 48em (768 px), 64em (1024 px).
   Classes posées par assets/site.js : .has-video (sur <html>, quand la
   vidéo joue), .is-paused (bouton pause / lecture).
   ========================================================================== */

/* --- 1. Base ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--c-fond);
  color: var(--c-texte);
  font-family: var(--police-texte);
  font-size: var(--fs-2);
  font-weight: var(--graisse-normale);
  line-height: var(--lh-texte);
  font-kerning: normal;
  overflow-wrap: break-word;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--police-titre);
  font-weight: var(--graisse-forte);
  line-height: var(--lh-titre);
  color: var(--c-marque);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }

a {
  color: var(--c-marque);
  text-decoration-thickness: var(--trait-fin);
  text-underline-offset: var(--soulignement-decalage);
}
a:hover { text-decoration-thickness: var(--trait-moyen); }

:focus-visible {
  outline: var(--focus-largeur) solid var(--c-focus);
  outline-offset: var(--focus-decalage);
}

/* Zone sombre (vidéo) : l'anneau passe à l'orange du logo */
.home { --c-focus: var(--c-focus-inverse); }

.sr-only {
  position: absolute;
  width: var(--trait-fin);
  height: var(--trait-fin);
  margin: calc(var(--trait-fin) * -1);
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Lien d'évitement : pastille marine ; au focus, anneau orange
   (visible sur le blanc comme sur la vidéo). */
.skip-link {
  position: absolute;
  inset-inline-start: var(--esp-4);
  top: var(--esp-2);
  z-index: var(--z-evitement);
  padding: var(--esp-2) var(--esp-4);
  background: var(--c-marque);
  color: var(--c-texte-inverse);
  border-radius: var(--rayon-2);
  font-weight: var(--graisse-forte);
  transform: translateY(calc(-100% - var(--esp-4)));
}
.skip-link:focus {
  --c-focus: var(--c-focus-inverse);
  transform: none;
  color: var(--c-texte-inverse);
}

.container {
  width: 100%;
  max-width: calc(var(--conteneur) + 2 * var(--gouttiere-large));
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}
@media (min-width: 48em) {
  .container { padding-inline: var(--gouttiere-large); }
}

.icon {
  width: var(--icone-1);
  height: var(--icone-1);
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icone-trait);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--lg { width: var(--icone-2); height: var(--icone-2); }

/* --- 3. Boutons (pilules de A, sans relief) ---------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--esp-2);
  min-height: var(--cible-tactile);
  padding: var(--esp-2) var(--esp-5);
  border: var(--trait-moyen) solid transparent;
  border-radius: var(--rayon-pilule);
  background: transparent;
  color: var(--c-marque);
  font-family: var(--police-texte);
  font-size: var(--fs-2);
  font-weight: var(--graisse-forte);
  line-height: var(--lh-titre);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duree) var(--courbe),
    border-color var(--duree) var(--courbe),
    color var(--duree) var(--courbe),
    transform var(--duree) var(--courbe);
}
.btn:hover { text-decoration: none; }

/* Secondaire sur image ou fond sombre : contour blanc */
.btn--on-dark { background: transparent; color: var(--c-texte-inverse); border-color: var(--c-bordure-inverse); }
.btn--on-dark:hover { background: var(--c-survol-inverse); border-color: var(--c-texte-inverse); color: var(--c-texte-inverse); }
.btn--on-dark:active { background: var(--c-separateur-inverse); transform: translateY(var(--trait-fin)); }

/* Petit format (liens Cloud, bouton vidéo) */
.btn--sm {
  padding-inline: var(--esp-4);
  border-width: var(--trait-fin);
  font-size: var(--fs-1);
  font-weight: var(--graisse-moyenne);
}

/* --- 4. Accueil général : vidéo + choix, tout tient dans un écran ------------ */
.page-home { background: var(--c-marque-fonce); }

.home {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: var(--hauteur-ecran-repli);
  background: var(--c-marque-fonce) url("media/colibri-demo-video-cover-d2e1e0ea.jpg") center / cover no-repeat;
  color: var(--c-texte-inverse);
  overflow: hidden;
}
@supports (min-height: 100svh) {
  .home { min-height: var(--hauteur-ecran); }
}
.home__video {
  position: absolute;
  inset: 0;
  z-index: var(--z-video);
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
/* Voile uniforme sur mobile ; dégradé radial au-delà (A) : 80 % au centre
   sous le texte, 65 % au minimum sur les bords. */
.home__veil { position: absolute; inset: 0; z-index: var(--z-voile); background: var(--c-voile-fort); }
@media (min-width: 48em) {
  .home__veil { background: var(--voile-video); }
}

.home__main {
  display: grid;
  place-items: center;
  padding-block: var(--esp-8) var(--esp-6);
  text-align: center;
}
.home__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo long sur enseigne blanche (disposition B, cadre de A) */
.sign {
  display: inline-block;
  max-width: 100%;
  margin-bottom: var(--esp-7);
  padding: var(--esp-3) var(--esp-5);
  background: var(--c-fond);
  border-radius: var(--rayon-3);
  box-shadow: var(--ombre-2);
}
.sign img { width: var(--largeur-enseigne); }

.home__title {
  color: var(--c-texte-inverse);
  font-size: var(--fs-6);
  line-height: var(--lh-serre);
}
.home__lead {
  margin-top: var(--esp-4);
  color: var(--c-texte-inverse-2);
  font-size: var(--fs-3);
}

.choice {
  display: grid;
  gap: var(--esp-4);
  width: 100%;
  max-width: var(--largeur-choix);
  margin-top: var(--esp-7);
  text-align: start;
}
.choice__link {
  display: flex;
  align-items: center;
  gap: var(--esp-4);
  min-height: calc(var(--cible-tactile) + var(--esp-5));
  padding: var(--esp-3) var(--esp-5) var(--esp-3) var(--esp-3);
  background: var(--c-fond);
  color: var(--c-marque);
  border: var(--trait-fin) solid var(--c-bordure);
  border-radius: var(--rayon-3);
  box-shadow: var(--ombre-2);
  font-family: var(--police-titre);
  font-size: var(--fs-4);
  font-weight: var(--graisse-forte);
  line-height: var(--lh-titre);
  text-decoration: none;
  transition: transform var(--duree) var(--courbe), border-color var(--duree) var(--courbe);
}
.choice__tile {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--pastille);
  height: var(--pastille);
  border-radius: var(--rayon-2);
  background: var(--c-accent-pale);
  color: var(--c-marque);
}
.choice__link .icon--arrow { margin-inline-start: auto; transition: transform var(--duree) var(--courbe); }
.choice__link:hover {
  color: var(--c-marque);
  border-color: var(--c-bordure-forte);
  transform: translateY(calc(var(--esp-1) * -1));
}
.choice__link:hover .icon--arrow { transform: translateX(var(--esp-1)); }
.choice__link:active { transform: none; background: var(--c-surface); }

/* Liens Cloud sous un filet clair (A) */
.cloud-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--esp-3);
  margin-top: var(--esp-6);
  padding-top: var(--esp-5);
  border-top: var(--trait-fin) solid var(--c-separateur-inverse);
}

/* Pied de l'accueil : posé sur la vidéo, en bas du même écran (B).
   Blanc sur le voile léger : 5,2:1 au pire cas (pixel blanc dessous). */
.home__footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--esp-3);
  min-height: calc(var(--cible-tactile) + 2 * var(--esp-4));
  padding: var(--esp-4) var(--gouttiere);
  color: var(--c-texte-inverse);
  font-size: var(--fs-1);
}
/* Bouton pause / lecture (WCAG 2.2.2), visible seulement quand la vidéo joue.
   Son propre fond de voile fort le garde lisible au bord de l'écran. */
.video-toggle { display: none; background: var(--c-voile-fort); }
.video-toggle:hover { background: var(--c-marque-fonce); }
.has-video .video-toggle { display: inline-flex; }
.video-toggle .icon--play { display: none; }
.video-toggle.is-paused .icon--pause { display: none; }
.video-toggle.is-paused .icon--play { display: block; }

@media (min-width: 40em) {
  .choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 48em) {
  .home__footer { padding-inline: var(--gouttiere-large); }
  .has-video .video-toggle { position: absolute; inset-inline-end: var(--gouttiere-large); }
}
@media (min-width: 64em) {
  .home__title { font-size: var(--fs-7); }
  .home__lead { font-size: var(--fs-4); }
  .choice__link { font-size: var(--fs-5); }
}

/* --- 15. Mouvement réduit ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  .btn:active,
  .choice__link:hover { transform: none; }
  .choice__link:hover .icon--arrow { transform: none; }
  .home__video, .video-toggle, .has-video .video-toggle { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
