/* ==========================================================================
   Thirdslot — page Guides (/guides/)
   Maquette : 2026-10-28 Thirdslot-Guides_1.svg (1920 px de large ; Guides_2 = variante de hero, non retenue).
   Les cotes viennent de la maquette : « y » = position dans la maquette (le bandeau promo s'ajoute au-dessus).
   Colonne de contenu : x 240 → 1680 (1440 px). Images : assets/guides/ (découpées / extraites de la maquette).
   ========================================================================== */

.page-guides { --gd-ink: #1a1a2e; --gd-text: #4f4f4f; --gd-mute: #aaaab5; --gd-line: #e2e2f2; }

/* Le header est transparent au-dessus du hero, comme dans la maquette */
.page-guides .site-header:not(.is-scrolled) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

.gd { overflow-x: clip; }
/* réinitialisations limitées au hero et au corps : la bande CTA commune garde ses propres styles */
.gd-hero h1, .gd-wrap h2, .gd-wrap h3 { margin: 0; font-family: var(--font-head); font-weight: 500; color: var(--gd-ink); }
.gd-hero p, .gd-wrap p { margin: 0; }
.gd-hero a, .gd-wrap a { color: inherit; text-decoration: none; }

/* ---------- Hero (bande y 0 → 1066, le header passe dessus) ---------- */
.gd-hero { position: relative; height: 1066px; margin-top: -88px; background: #fff; }
.gd-hero-bg { position: absolute; inset: 0; background: url(/assets/guides/hero-bg.webp) center top / max(1920px, 100%) auto no-repeat; }
/* au-delà de 1920 px l'image est agrandie : on garantit le fondu vers le blanc en bas de bande */
.gd-hero-bg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 250px; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 90%); }
.gd-hero-art { position: absolute; inset: 0; pointer-events: none; }
.gd-hero-art img { position: absolute; max-width: none; height: auto; }
/* positions = x de la maquette − 960 (centre) ; les SVG des sphères ont 80 px de marge pour leur ombre portée */
.gd-ring { left: calc(50% - 490px); top: 189px; width: 1006px; }
.gd-sph-a { left: calc(50% - 745.7px); top: 353.3px; width: 292.8px; }
.gd-sph-b { left: calc(50% + 352.1px); top: 340px; width: 265.4px; }
.gd-sph-c { left: calc(50% + 72.6px); top: 89.1px; width: 219.6px; }
.gd-sph-d { left: calc(50% - 400px); top: 189px; width: 238.8px; }
.gd-glow { left: calc(50% - 24.7px); top: 42.1px; width: 373.2px; }
.gd-sph-l { left: calc(50% - 1127px); top: 678px; width: 338px; }
.gd-sph-r { left: calc(50% + 802px); top: 511px; width: 283px; }
/* livre 3D : image à filtre d'ombre dans la maquette (qu'Illustrator rogne à l'export, pas nous) */
.gd-book { left: calc(50% - 181.3px); top: 115.1px; width: 409.6px; filter: drop-shadow(10px 30px 20px rgba(208, 193, 244, 0.7)); }

.gd-hero-inner { position: relative; z-index: 1; padding-top: 515px; text-align: center; }
.gd-pill {
  display: inline-flex; align-items: center; gap: 12px;
  height: 37px; padding: 0 20px 0 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #4a46d3 0%, #d085c2 30%, #ddd 80%) border-box;
  box-shadow: 0 8px 16px rgba(218, 218, 232, 0.5);
  font-weight: 500; font-size: 14px; color: var(--gd-ink);
}
.gd-pill img { width: 18px; height: 18px; }
.gd .gd-h1 { margin-top: 19px; font-size: 74px; line-height: 74px; font-weight: 600; }
/* soulignement dégradé sous « Guides » : 236 × 6, y 640 */
.gd-h1 .u { position: relative; display: inline-block; }
.gd-h1 .u::after {
  content: ""; position: absolute; left: 0.122em; top: 1em;
  width: 3.185em; height: 0.081em; border-radius: 0.04em;
  background: var(--grad-underline);
  transform-origin: left center;
}
.gd .gd-hero-sub { max-width: 580px; margin: 43px auto 0; font-size: 19px; line-height: 28px; color: #505056; }
/* indicateur de défilement (y 838) */
.gd-scroll { position: absolute; left: calc(50% - 11.8px); top: 835.6px; z-index: 1; width: 23.6px; height: 45.9px; }
.gd-scroll img { display: block; width: 100%; }

/* ---------- Corps (x 240 → 1680) ---------- */
.gd-wrap { position: relative; z-index: 1; width: 1440px; margin: 0 0 0 calc(50% - 720px); padding-bottom: 71px; }
.gd-h2 { font-size: 50px; line-height: 59px; }

/* ---------- À la une (titre y 1080, carte y 1176 → 1597) ---------- */
.gd-featured .gd-h2 { margin-top: 15.5px; }
.gd-feat { position: relative; height: 420.7px; margin-top: 36px; }
.gd-feat-card {
  position: absolute; left: 4px; top: 0; display: block; width: 670.3px; height: 420.7px;
  border-radius: 55px; background: url(/assets/guides/feat-bg.webp) 0 0 / 100% 100% no-repeat;
}
/* composition « AI Visibility · 9/20 » (cotes relatives à la carte) */
.gd-sc > * { position: absolute; margin: 0; }
.gd-sc .ic { left: 82px; top: 105.7px; width: 52.8px; height: 52.8px; }
.gd-sc .t { left: 148.6px; top: 113.3px; font-family: var(--font-head); font-weight: 500; font-size: 19.5px; line-height: 23px; color: var(--gd-ink); }
.gd-sc .box { left: 111.8px; top: 147.7px; width: 476.5px; height: 174.9px; border: 1px solid #fff; border-radius: 14.9px; background: rgba(255, 255, 255, 0.5); }
.gd-sc .box > * { position: absolute; margin: 0; font-family: var(--font-head); white-space: nowrap; }
.gd-sc .box .s { left: 29.1px; top: 31.5px; font-size: 18.4px; line-height: 22px; color: #565672; }
.gd-sc .box b { left: 28.1px; top: 65.3px; font-weight: 600; font-size: 24.9px; line-height: 30px; color: var(--gd-ink); }
.gd-sc .bar { left: 34.2px; top: 127.2px; width: 283.6px; height: 12px; border-radius: 6px; background: var(--gd-line); overflow: hidden; }
.gd-sc .bar i { position: absolute; left: 0; top: 0; height: 100%; width: 202.9px; border-radius: 6px; background: linear-gradient(0deg, #4a46d3, #6666dd); }
.gd-sc .circle { left: 394.2px; top: 87.2px; width: 156.4px; height: 156.4px; }
.gd-sc .circle img { position: absolute; left: -100px; top: -100px; width: 356.4px; max-width: none; }
.gd-sc .circle > * { position: absolute; margin: 0; font-family: var(--font-head); white-space: nowrap; }
.gd-sc .circle b { left: 44.4px; top: 32.7px; font-weight: 600; font-size: 57.1px; line-height: 68px; color: var(--gd-ink); }
.gd-sc .circle em { left: 84.4px; top: 63px; font-style: normal; font-weight: 500; font-size: 23.4px; line-height: 28px; color: var(--gd-mute); }
.gd-sc .circle span { left: 56.4px; top: 102.8px; font-size: 18.3px; line-height: 22px; color: #565672; }

.gd-feat-text { position: absolute; left: 776.6px; top: 77.1px; width: 660px; }
.gd-meta { display: flex; align-items: center; gap: 14px; font-family: var(--font-head); }
.gd-tag {
  display: inline-flex; align-items: center; height: 38.6px; padding: 0 20px;
  border: 1px solid rgba(74, 70, 211, 0.4); border-radius: 999px;
  font-weight: 500; font-size: 20px; line-height: 24px; color: #4a46d3;
}
.gd-time { font-size: 18px; line-height: 22px; color: var(--gd-text); }
.gd-wrap .gd-feat-title { max-width: 640px; margin-top: 21px; font-size: 32px; line-height: 40px; }
.gd-feat-title a:hover { color: #4a46d3; }
.gd .gd-feat-sub { max-width: 640px; margin-top: 19px; font-size: 18px; line-height: 26px; color: var(--gd-text); }
.gd-more { display: inline-flex; align-items: center; gap: 17.5px; margin-top: 41px; font-family: var(--font-head); font-weight: 500; font-size: 20px; line-height: 24px; color: #4a46d3; }
.gd-more img { width: 27.8px; height: 27.8px; transition: translate 0.25s ease; }
.gd-more:hover img { translate: 4px 0; }

/* ---------- Tous les guides (titre y 1794, cartes y 1902) ---------- */
.gd-all-head { position: relative; margin-top: 197.5px; }
.gd-search { position: absolute; right: 0; top: 4.5px; width: 523.7px; height: 56.4px; border: 1px solid #d5d5db; border-radius: 28.2px; background: #fff; }
.gd-search input { width: 100%; height: 100%; padding: 0 64px 0 29px; border: 0; border-radius: inherit; background: transparent; font-size: 18px; line-height: 21px; color: var(--gd-text); }
.gd-search input::placeholder { color: var(--gd-text); opacity: 1; }
.gd-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.gd-search input:focus { outline: none; }
.gd-search:focus-within { border-color: rgba(74, 70, 211, 0.6); box-shadow: 0 0 0 3px rgba(74, 70, 211, 0.12); }
.gd-search button { position: absolute; right: 26px; top: 16.4px; width: 20.6px; height: 21.7px; padding: 0; }
.gd-search button img { display: block; width: 100%; }

.gd-grid { display: grid; grid-template-columns: repeat(3, 432px); column-gap: 72px; row-gap: 56px; align-items: start; margin-top: 48px; }
.gd-card { display: block; }
.gd-card-img { display: block; position: relative; height: 304px; border-radius: 28px; }
/* l'image exportée garde 5 px de marge pour son ombre (442 × 314 pour une carte de 432 × 304) */
.gd-card-img img { position: absolute; left: -1.16%; top: -1.71%; width: 102.32%; height: auto; max-width: none; transition: translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gd-card:hover .gd-card-img img { translate: 0 -5px; }
.gd-card .gd-meta { margin-top: 33px; gap: 15px; }
.gd-card .gd-tag { height: 32.5px; padding: 0 17px; font-size: 16px; line-height: 19px; }
.gd-card .gd-time { font-size: 16px; line-height: 19px; }
.gd-card-title { display: block; max-width: 408px; margin-top: 21px; font-family: var(--font-head); font-weight: 500; font-size: 24px; line-height: 32px; color: var(--gd-ink); transition: color 0.2s ease; }
.gd-card:hover .gd-card-title { color: #4a46d3; }
.gd-empty { margin-top: 49px; font-size: 18px; line-height: 28px; color: var(--gd-text); }
.gd-empty[hidden] { display: none; }

/* ==========================================================================
   Animations (html.anim ; ?noanim les coupe — js/guides.js retire alors la classe anim)
   Hero : body.gd-ready (polices + images chargées) lance l'entrée.
   Blocs : .is-in posé quand ils entrent à l'écran (.gd-featured, .gd-all-head, .gd-grid li).
   Mots des titres découpés par guides.js (.gd-split .w > span, --i), cascades par --i.
   ========================================================================== */
@keyframes gdRise    { from { opacity: 0; transform: translateY(28px); filter: blur(5px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes gdFade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes gdWord    { from { transform: translateY(135%) rotate(4deg); } to { transform: none; } }
@keyframes gdDraw    { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gdPop     { 0% { opacity: 0; transform: scale(0.3); } 60% { opacity: 1; transform: scale(1.12); } 80% { transform: scale(0.97); } 100% { opacity: 1; transform: scale(1); } }
@keyframes gdBar     { from { width: 0; } }
@keyframes gdBoxIn   { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gdRingIn  { from { opacity: 0; transform: scale(0.55); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes gdRingIdle { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-7px) scale(1.012); } }
@keyframes gdBookIn  { 0% { opacity: 0; transform: translateY(110px) scale(0.5) rotate(-10deg); filter: blur(10px); } 70% { opacity: 1; transform: translateY(-12px) scale(1.04) rotate(2deg); filter: blur(0); } 100% { opacity: 1; transform: none; } }
@keyframes gdBookIdle { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(2deg); } }
@keyframes gdSphIdle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes gdGlow    { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.12); } }
@keyframes gdScroll  { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(8px); opacity: 0.6; } }

/* ---- Mots découpés ---- */
.gd-split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.gd-split .w > span { display: inline-block; }
.anim .gd-split .w > span { transform: translateY(135%); }

/* ---- Hero ---- */
.gd-sph-a { --i: 0; --d: 6s; } .gd-sph-d { --i: 1; --d: 5.2s; } .gd-sph-c { --i: 2; --d: 7s; } .gd-sph-b { --i: 3; --d: 6.4s; }
.anim .gd-hero-bg, .anim .gd-hero-art img, .anim .gd-pill, .anim .gd-hero-sub, .anim .gd-scroll { opacity: 0; }
.anim .gd-h1 .u::after { transform: scaleX(0); }
.anim .gd-ready .gd-hero-bg { animation: gdFade 1.2s ease both; }
.anim .gd-ready .gd-ring { animation: gdRingIn 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both, gdRingIdle 7s ease-in-out 1.6s infinite; }
.anim .gd-ready .gd-book { animation: gdBookIn 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both, gdBookIdle 7s ease-in-out 1.8s infinite; }
.anim .gd-ready .gd-sph { animation: gdPop 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.7s + var(--i) * 0.12s) both, gdSphIdle var(--d) ease-in-out calc(1.7s + var(--i) * 0.4s) infinite; }
.anim .gd-ready .gd-sph-l, .anim .gd-ready .gd-sph-r { animation: gdFade 1s ease 1s both, gdSphIdle 8s ease-in-out 2.2s infinite; }
.anim .gd-ready .gd-glow { animation: gdFade 1s ease 0.5s both, gdGlow 4.5s ease-in-out 1.6s infinite; }
.anim .gd-ready .gd-pill { animation: gdRise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both; }
.anim .gd-ready .gd-h1 .w > span { animation: gdWord 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) calc(0.45s + var(--i) * 0.06s) both; }
.anim .gd-ready .gd-h1 .u::after { animation: gdDraw 1s cubic-bezier(0.65, 0, 0.2, 1) 1s both; }
.anim .gd-ready .gd-hero-sub { animation: gdRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.95s both; }
.anim .gd-ready .gd-scroll { animation: gdFade 0.8s ease 1.5s both; }
.anim .gd-ready .gd-scroll img { animation: gdScroll 1.8s ease-in-out 2.3s infinite; }

/* ---- À la une ---- */
.anim .gd-feat-card, .anim .gd-feat-text > *, .anim .gd-sc .ic, .anim .gd-sc .t, .anim .gd-sc .box, .anim .gd-sc .circle, .anim .gd-sc .box > *, .anim .gd-sc .circle > :not(img) { opacity: 0; }
.anim .gd-featured.is-in .gd-h2 .w > span, .anim .gd-all-head.is-in .gd-h2 .w > span { animation: gdWord 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) calc(0.1s + var(--i) * 0.05s) both; }
.anim .gd-featured.is-in .gd-feat-card { animation: gdRise 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }
.anim .gd-featured.is-in .gd-sc .ic { animation: gdPop 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.75s both; }
.anim .gd-featured.is-in .gd-sc .t { animation: gdRise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.9s both; }
.anim .gd-featured.is-in .gd-sc .box { animation: gdBoxIn 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 1s both; }
.anim .gd-featured.is-in .gd-sc .box .s { animation: gdFade 0.5s ease 1.25s both; }
.anim .gd-featured.is-in .gd-sc .box b { animation: gdRise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.35s both; }
.anim .gd-featured.is-in .gd-sc .bar { animation: gdFade 0.4s ease 1.45s both; }
.anim .gd-featured.is-in .gd-sc .bar i { animation: gdBar 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 1.55s both; }
.anim .gd-featured.is-in .gd-sc .circle { animation: gdPop 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.15s both; }
.anim .gd-featured.is-in .gd-sc .circle > :not(img) { animation: gdFade 0.5s ease 1.45s both; }
.anim .gd-featured.is-in .gd-feat-text > * { animation: gdRise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.5s + var(--i) * 0.12s) both; }

/* ---- Tous les guides ---- */
.anim .gd-search, .anim .gd-grid li { opacity: 0; }
.anim .gd-all-head.is-in .gd-search { animation: gdRise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both; }
.anim .gd-grid li.is-in { animation: gdRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i) * 0.12s) both; }

/* ---- ?noanim : état final direct (guides.js retire aussi la classe anim) ---- */
.no-anim .gd-hero-bg, .no-anim .gd-hero-art img, .no-anim .gd-pill, .no-anim .gd-hero-sub, .no-anim .gd-scroll,
.no-anim .gd-feat-card, .no-anim .gd-feat-text > *, .no-anim .gd-sc .ic, .no-anim .gd-sc .t, .no-anim .gd-sc .box, .no-anim .gd-sc .circle,
.no-anim .gd-sc .box > *, .no-anim .gd-sc .circle > *, .no-anim .gd-search, .no-anim .gd-grid li { opacity: 1 !important; animation: none !important; }
.no-anim .gd-split .w > span, .no-anim .gd-h1 .u::after { transform: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .gd-hero-art img, .gd-scroll img, .gd-feat-card, .gd-sc *, .gd-grid li, .gd-feat-text > *, .gd-search, .gd-split .w > span, .gd-h1 .u::after { animation-duration: 0.01s !important; animation-iteration-count: 1 !important; }
}

/* ==========================================================================
   Écrans plus étroits que la maquette (variables posées par guides.js :
   --k = (largeur − 48) / 1440 pour réduire tout le corps d'un bloc entre 1300 et 1499 px ;
   --kf = réduction de la carte à la une (670 px) ; --kh = réduction des visuels du hero sous 1100 px)
   ========================================================================== */
@media (max-width: 1499px) and (min-width: 1300px) {
  .gd-wrap { zoom: var(--k, 1); }
}
@media (max-width: 1299px) {
  .gd-wrap { width: auto; margin: 0 24px; }
  .gd-feat { display: flex; align-items: center; gap: 40px; height: auto; }
  .gd-feat-card { position: static; flex: none; zoom: var(--kf, 1); }
  .gd-feat-text { position: static; flex: 1; width: auto; min-width: 0; }
  .gd-wrap .gd-feat-title, .gd .gd-feat-sub { max-width: none; }
  .gd-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 40px; row-gap: 44px; }
  .gd-card-img { height: auto; aspect-ratio: 432 / 304; }
  .gd-card-title { max-width: none; }
}
@media (max-width: 1099px) {
  .gd-hero { height: auto; padding-bottom: 110px; }
  .gd-hero-art { zoom: var(--kh, 1); }
  .gd-hero-inner { padding-top: calc(515px * var(--kh, 1)); }
  .gd .gd-h1 { font-size: clamp(40px, 6.8vw, 74px); line-height: 1; }
  .gd .gd-hero-sub { margin-top: 32px; padding: 0 8px; font-size: 18px; line-height: 27px; }
    /* en flux (sous le fond absolu du hero : relative + z-index pour rester visible) */
  .gd-scroll { position: relative; left: auto; top: auto; z-index: 1; display: block; margin: 48px auto 0; }
  .gd-h2 { font-size: clamp(32px, 5.5vw, 50px); line-height: 1.18; }
  .gd-featured .gd-h2 { margin-top: 56px; }
  .gd-all-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 96px; }
  .gd-search { position: static; width: min(523.7px, 100%); }
  .gd-grid { margin-top: 36px; }
}
@media (max-width: 899px) {
  .gd-feat { flex-direction: column; align-items: flex-start; gap: 32px; margin-top: 28px; }
  .gd-feat-card { align-self: center; }
  .gd-feat-text { width: 100%; }
  .gd-wrap .gd-feat-title { font-size: clamp(24px, 4.6vw, 32px); line-height: 1.25; }
  .gd-more { margin-top: 28px; }
}
@media (max-width: 699px) {
  .gd-wrap { margin: 0 16px; }
  .gd-hero { padding-bottom: 90px; }
  .gd-grid { grid-template-columns: 1fr; row-gap: 40px; }
  .gd-card .gd-meta { margin-top: 24px; }
  .gd-card-title { margin-top: 16px; font-size: 22px; line-height: 30px; }
}
