/* Culture TI — feuille de style partagee
   Creee le 2026-12-04.

   POURQUOI CE FICHIER EXISTE
   Les styles de l'en-tete (.navlink, .navphone, etc.) et plusieurs styles
   de contenu (.reveal, .prose-cti, .cti-spin) n'etaient ecrits QUE dans un
   bloc <style> a l'interieur de index.html. Les 25 autres pages utilisaient
   les memes classes sans jamais recevoir les regles : sur ces pages, le
   texte des liens du menu s'affichait donc sans contraste, et les blocs
   .reveal restaient invisibles (opacity:0 permanente).

   Ce fichier centralise ces regles. Il est charge par toutes les pages
   APRES tailwind.css, donc ses regles l'emportent en cas d'egalite de
   specificite.
   ------------------------------------------------------------------------ */

/* ===== Police ===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/inter-var.woff2') format('woff2');
}

/* ===== Base ===== */
html { scroll-behavior: smooth; }

/* Defilement doux vers une section, en tenant compte de l'en-tete fixe. */
:target { scroll-margin-top: 6rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ===== Apparition au defilement ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Si JavaScript est desactive, tout doit rester visible. */
.no-js .reveal { opacity: 1 !important; transform: none !important; }

/* ===== Fond quadrille ===== */
.grid-bg {
  background-image:
    linear-gradient(rgba(251,164,33,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,164,33,.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ===== Bandeau defilant (accueil) ===== */
.marquee-track { animation: marquee 38s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ===== Blocs depliants (<details>) ===== */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .chev { transform: rotate(180deg); }

/* ===== Onglets ===== */
.aud-panel { animation: fadeUp .45s cubic-bezier(.16,1,.3,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
[role="tab"][aria-selected="true"] { background-color: #fba421; color: #0b1220; }
[role="tab"]:focus-visible { outline: 2px solid #fba421; outline-offset: 2px; }

/* ===== Roue d'attente du formulaire ===== */
.cti-spin {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: cti-spin .7s linear infinite;
  vertical-align: -0.15em;
}
@keyframes cti-spin { to { transform: rotate(360deg); } }

/* ===== Boutons de filtre (boutique / catalogue) ===== */
.filter-btn {
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.filter-btn:hover { transform: translateY(-1px); }

/* ===== Compteurs animes ===== */
.counter { font-variant-numeric: tabular-nums; }

/* ======================================================================
   EN-TETE — contraste garanti sur fond sombre ET sur fond blanc
   ====================================================================== */

/* Etat par defaut : l'en-tete est transparent, pose sur le bandeau sombre. */
.navlink { color: #e9eef6; }
.navlink:hover { background: rgba(255,255,255,.10); color: #ffffff; }
.navphone { color: #ffffff; }
.navphone:hover { background: rgba(255,255,255,.10); }
.navoutline { border-color: rgba(255,255,255,.30); color: #ffffff; }
.navoutline:hover { border-color: rgba(255,255,255,.60); background: rgba(255,255,255,.08); }
.navborder { border-color: rgba(255,255,255,.28); }
.navlang { background: #ffffff; color: #0d1117; }
.navmuted { color: #c8d2e0; }
.navmuted:hover { color: #ffffff; }
.navburger { color: #ffffff; }
.navburger:hover { background: rgba(255,255,255,.10); }

/* Etat solide : des qu'on defile, l'en-tete devient blanc, le texte fonce. */
#header.is-solid .navlink { color: #374151; }
#header.is-solid .navlink:hover { background: #f3f4f6; color: #0d1117; }
#header.is-solid .navphone { color: #0d1117; }
#header.is-solid .navphone:hover { background: #f3f4f6; }
#header.is-solid .navoutline { border-color: #d1d5db; color: #0d1117; }
#header.is-solid .navoutline:hover { border-color: #9ca3af; background: #f9fafb; }
#header.is-solid .navborder { border-color: #e5e7eb; }
#header.is-solid .navlang { background: #0d1117; color: #ffffff; }
#header.is-solid .navmuted { color: #4b5563; }
#header.is-solid .navmuted:hover { color: #0d1117; }
#header.is-solid .navburger { color: #374151; }
#header.is-solid .navburger:hover { background: #f3f4f6; }

/* La page courante est mise en evidence. */
#header:not(.is-solid) .navcurrent { background: rgba(255,255,255,.16); color: #ffffff; }
#header.is-solid .navcurrent { background: #f3f4f6; color: #0d1117; }

/* Le logo ne doit jamais etre comprime par un bloc voisin. */
#header .navlogo { flex: 0 0 auto; }

/* Le lien telephonique ne s'affiche qu'a partir de 1536 px :
   c'est la principale source de largeur de l'en-tete. */
@media (max-width: 1535.98px) {
  .navphone { display: none !important; }
}
@media (min-width: 1536px) {
  .navphone { display: flex !important; }
}

/* ======================================================================
   CONTENU LONGTUGE — politique, conditions, articles
   ====================================================================== */
.prose-cti h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0d1117;
  margin-top: 2.5rem;
  margin-bottom: .75rem;
  letter-spacing: -.01em;
  scroll-margin-top: 6rem;
}
.prose-cti h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0d1117;
  margin-top: 1.75rem;
  margin-bottom: .5rem;
  scroll-margin-top: 6rem;
}
.prose-cti p, .prose-cti li { color: #4b5563; line-height: 1.75; }
.prose-cti p { margin-bottom: 1rem; }
.prose-cti ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose-cti li { margin-bottom: .4rem; }
.prose-cti a {
  color: #c06c07;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose-cti a:hover { color: #9a5606; }
.prose-cti em { color: #6b7280; font-style: italic; font-size: .875rem; }
.prose-cti table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.prose-cti th {
  text-align: left;
  font-weight: 700;
  color: #0d1117;
  padding: .6rem .75rem;
  border-bottom: 2px solid #e5e7eb;
  background: #f9fafb;
}
.prose-cti td { padding: .6rem .75rem; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.prose-cti code {
  background: #f3f4f6;
  padding: .1rem .35rem;
  border-radius: .25rem;
  font-size: .85em;
  color: #0d1117;
}

/* ===== Bouton « revenir en haut » ===== */
.cti-haut {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: #0d1117;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(13,17,23,.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s, background-color .2s;
}
.cti-haut.visible { opacity: 1; visibility: visible; transform: none; }
.cti-haut:hover { background: #fba421; color: #0d1117; }
.cti-haut:focus-visible { outline: 2px solid #fba421; outline-offset: 3px; }
@media (min-width: 640px) {
  .cti-haut { right: 1.5rem; bottom: 1.5rem; width: 3rem; height: 3rem; }
}

/* ===== Barre de progression de lecture ===== */
.cti-lecture {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 3px;
  width: 100%;
  background: #fba421;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .1s linear;
}

/* ===== Sommaire lateral des pages longues ===== */
.cti-sommaire a {
  display: block;
  padding: .35rem 0 .35rem .75rem;
  border-left: 2px solid #e5e7eb;
  font-size: .875rem;
  color: #4b5563;
  transition: color .2s, border-color .2s;
}
.cti-sommaire a:hover { color: #0d1117; border-left-color: #9ca3af; }
.cti-sommaire a[aria-current] { border-left-color: #fba421; color: #0d1117; font-weight: 700; }

/* ===== Accessibilite : lien d'evitement visible au clavier ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #0d1117;
  color: #ffffff;
  padding: .75rem 1rem;
  font-weight: 700;
  border-radius: 0 0 .5rem 0;
}
.skip-link:focus { left: 0; }

/* ===== Respect des preferences systeme ===== */
@media (prefers-contrast: more) {
  .navlink, .navmuted { color: #ffffff; }
  .prose-cti p, .prose-cti li { color: #1f2937; }
}
