/* ═══════════════════════════════════════════════════════════════
   TOUS CAPABLES ENSEMBLE — touscapablesensemble.fr
   Direction artistique : « Revue » (v0.1.0-ossature)
   Base : ivoire chaud + navy encre + accent ocre
   Signature : numérotation serif, filets fins, liseré tricolore rare
   ═══════════════════════════════════════════════════════════════ */

/* ── Polices auto-hébergées ── */
@font-face {
  font-family: 'Source Serif 4';
  src: url('../assets/fonts/source-serif-4-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../assets/fonts/source-serif-4-latin-ext-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-024F, U+0152-0153, U+1E00-1EFF;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../assets/fonts/source-serif-4-latin-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../assets/fonts/source-serif-4-latin-ext-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0100-024F, U+0152-0153, U+1E00-1EFF;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../assets/fonts/source-serif-4-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../assets/fonts/source-serif-4-latin-ext-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-024F, U+0152-0153, U+1E00-1EFF;
}
@font-face {
  font-family: 'Public Sans';
  src: url('../assets/fonts/public-sans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('../assets/fonts/public-sans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('../assets/fonts/public-sans-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ── Tokens ── */
:root {
  /* Couleurs — base ivoire & encre (héritée du Design System Repères de foyer) */
  --ivoire: #F7F2E9;
  --ivoire-2: #F2EBDE;        /* variante plus chaude, bas de page */
  --papier: #FDFBF7;          /* cartes */
  --navy: #0F2C46;
  --encre: #22303C;           /* texte courant, plus doux que le navy pur */
  --ocre: #B5651D;            /* accent signature */
  --ocre-sombre: #8A4B22;     /* ocre pour petits textes (contraste AA) */
  --gris: #5C6670;            /* texte secondaire */
  --ligne: rgba(15, 44, 70, .14);
  --ligne-forte: rgba(15, 44, 70, .30);

  /* Tricolore — signature Repères de foyer, usage rare */
  --tricolore: linear-gradient(to right,
    #0E76BC 0 33.3%, #2E9E4F 33.3% 66.6%, #EFB31F 66.6% 100%);

  /* Typographie */
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Rythme */
  --max: 1040px;
  --max-texte: 68ch;
  --pas: 1.5rem;

  /* Ombres — diffuses, teintées navy (héritage Design System) */
  --ombre-douce: 0 18px 44px -18px rgba(15, 44, 70, .16);

  /* Mouvement */
  --ease: cubic-bezier(.22, .7, .3, 1);
}

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

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

body {
  margin: 0;
  background: var(--ivoire);
  color: var(--encre);
  font-family: var(--serif);
  font-size: 1.125rem;          /* 18px — confort de lecture */
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

/* ── Accessibilité : lien d'évitement & focus ── */
.evitement {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--ivoire);
  padding: .8rem 1.4rem;
  z-index: 100;
  font-family: var(--sans);
  font-size: 1rem;
  text-decoration: none;
}
.evitement:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid rgba(14, 118, 188, .75);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: rgba(181, 101, 29, .22); }

/* ── Typographie ── */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -.012em;
  margin: 0 0 1rem;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.05rem); }
h3 { font-size: 1.3rem; line-height: 1.3; }

p { margin: 0 0 1.2rem; max-width: var(--max-texte); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--navy); }

a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--ocre);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-thickness .16s var(--ease);
}
a:hover { text-decoration-thickness: 2px; }

ul, ol { max-width: var(--max-texte); padding-left: 1.4rem; margin: 0 0 1.2rem; }
li { margin-bottom: .5rem; }
li::marker { color: var(--ocre); }

/* Eyebrow — étiquette de section en capitales espacées */
.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ocre-sombre);
  margin: 0 0 1.1rem;
}

/* Filet court — signature Direction 1 */
.filet {
  width: 42px;
  height: 1px;
  background: var(--navy);
  opacity: .35;
  border: none;
  margin: 2rem 0;
}

/* Numéro de section — gros chiffre serif ocre */
.numero {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  line-height: .9;
  color: var(--ocre);
  font-weight: 400;
  flex-shrink: 0;
  font-variant-numeric: lining-nums;
}

/* ── Structure ── */
.conteneur {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.4rem;
}

main { display: block; }

.section {
  padding: 4.2rem 0;
}
.section + .section { border-top: 1px solid var(--ligne); }

.entete-section {
  display: flex;
  gap: 1.6rem;
  align-items: baseline;
  margin-bottom: 2rem;
}

/* ── Liseré tricolore (signature rare : haut de page + pied) ── */
.liserê, .lisere {
  height: 4px;
  background: var(--tricolore);
}

/* ── Header / navigation ── */
.site-header {
  background: var(--ivoire);
  border-bottom: 1px solid var(--ligne);
}
.nav-barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}
.marque {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--navy);
}
.marque img { width: 44px; height: 44px; }
.marque span {
  font-family: var(--serif);
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.nav-liens {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-liens a {
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--encre);
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .16s var(--ease);
}
.nav-liens a:hover { border-bottom-color: var(--ocre); }
.nav-liens a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.bouton-nav {
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 600;
  color: var(--ivoire) !important;
  background: var(--navy);
  padding: .6rem 1.2rem !important;
  border-radius: 3px;
  border-bottom: none !important;
  text-decoration: none;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.bouton-nav:hover {
  transform: translateY(-1px);
  box-shadow: var(--ombre-douce);
}

/* Menu mobile */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ligne-forte);
  border-radius: 3px;
  padding: .55rem .7rem;
  cursor: pointer;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
}

/* ── Boutons ── */
.bouton {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ivoire);
  background: var(--navy);
  padding: .85rem 1.7rem;
  border-radius: 3px;
  text-decoration: none;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.bouton:hover {
  transform: translateY(-2px);
  box-shadow: var(--ombre-douce);
}
.bouton:active { transform: scale(.985); }

.lien-editorial {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--ocre);
  padding-bottom: 3px;
  transition: border-width .16s var(--ease);
}
.lien-editorial:hover { border-bottom-width: 2px; }

/* ── Héros (accueil) ── */
.heros {
  padding: 4.5rem 0 4rem;
}
.heros h1 {
  max-width: 20ch;
  margin-bottom: 1.6rem;
}
.heros .accroche {
  font-size: 1.2rem;
  max-width: 56ch;
  color: var(--encre);
}
.heros-actions {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

/* ── Piliers ── */
.piliers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.pilier h3 {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  margin-bottom: .7rem;
}
.pilier .numero { font-size: 1.9rem; }
.pilier p { font-size: 1.02rem; color: var(--gris); }

/* ── Cartes ── */
.carte {
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: 4px;
  padding: 1.8rem 2rem;
  box-shadow: var(--ombre-douce);
}
a.carte {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
a.carte:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 54px -20px rgba(15, 44, 70, .22);
}

.carte-theme {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ocre-sombre);
  margin-bottom: .5rem;
}

/* Badge statut */
.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(15, 44, 70, .07);
  border: 1px solid var(--ligne);
  padding: .3rem .8rem;
  border-radius: 999px;
}
.badge--ocre {
  color: var(--ocre-sombre);
  background: rgba(181, 101, 29, .09);
  border-color: rgba(181, 101, 29, .25);
}

/* ── Bloc projet (accueil) ── */
.projet-vitrine {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3rem;
  align-items: center;
}
.projet-vitrine figure {
  margin: 0;
}
.projet-vitrine img {
  border: 1px solid var(--ligne);
  border-radius: 4px;
  box-shadow: var(--ombre-douce);
}
.projet-vitrine figcaption {
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--gris);
  margin-top: .7rem;
}

/* ── Liste d'évolutions (accueil + projet) ── */
.evolutions {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: var(--max-texte);
}
.evolutions li {
  display: flex;
  gap: 1.4rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--ligne);
  margin: 0;
}
.evolutions time {
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ocre-sombre);
  white-space: nowrap;
  padding-top: .15rem;
}

/* ── Encadrés de fiche ── */
.encadre {
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-left: 3px solid var(--ocre);
  border-radius: 0 4px 4px 0;
  padding: 1.5rem 1.8rem;
  margin: 2rem 0;
  max-width: var(--max-texte);
}
.encadre--citation {
  border-left-color: var(--navy);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--navy);
  line-height: 1.5;
}
.encadre .eyebrow { margin-bottom: .7rem; }

/* Note discrète */
.note {
  font-family: var(--sans);
  font-size: .92rem;
  color: var(--gris);
  border-top: 1px solid var(--ligne);
  padding-top: 1.2rem;
  margin-top: 2.5rem;
  max-width: var(--max-texte);
}

/* [À compléter] — repère visuel */
.a-completer {
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--ocre-sombre);
  background: rgba(181, 101, 29, .07);
  border: 1px dashed rgba(181, 101, 29, .4);
  border-radius: 3px;
  padding: .9rem 1.2rem;
  max-width: var(--max-texte);
}

/* ── Frise VAE ── */
.frise {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  max-width: var(--max-texte);
}
.frise li {
  position: relative;
  padding: 0 0 1.8rem 2.2rem;
  border-left: 1px solid var(--ligne-forte);
  margin: 0 0 0 .5rem;
}
.frise li:last-child { padding-bottom: .2rem; border-left-color: transparent; }
.frise li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: .35rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ivoire);
  border: 2px solid var(--gris);
}
.frise li.franchi::before {
  background: var(--ocre);
  border-color: var(--ocre);
}
.frise .frise-titre {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  display: block;
}
.frise li.a-venir .frise-titre { color: var(--gris); font-weight: 400; }
.frise .frise-date {
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--gris);
}

/* ── Tableau (historique de versions) ── */
table {
  width: 100%;
  max-width: var(--max-texte);
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: .98rem;
  margin: 1.5rem 0;
}
th {
  text-align: left;
  font-weight: 600;
  color: var(--navy);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .7rem .9rem .7rem 0;
  border-bottom: 2px solid var(--ligne-forte);
}
td {
  padding: .85rem .9rem .85rem 0;
  border-bottom: 1px solid var(--ligne);
  vertical-align: top;
}

/* ── Entrées de veille ── */
.entree-veille {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--ligne);
  max-width: var(--max-texte);
}
.entree-veille time {
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ocre-sombre);
}
.entree-veille h3 { margin: .5rem 0 .3rem; }
.entree-veille .source {
  font-family: var(--sans);
  font-size: .92rem;
  color: var(--gris);
  margin-bottom: .8rem;
}
.entree-veille .commentaire {
  font-style: italic;
  color: var(--encre);
}

/* ── Carte lecture (VAE) ── */
.lecture {
  display: grid;
  gap: .4rem;
  margin-bottom: 1.5rem;
}
.lecture .lecture-auteur {
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--gris);
}

/* ── Page Démarche : portrait ── */
.presentation {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}
.presentation img {
  border-radius: 4px;
  border: 1px solid var(--ligne);
  box-shadow: var(--ombre-douce);
}
.presentation .identite {
  font-family: var(--sans);
  margin-top: 1rem;
}
.presentation .identite strong {
  display: block;
  font-size: 1.05rem;
}
.presentation .identite span {
  font-size: .95rem;
  color: var(--gris);
}

/* ── Méthode (étapes) ── */
.methode {
  counter-reset: etape;
  list-style: none;
  padding: 0;
  max-width: var(--max-texte);
}
.methode li {
  counter-increment: etape;
  display: flex;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--ligne);
  margin: 0;
}
.methode li::before {
  content: counter(etape, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--ocre);
  flex-shrink: 0;
  min-width: 2.6rem;
}
.methode strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: .25rem;
}

/* ── Fil d'Ariane ── */
.ariane {
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--gris);
  padding: 1.4rem 0 0;
}
.ariane a { color: var(--gris); }
.ariane [aria-current] { color: var(--navy); }

/* ── Pied de page ── */
.site-footer {
  background: var(--ivoire-2);
  border-top: 1px solid var(--ligne);
  margin-top: 4rem;
  font-family: var(--sans);
}
.footer-haut {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3rem 0 2.2rem;
}
.footer-haut img { width: 52px; margin-bottom: .8rem; }
.footer-haut p {
  font-size: .95rem;
  color: var(--gris);
  max-width: 34ch;
}
.footer-titre {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: .9rem;
}
.footer-liens {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-liens li { margin-bottom: .55rem; }
.footer-liens a {
  font-size: .95rem;
  color: var(--encre);
  text-decoration: none;
}
.footer-liens a:hover { text-decoration: underline; text-decoration-color: var(--ocre); }
.footer-bas {
  border-top: 1px solid var(--ligne);
  padding: 1.3rem 0 1.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--gris);
}

/* ── Responsive ── */
@media (max-width: 880px) {
  .piliers { grid-template-columns: 1fr; gap: 1.2rem; }
  .projet-vitrine { grid-template-columns: 1fr; gap: 2rem; }
  .presentation { grid-template-columns: 1fr; }
  .presentation img { max-width: 300px; }
  .footer-haut { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding: 3rem 0; }
  .heros { padding: 3rem 0 2.6rem; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-liens {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivoire);
    border-bottom: 1px solid var(--ligne);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 1.4rem 1.2rem;
    box-shadow: var(--ombre-douce);
    z-index: 50;
  }
  .nav-liens.ouvert { display: flex; }
  .nav-liens li { border-bottom: 1px solid var(--ligne); }
  .nav-liens li:last-child { border-bottom: none; padding-top: .8rem; }
  .nav-liens a {
    display: block;
    padding: .9rem 0;
    font-size: 1.05rem;
  }
  .bouton-nav { text-align: center; }
  .site-header { position: relative; }
  .heros-actions .bouton { width: 100%; text-align: center; }
  .entete-section { flex-direction: column; gap: .4rem; }
}

/* ── Mouvement réduit ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ── Impression ── */
@media print {
  .site-header, .site-footer, .heros-actions, .bouton { display: none; }
  body { background: white; font-size: 11pt; }
}

/* ── Texte pour lecteurs d'écran uniquement ── */
.sr-seul {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
