/* =====================================================================
   CFTC FORCE DE VENTE ISÈRE — SECTION CASTORAMA
   Design system centralisé (cftc.css)
   ---------------------------------------------------------------------
   Principe d'hybridation identitaire :
   - BLEU  = couleur de marque CFTC (institutionnel, structure, confiance)
             règle nationale : "nous les bleus", couleur de reconnaissance.
   - ORANGE = accent FONCTIONNEL uniquement (action + ancrage local Casto).
             Jamais utilisé comme seconde couleur de marque.
   Cette séparation des rôles garantit que le site reste lu comme "CFTC"
   tout en envoyant un signal de proximité Castorama.
   ===================================================================== */

:root {
  /* ---- COULEURS DE MARQUE (CFTC) ---- */
  --brand-900: #00254A;   /* bleu marine — fonds profonds, footer */
  --brand-800: #002A52;
  --brand-700: #003B71;   /* bleu CFTC principal */
  --brand-600: #0066B3;   /* bleu mosaïque — liens, accents secondaires */
  --brand-500: #4570B4;   /* bleu moyen (facette logo) */
  --brand-400: #6FA8DC;   /* bleu ciel */
  --brand-300: #8FC0E8;
  --brand-100: #EAF1F8;   /* bleu très clair — fonds de section */
  --brand-050: #D7E8F7;

  /* ---- ACCENT FONCTIONNEL (Castorama : action + local) ---- */
  --accent-500: #FF6600;        /* orange Casto — réservé aux CTA et au local */
  --accent-600: #D9550A;        /* orange foncé — texte orange accessible (AA) */
  --accent-tint: #FFF1E6;       /* fond orange très pâle */

  /* ---- NEUTRES ---- */
  --ink: #2E3A46;               /* texte courant */
  --ink-soft: #6B7785;          /* texte secondaire */
  --line: #D7E3F0;              /* bordures */
  --white: #FFFFFF;
  --ok: #4CAF80;                /* validations */
  --danger: #D6553A;

  /* ---- RÔLES SÉMANTIQUES (on style via ces variables, pas les couleurs brutes) ---- */
  --bg: var(--white);
  --bg-alt: var(--brand-100);
  --bg-invert: var(--brand-900);
  --text: var(--ink);
  --text-invert: var(--white);
  --link: var(--brand-700);
  --cta: var(--accent-500);
  --cta-hover: var(--accent-600);
  --focus: var(--accent-500);

  /* ---- TYPOGRAPHIE ---- */
  /* Fraunces = titres (chaleur, proximité) ; Inter = texte courant (lisibilité,
     substitut libre de droits à la typo propriétaire CFTC). */
  --font-title: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', Arial, sans-serif;

  /* ---- ÉCHELLE & RYTHME ---- */
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 20px rgba(0, 59, 113, 0.08);
  --shadow-md: 0 14px 30px rgba(0, 59, 113, 0.10);
  --shadow-lg: 0 16px 34px rgba(0, 59, 113, 0.12);
  --container: 1180px;
  --space-section: 90px;

  /* ---- ALIAS RÉTROCOMPATIBLES ----
     Permettent au CSS spécifique de chaque page (hero, ticker, footer…)
     de continuer à utiliser les noms historiques sans réécriture, tout
     en étant piloté par les tokens canoniques ci-dessus. Une seule
     source de vérité : modifier --brand-700 modifie --bleu-cftc partout. */
  --bleu-fonce: #2B3590;          /* facette logo, non substituable par un token de marque */
  --bleu-marine: var(--brand-900);
  --bleu-cftc: var(--brand-700);
  --bleu-mosaique: var(--brand-600);
  --bleu-moyen: var(--brand-500);
  --bleu-clair: var(--brand-100);
  --bleu-ciel: var(--brand-400);
  --bleu-pale: var(--brand-050);
  --orange-casto: var(--accent-500);
  --orange-casto-fonce: var(--accent-600);
  --blanc: var(--white);
  --ardoise: var(--ink);
  --ardoise-clair: var(--ink-soft);
  --vert: var(--ok);
  --bordure: var(--line);
  --rouge: var(--danger);
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 600; color: var(--brand-700); line-height: 1.15; }
a { color: var(--link); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Lien d'évitement (RGAA 12.7) */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-700); color: var(--white);
  padding: 10px 18px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Focus visible homogène (RGAA 10.7) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* =====================================================================
   COMPOSANT — LOGO INSTITUTIONNEL (conforme charte nationale)
   Le nom de la structure se place SOUS le sigle « cftc », en bloc
   indivisible, conformément à la règle CFTC « un logo unique ».
   ===================================================================== */
.cftc-logo { display: inline-flex; align-items: center; gap: 14px; }
.cftc-logo__mark {
  width: 56px;
  height: 45px;
  flex-shrink: 0;
  flex-grow: 0;
  object-fit: contain;
  display: block;
  max-width: 56px;
  max-height: 45px;
}
.cftc-logo__mark--official {
  width: auto;
  height: 52px;
  max-width: 110px;
  max-height: 52px;
}
.logo-mark { object-fit: contain; }
.cftc-logo__lockup { display: flex; flex-direction: column; line-height: 1.02; }

/* Sigle « cftc » : lettres en bas de casse, mosaïque de bleus CFTC */
.cftc-logo__sigle {
  font-family: var(--font-body);
  font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em;
  display: flex;
}
.cftc-logo__sigle .l1 { color: var(--brand-700); }
.cftc-logo__sigle .l2 { color: var(--brand-600); }
.cftc-logo__sigle .l3 { color: var(--brand-500); }
.cftc-logo__sigle .l4 { color: var(--brand-700); }

/* Nom de structure SOUS le sigle (règle nationale) */
.cftc-logo__structure {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft); margin-top: 1px;
}
/* Ancrage local : seul « Castorama » prend l'accent, signal de proximité */
.cftc-logo__structure .local { color: var(--accent-600); }

/* Déclinaison sur fond bleu (charte : version claire sur fond bleu only) */
.on-dark .cftc-logo__sigle .l1,
.on-dark .cftc-logo__sigle .l2,
.on-dark .cftc-logo__sigle .l3,
.on-dark .cftc-logo__sigle .l4 { color: var(--white); }
.on-dark .cftc-logo__structure { color: var(--brand-300); }
.on-dark .cftc-logo__structure .local { color: var(--accent-500); }

/* =====================================================================
   COMPOSANT — BOUTONS
   .btn--cta     : action principale (orange = "je fais quelque chose")
   .btn--brand   : action institutionnelle (bleu)
   .btn--ghost   : secondaire sur fond clair
   .btn--ghost-invert : secondaire sur fond bleu/sombre
   ===================================================================== */
.btn {
  --_bg: var(--brand-700); --_fg: var(--white); --_bg-h: var(--brand-600);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 14px 30px; border-radius: var(--radius-sm); border: 2px solid transparent;
  background: var(--_bg); color: var(--_fg); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover, .btn:focus-visible { background: var(--_bg-h); transform: translateY(-2px); }
.btn--cta   { --_bg: var(--cta); --_fg: var(--white); --_bg-h: var(--cta-hover); }
.btn--cta:hover { box-shadow: 0 10px 24px rgba(255,102,0,.32); }
.btn--brand { --_bg: var(--brand-700); --_fg: var(--white); --_bg-h: var(--brand-600); }
.btn--ghost {
  background: transparent; color: var(--brand-700); border-color: var(--line);
}
.btn--ghost:hover { background: var(--brand-100); border-color: var(--brand-600); transform: translateY(-2px); }
.btn--ghost-invert {
  background: transparent; color: var(--white); border-color: rgba(255,255,255,.5);
}
.btn--ghost-invert:hover { background: rgba(255,255,255,.12); border-color: var(--white); transform: translateY(-2px); }

/* =====================================================================
   COMPOSANT — CARTE D'ACTUALITÉ (marie CFTC + Casto)
   Le bandeau de catégorie utilise le bleu par défaut (institutionnel) ;
   la variante .is-local passe en orange pour signaler un sujet Castorama
   Isère (négociation locale, CSE magasin…). L'accent reste fonctionnel.
   ===================================================================== */
.news-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.news-card__media {
  position: relative; min-height: 120px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
  overflow: hidden;
}
.news-card__media svg { transition: transform .4s ease; }
.news-card:hover .news-card__media svg { transform: scale(1.12) rotate(-4deg); }
.news-card__tag {
  position: absolute; top: 14px; left: 14px;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 5px 12px; border-radius: 100px;
  background: rgba(255,255,255,.92); color: var(--brand-700);
}
.news-card__tag.is-local { background: var(--accent-500); color: var(--white); }
.news-card__body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.news-card__date {
  font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--brand-600); margin-bottom: 8px;
}
.news-card__title { font-size: 1.05rem; margin-bottom: 10px; }
.news-card__excerpt { font-size: .92rem; color: var(--ink-soft); margin-bottom: 14px; flex: 1; }
.news-card__link { font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; transition: gap .2s ease; }
.news-card:hover .news-card__link { gap: 10px; }

/* =====================================================================
   COMPOSANT — EN-TÊTE DE SECTION
   ===================================================================== */
.section { padding: var(--space-section) 0; }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 700px; margin-bottom: 50px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__eyebrow {
  display: inline-block; position: relative; padding-left: 28px; margin-bottom: 14px;
  font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-600);
}
/* Le trait de l'eyebrow est orange : micro-signal local répété, discret */
.section-head__eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 20px; height: 2px; background: var(--accent-500);
}
.section-head__title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 14px; }
.section-head__lead { color: var(--ink-soft); font-size: 1.08rem; }

/* =====================================================================
   UTILITAIRES D'ANIMATION (respectent prefers-reduced-motion)
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
