/* accueil.css — page d'accueil Charathèque (voir ../DESIGN.md, v2).
 * Idée : la famille de logiciels EST le visuel. Titre très grand, puis tuiles teintées par logiciel.
 * Classes « ac- » : aucune collision avec site.css. Pas de dégradé, pas d'ombre. */

/* ===================== HÉROS ===================== */
/* Bandeau TURQUOISE CLAIR uni (la page turquoise du logo, adoucie pour la lisibilité) sous un en-tête blanc ;
 * les tuiles chevauchent son bas. Orange = boutons seulement. */
.ac-hero { --bande: color-mix(in srgb, var(--turquoise) 20%, #fff); background: var(--bande); overflow-x: clip; /* rogne seulement au bord de l'écran, pas la pile */ padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px); }
.ac-hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.ac-h1 {
  font-family: var(--display); font-weight: 700; color: var(--encre);
  font-size: clamp(44px, 6.4vw, 92px); line-height: .98; letter-spacing: -.035em; margin: 0;
}
.ac-h1-b { color: var(--turquoise-2); }
.ac-sous {
  font-size: clamp(19px, 2.1vw, 26px); line-height: 1.35; color: #3d4a50;
  margin: 18px 0 0; max-width: 40ch;
}
/* Sous-titre DANS le h1 (référencement, 30/11) : même rendu que l'ancien paragraphe. */
.ac-h1 .ac-sous { display: block; font-family: var(--police); font-weight: 400; letter-spacing: normal; }

/* ——— Pile d'aperçus inclinée en 3D (référence : héros Steno.ai) ———
 * Chaque carte reçoit --i (0 = devant). Les suivantes reculent en haut à droite ; au-delà de 3, invisibles.
 * js/pile.js fait tourner --i toutes les ~3 s. */
.ac-scene { perspective: 1600px; padding: 48px 72px 24px 0; }   /* 72 px à droite = place des cartes du fond */
.ac-pile {
  position: relative; width: 100%; max-width: 600px; aspect-ratio: 4 / 3; margin-left: auto;
  transform-style: preserve-3d; transform: rotateY(-16deg) rotateX(5deg);
}
.ac-carte {
  --i: 0;
  position: absolute; inset: 0; border-radius: 20px;
  display: flex; flex-direction: column; gap: 2px; padding: 12px 12px clamp(16px, 2vw, 22px);
  background: #fff;
  border: 1.5px solid color-mix(in srgb, var(--c) 40%, #fff);
  transform: translate3d(calc(var(--i) * 18px), calc(var(--i) * -16px), calc(var(--i) * -60px));
  opacity: 1;   /* cartes opaques : jamais de « fantôme » pendant la transition */
  /* bords lisses en 3D (sinon crénelage) : contour transparent + face arrière masquée */
  outline: 1px solid transparent; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  will-change: transform;
  z-index: calc(10 - var(--i));
  transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .9s ease;
}
.ac-carte.cache { opacity: 0; }
/* zone visuelle teintée : accueille aujourd'hui le logo, demain une vraie capture (img en object-fit: cover) */
.ac-visu {
  flex: 1; display: grid; place-items: center; border-radius: 12px; margin-bottom: clamp(12px, 1.6vw, 18px);
  background: color-mix(in srgb, var(--c) 14%, #fff); overflow: hidden;
}
.ac-carte .ac-visu img { width: clamp(96px, 11vw, 150px); height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 26px; }
.ac-carte b, .ac-carte > span { padding: 0 clamp(8px, 1vw, 12px); }
.ac-carte b { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -.02em; color: color-mix(in srgb, var(--c) 82%, #000); }
.ac-carte > span { font-size: clamp(16px, 1.5vw, 19px); color: #3d4a50; }

/* ===================== NOS LOGICIELS ===================== */
.ac-logiciels { position: relative; padding: 0 0 clamp(56px, 7vw, 96px); }
/* prolongement du bandeau derrière le titre et la moitié haute de la 1re rangée de tuiles */
.ac-logiciels::before { content: ""; position: absolute; inset: -2px 0 auto; height: clamp(260px, 26vw, 360px);
  /* le bandeau finit en dégradé vers le fond de la page, derrière les tuiles */
  background: linear-gradient(to bottom, color-mix(in srgb, var(--turquoise) 20%, #fff) 0%, var(--bg) 100%); }
.ac-logiciels .conteneur { position: relative; }
.ac-h2 {
  font-family: var(--display); font-weight: 700; color: var(--bleu-fonce);
  font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.02em; margin: 0 0 clamp(16px, 2vw, 24px);
}
.ac-tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 20px); }
.ac-tuile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: clamp(20px, 2.2vw, 28px); border-radius: 16px; text-decoration: none; color: inherit;
  background: color-mix(in srgb, var(--c) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 18%, #fff);
  transition: background-color .15s ease, border-color .15s ease;
}
.ac-tuile:hover { background: color-mix(in srgb, var(--c) 15%, #fff); border-color: var(--c); }
.ac-tuile:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 3px; }
.ac-tlogo { width: 88px; height: 88px; object-fit: contain; border-radius: 18px; margin-bottom: 14px; }
.ac-tnom {
  font-family: var(--display); font-weight: 700; font-size: clamp(21px, 2vw, 25px); letter-spacing: -.01em;
  color: color-mix(in srgb, var(--c) 82%, #000);
}
.ac-tdesc { font-size: 16px; color: var(--texte-2); }

/* ===================== QUI SOMMES-NOUS (bande compacte) ===================== */
.ac-qui-band { background: var(--surface-2); padding: clamp(20px, 2.6vw, 30px) 0; }
.ac-qui-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ac-qui-in .ac-h2 { margin: 0; font-size: clamp(20px, 2.4vw, 26px); }
.ac-avenir { display: inline-block; font-size: 13px; font-weight: 600; color: var(--texte-2); border: 1px solid var(--bord); padding: 4px 12px; border-radius: 999px; }

/* ===================== BAS : réseaux + newsletter ===================== */
.ac-bas { padding: clamp(40px, 5vw, 64px) 0; }
.ac-bas-grid { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; }   /* newsletter retirée (30/11) : « Suivez-nous » seul, centré */
.ac-h3 { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 2.2vw, 24px); color: var(--bleu-fonce); margin: 0 0 14px; }
.ac-h3 label { cursor: pointer; }
.ac-reseaux { display: flex; gap: 10px; justify-content: center; }
.ac-reseau {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--bord); color: var(--texte-2);
  transition: color .15s ease, border-color .15s ease;
}
.ac-reseau:hover { color: var(--bleu-fonce); border-color: var(--turquoise); }
.ac-news { display: flex; gap: 10px; flex-wrap: wrap; }
.ac-news input {
  flex: 1 1 220px; font: inherit; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--bord); background: #fff; color: var(--texte);
}
.ac-news input:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 1px; border-color: var(--turquoise); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .ac-tuiles { grid-template-columns: repeat(2, 1fr); }
  .ac-hero-grid { grid-template-columns: 1fr; }
  .ac-sous { max-width: 32ch; }
  .ac-scene { padding: 28px 28px 8px 0; }
  .ac-pile { max-width: 460px; margin: 0 auto; transform: rotateY(-12deg) rotateX(4deg); }
}
@media (max-width: 560px) {
  .ac-tuiles { grid-template-columns: 1fr; }
  /* logo à gauche sur deux lignes, nom + description empilés à droite */
  .ac-tuile { display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; row-gap: 2px; align-items: center; }
  .ac-tlogo { grid-row: 1 / span 2; width: 64px; height: 64px; margin: 0; border-radius: 14px; }
  .ac-tnom { align-self: end; }
  .ac-tdesc { align-self: start; }
  .ac-bas-grid { grid-template-columns: 1fr; }
  .ac-scene { padding: 24px 0 4px; }
  .ac-pile { width: 80%; margin: 0; }   /* laisse la place aux cartes du fond, décalées à droite */
}
@media (prefers-reduced-motion: reduce) {
  .ac-tuile, .ac-reseau, .ac-carte { transition: none; }
}

/* ——— Bandeau « À VENIR » (logiciels pas encore diffusés : tout sauf Gestathèque et Problazap) ——— */
.ac-carte.bandeau-a-venir { overflow: hidden; }
.ac-tuile.bandeau-a-venir { position: relative; overflow: hidden; }
.bandeau-a-venir::after {
  content: "À VENIR";
  position: absolute; top: 26px; right: -52px; width: 190px; z-index: 3;
  transform: rotate(45deg); text-align: center; pointer-events: none;
  background: #d32f2f; color: #fff; font-weight: 800; font-size: .82rem; letter-spacing: .14em;
  padding: 7px 0; box-shadow: 0 2px 6px rgba(0,0,0,.22);
}

/* ——— Qui sommes-nous ? ——— */
.ac-qui { background: var(--surface-2); padding: clamp(40px, 6vw, 72px) 0; }
.qs-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; margin-left: auto; margin-right: auto; gap: clamp(16px, 2vw, 24px); margin-top: 24px; }
.qs-carte { background: #fff; border: 1px solid var(--bord); border-radius: 18px; padding: 24px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.qs-photo { width: 132px; height: 132px; border-radius: 50%; overflow: hidden; position: relative; margin-bottom: 14px;
  background: color-mix(in srgb, var(--turquoise) 16%, #fff); box-shadow: 0 0 0 4px #fff, 0 0 0 6px color-mix(in srgb, var(--turquoise) 55%, #fff); }
.qs-photo::before { content: attr(data-initiale); position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 48px; font-weight: 700; color: var(--turquoise); }
.qs-photo img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; }
.qs-nom { margin: 0; font-family: var(--display); font-size: 1.35rem; }
.qs-role { margin: 2px 0 8px; font-weight: 600; color: var(--turquoise-texte); }   /* --turquoise sur blanc = 2,7:1 (Phase 6) */
.qs-parcours { margin: 0 0 16px; font-size: .95rem; line-height: 1.45; color: #3d4a50; }
@media (max-width: 560px) { .qs-grille { grid-template-columns: 1fr; } }

/* « Pour accéder aux logiciels Charathèque, créer un compte ici ⮥ » (Mathieu 30/11) : juste SOUS le bandeau, sur une ligne, calée à
   droite pour que la flèche arrive sous le bouton « Se connecter » (sous le bouton ☰ sur téléphone). Écriture manuscrite = polices du
   système, sans téléchargement (Windows : Segoe Print / Ink Free ; Mac : Bradley Hand / Noteworthy ; sinon une cursive). */
.ac-invite-ligne { display: flex; justify-content: flex-end; margin-top: calc(-1 * clamp(40px, 6.4vw, 80px)); margin-bottom: clamp(18px, 3vw, 36px); }
.ac-invite { font-family: "Segoe Print", "Ink Free", "Bradley Hand", "Noteworthy", "Comic Sans MS", cursive; font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.3; color: var(--turquoise-texte); margin: 0; white-space: nowrap; padding-right: var(--fleche-decal, 60px); }
.ac-invite a { color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ac-invite a:hover { color: var(--encre); }
.ac-fleche { display: inline-block; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Segoe UI", sans-serif;
  font-size: 1.6em; line-height: 1; vertical-align: .05em; margin-left: .1em; }
@media (max-width: 860px) {
  .ac-invite-ligne { margin-top: calc(-1 * clamp(36px, 6vw, 60px)); }
  .ac-invite { white-space: normal; text-align: right; font-size: 15px; --fleche-decal: 10px; max-width: 30ch; }
}
