:root {
  --marine: #292C6D;       /* fond principal (couleur WordPress actuelle) */
  --nuit: #151853;         /* cartes, triangle, pied de page */
  --rose: #FFD1D1;         /* texte et titres */
  --corail: #E07A84;       /* accent tiré de la bannière "AuBloc" */
  --creme: #FBF7F4;        /* fond des illustrations */
  --rose-doux: rgba(255, 209, 209, .72);
  --trait: rgba(255, 209, 209, .22);
  --police: "DM Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --mesure: 40rem;
  --large: 72rem;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--marine); color: var(--rose);
  font-family: var(--police); font-size: 1.0625rem; line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--corail); outline-offset: 3px; border-radius: 4px; }
.enveloppe { max-width: var(--large); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }


/* En-tête */
.entete { position: relative; isolation: isolate; overflow: hidden; }
.entete::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: var(--nuit);
  clip-path: polygon(38% 0, 100% 0, 100% 62%, 58% 100%);
  opacity: .85;
}
.barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.5rem; }
.logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.logo strong { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.logo span { font-size: .875rem; color: var(--rose-doux); }
.menu { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; list-style: none; margin: 0; padding: 0; }

.accroche { display: grid; max-width: 60rem; margin-inline: auto; gap: clamp(2rem, 4vw, 3rem); padding-block: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.5rem); }
.accroche > * { min-width: 0; }
.accroche-texte { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem clamp(2rem, 5vw, 4rem); align-items: end; }
.accroche-texte > * { min-width: 0; }
.accroche h1 {
  margin: 0; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.08; font-weight: 500;
  letter-spacing: -.02em; text-wrap: balance;
}
.accroche-texte p { margin-top: 0; }
.accroche h1 em { font-style: normal; color: var(--corail); }
.accroche p { margin: 1.25rem 0 0; max-width: 32rem; color: var(--rose-doux); }
.etiquette { display: inline-block; margin-top: 1.5rem; font-size: .8rem; letter-spacing: .06em; }
.banniere { margin: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.banniere img { display: block; width: 100%; height: auto; }

/* Sections */
section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
#publications { padding-top: clamp(1rem, 2vw, 1.5rem); }
.titre-section { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.titre-section h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 500; letter-spacing: -.01em; }
.titre-section p { margin: 0; font-size: .9rem; color: var(--rose-doux); }

/* Recherche */
.recherche { display: grid; gap: .5rem; max-width: 34rem; margin-bottom: 1.25rem; }
.recherche label { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--rose-doux); }
.champ { position: relative; }
.champ svg { position: absolute; left: 1rem; top: 50%; translate: 0 -50%; width: 1.2rem; height: 1.2rem; fill: none; stroke: var(--rose); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.champ input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--rose);
  background: var(--nuit); border: 1px solid var(--trait); border-radius: 999px;
  padding: .75rem 1.2rem .75rem 2.9rem;
}
.champ input::placeholder { color: var(--rose-doux); opacity: .7; }
.champ input:focus { outline: none; border-color: var(--corail); box-shadow: 0 0 0 3px rgba(224, 122, 132, .3); }

/* Filtres par thème */
.themes { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.themes button {
  font: inherit; font-size: .9rem; cursor: pointer; color: var(--rose);
  background: transparent; border: 1px solid var(--trait); border-radius: 999px; padding: .35rem 1rem;
}
.themes button:hover { border-color: var(--rose); }
.themes button[aria-pressed="true"] { background: var(--rose); color: var(--nuit); border-color: var(--rose); }

/* Cartes d'articles */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1.75rem; }
.carte { background: var(--nuit); display: flex; flex-direction: column; text-align: left; }
.carte > a { text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.carte .illus { aspect-ratio: 16 / 10; max-width: 100%; background: var(--creme); display: grid; place-items: center; }
.carte .illus svg { width: 42%; height: auto; }
.carte .corps { padding: 1.5rem 1.6rem 1.8rem; display: grid; gap: .7rem; }
.carte .meta { font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--corail); }
.carte h3 { margin: 0; font-size: 1.45rem; line-height: 1.2; font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-wrap: balance; }
.carte p { margin: 0; font-size: .95rem; color: var(--rose-doux); }
.carte .duree { font-size: .8rem; color: var(--rose-doux); }
.carte > a:hover h3 { color: var(--corail); }
.carte.une { grid-column: 1 / -1; }
.carte.une > a { display: grid; grid-template-columns: 1fr 1fr; }
.carte.une .illus { aspect-ratio: auto; min-height: 16rem; }
.carte.une h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.vide { color: var(--rose-doux); }

/* À propos */
.apropos { background: var(--nuit); }
.apropos .enveloppe { display: grid; grid-template-columns: minmax(0, 26rem) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.apropos .enveloppe > * { min-width: 0; }
.portrait { margin: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.portrait img { display: block; width: 100%; height: auto; }
.apropos p { max-width: var(--mesure); margin: 0 0 1rem; }
.apropos h2 { margin: 0 0 1rem; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 500; }

/* Pied de page */
.pied { padding-block: 2.5rem; font-size: .875rem; color: var(--rose-doux); border-top: 1px solid var(--trait); }
.pied .enveloppe { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* Article */
.article { padding-block: clamp(2rem, 5vw, 4rem) 4rem; }
.retour { all: unset; cursor: pointer; font-size: .95rem; display: inline-block; margin-bottom: 2rem; }
.retour:hover { text-decoration: underline; text-underline-offset: 5px; }
.article header { max-width: none; }
.article h1 { margin: .5rem 0 1rem; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.1; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.article .meta { font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; color: var(--corail); }
.article .infos { color: var(--rose-doux); font-size: .95rem; }
.texte { margin-top: 2.5rem; display: flow-root; } /* toute la largeur ; flow-root contient l'image flottante */
.texte h1, .texte h2 { font-size: 1.5rem; font-weight: 500; margin: 2.5rem 0 .75rem; text-wrap: balance; }
.texte p, .texte li { color: #FFE7E7; }
.texte ol { padding-left: 1.4rem; display: grid; gap: .9rem; }
.texte li::marker { color: var(--corail); font-weight: 700; }
.encadre { margin: 2.5rem 0; padding: 1.5rem 1.6rem; background: var(--rose); color: var(--nuit); border-radius: 4px; }
.encadre strong { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; }
.encadre p { margin: 0; color: var(--nuit); }
.lexique { margin: 2.5rem 0; padding: 1.25rem 0; border-block: 1px solid var(--trait); }
.lexique dt { font-weight: 700; }
.lexique dd { margin: 0 0 .75rem; color: var(--rose-doux); }
.lexique dd:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .accroche-texte { grid-template-columns: 1fr; }
  .carte.une > a { display: flex; }
  .carte.une .illus { min-height: 0; aspect-ratio: 16 / 10; }
  .apropos .enveloppe { grid-template-columns: 1fr; }
  .entete::before { clip-path: polygon(55% 0, 100% 0, 100% 45%); }
}
@media (prefers-reduced-motion: no-preference) {
  .carte { transition: transform .2s ease; }
  .carte:hover { transform: translateY(-4px); }
}

/* ---- Ajouts pour le vrai site ---- */
.evitement { position: absolute; left: -9999px; top: 0; background: var(--rose); color: var(--nuit); padding: .5rem 1rem; z-index: 10; }
.evitement:focus { left: 16px; }
.menu a { text-decoration: none; font-size: .95rem; }
.menu a:hover, .menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.retour { text-decoration: none; }
.carte .illus.photo { display: block; overflow: hidden; }
.carte .illus.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Cadrage choisi dans Pages CMS : partie de la photo gardée visible quand elle est recadrée */
img.cadrage-haut { object-position: 50% 15%; }
img.cadrage-bas { object-position: 50% 85%; }
.presentation p { max-width: var(--mesure); margin: 0 0 1rem; }

/* Image de couverture en haut à droite, le texte coule autour (mise en page journal) */
.couverture { float: right; width: min(42%, 30rem); margin: .35rem 0 1.5rem 2.5rem; border-radius: 6px; overflow: hidden; }
.couverture img { display: block; width: 100%; height: auto; }

/* Contenu écrit dans l'espace d'écriture */
.texte > :first-child { margin-top: 0; }
.texte h3 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 .5rem; }
.texte ul { padding-left: 1.4rem; display: grid; gap: .5rem; }
.texte a { color: var(--corail); text-underline-offset: 3px; }
.texte strong { color: var(--rose); }
.texte img { display: block; max-width: 100%; height: auto; margin: 2rem 0; border-radius: 6px; }
.texte hr { border: 0; border-top: 1px solid var(--trait); margin: 2.5rem 0; }
/* Une "citation" devient l'encadré rose "À retenir" */
.texte blockquote { display: flow-root; margin: 2.5rem 0; padding: 1.5rem 1.6rem; background: var(--rose); color: var(--nuit); border-radius: 4px; }
.texte blockquote::before { content: "À retenir"; display: block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; }
.texte blockquote p, .texte blockquote li, .texte blockquote strong { color: var(--nuit); margin: 0; }
.texte blockquote p + p { margin-top: .75rem; }
.texte .tableau, .texte table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 2rem 0; font-size: .95rem; }
.texte th, .texte td { border: 1px solid var(--trait); padding: .6rem .8rem; text-align: left; vertical-align: top; color: #FFE7E7; }
.texte th { background: var(--nuit); color: var(--rose); }

/* Liens vers les articles voisins */
.voisins { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--trait); }
.voisins a { text-decoration: none; display: grid; gap: .25rem; max-width: 20rem; font-weight: 500; }
.voisins a span { font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--corail); font-weight: 400; }
.voisins a:hover { text-decoration: underline; text-underline-offset: 4px; }
.voisins .droite { text-align: right; margin-left: auto; }
@media (max-width: 760px) {
  .couverture { float: none; width: 100%; margin: 0 0 1.5rem; }
}

/* ---- Portraits et erreurs ---- */
.ancre { display: block; position: relative; top: -1rem; }
.badge { display: inline-block; margin-left: .4rem; padding: 0 .5rem; border-radius: 999px; background: var(--corail); color: var(--nuit); font-size: .7rem; letter-spacing: .04em; vertical-align: middle; }

/* Les deux rubriques en tête de la page d'accueil */
.rubriques { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.rubrique { display: grid; gap: .4rem; align-content: start; padding: 1.4rem 1.6rem; border: 1px solid var(--trait); border-radius: 6px; text-decoration: none; transition: border-color .2s; }
.rubrique:hover { border-color: var(--rose); }
.rubrique strong { font-size: 1.35rem; font-weight: 500; }
.rubrique span { color: var(--rose-doux); font-size: .95rem; }
.rubrique em { font-style: normal; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--corail); margin-top: .3rem; }
.carte-erreur .illus { background: #FFE6E3; }
.carte-premiere .illus { background: #F3EEFA; }

/* Appel à témoigner */
.participer { border-top: 1px solid var(--trait); }
.participer .enveloppe { display: grid; gap: 1rem; justify-items: start; }
.participer h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 500; }
.participer p { margin: 0; max-width: var(--mesure); color: var(--rose-doux); }
.questionnaires { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; width: 100%; margin-top: .75rem; }
.questionnaire { display: grid; gap: .6rem; align-content: start; justify-items: start; padding: 1.4rem 1.6rem; background: var(--nuit); border-radius: 8px; }
.questionnaire strong { font-size: 1.25rem; font-weight: 500; }
.questionnaire span { color: var(--rose-doux); font-size: .95rem; margin-bottom: .4rem; }
.contacts { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: .5rem; }
.bouton { display: inline-block; padding: .7rem 1.4rem; border-radius: 999px; background: var(--rose); color: var(--nuit); text-decoration: none; font-weight: 500; }
.bouton:hover { background: var(--corail); }
.courriel { color: var(--rose-doux); }

/* Page d'un portrait */
.ecoute { margin-top: 2rem; max-width: 48rem; }
.lecteur { display: block; border: 0; border-radius: 12px; }
.attente { margin: 0; padding: 1.5rem; border: 1px dashed var(--trait); border-radius: 12px; color: var(--rose-doux); }
.texte .moments { list-style: none; padding: 0; gap: 0; }
.texte .moments li { display: flex; gap: 1.25rem; padding: .7rem 0; border-bottom: 1px solid var(--trait); }
.texte .moments li:first-child { border-top: 1px solid var(--trait); }
.moments .temps { flex: none; min-width: 3.5rem; color: var(--corail); font-weight: 700; font-variant-numeric: tabular-nums; }
.citations { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.citation { margin: 0; }
.texte .citation blockquote { display: block; margin: 0; padding: 0 0 0 1.5rem; background: none; border-left: 3px solid var(--corail); border-radius: 0; color: var(--rose); font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.4; }
.texte .citation blockquote::before { content: none; }
.liens-episode { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 2.5rem; }

/* Page d'une erreur */
.bienveillance { padding: 1rem 1.25rem; border: 1px solid var(--trait); border-radius: 6px; font-style: italic; color: var(--rose-doux) !important; }
.texte blockquote.reflexe::before { content: "Le réflexe à retenir"; }
.texte blockquote.reflexe p { font-size: 1.15rem; }

/* Page d'une première fois */
.texte blockquote.conseil::before { content: "Mon conseil pour votre première fois"; }
.texte blockquote.conseil p { font-size: 1.15rem; }

/* Vidéo YouTube */
.video { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 12px; overflow: hidden; background: var(--nuit); }
.video.verticale { aspect-ratio: 9 / 16; max-width: 22rem; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ecoute { display: grid; gap: 1rem; }
.aussi { margin: .5rem 0 0; font-size: .9rem; color: var(--rose-doux); }

/* ---- Articles rédigés (première fois, si c'était à refaire) ---- */
/* Qui témoigne : photo + son expérience au bloc */
.qui { display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; margin-top: 2.5rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--nuit); border-radius: 8px; }
.qui > * { min-width: 0; }
.qui-photo { margin: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 5; max-width: 100%; }
.qui-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qui-titre { display: grid; gap: .15rem; margin-bottom: 1rem; font-size: 1.35rem; font-weight: 500; }
.qui-titre em { font-style: normal; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--corail); }
.qui-texte p { margin: 0 0 .9rem; color: #FFE7E7; }
.qui-texte p:last-child { margin-bottom: 0; }
.qui:not(:has(.qui-photo)) { grid-template-columns: 1fr; }

/* Le mot de la fin de Margot */
.mot-fin { margin-top: 3rem; padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--rose); color: var(--nuit); border-radius: 8px; }
.mot-fin-entete { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.mot-fin-entete img { width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover; flex: none; }
.mot-fin h2 { margin: 0; font-size: 1.5rem; font-weight: 500; }
.mot-fin-entete span { font-size: .85rem; letter-spacing: .04em; }
.mot-fin-texte p, .mot-fin-texte li { color: var(--nuit); }
.mot-fin-texte > :first-child { margin-top: 0; }
.mot-fin-texte > :last-child { margin-bottom: 0; }
.mot-fin-texte h2, .mot-fin-texte h3 { font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.mot-fin-texte ul, .mot-fin-texte ol { padding-left: 1.4rem; display: grid; gap: .4rem; }
.mot-fin-texte a { color: var(--nuit); }
.mot-fin-texte img { display: block; max-width: 100%; height: auto; margin: 1.5rem 0; border-radius: 6px; }

/* Les bonnes pratiques en images */
.bonnes-pratiques { margin-top: 3rem; }
.bonnes-pratiques h2 { font-size: 1.5rem; font-weight: 500; margin: 0 0 1.25rem; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem; }
.galerie figure { margin: 0; display: grid; gap: .6rem; align-content: start; }
.galerie img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--nuit); }
.galerie figcaption { font-size: .9rem; color: var(--rose-doux); }

@media (max-width: 640px) {
  .qui { grid-template-columns: 1fr; }
  .qui-photo { max-width: 14rem; }
}
