/* La Matinale — six styles, un par jour (choisi par Claude). Base commune pilotée par des variables ; chaque
   thème (classe theme-… sur <body>) change couleurs, polices et mise en page. La couleur d'accent du jour arrive
   par /accent/<couleur>.css (--accent). Pensé d'abord pour le téléphone. */

@font-face { font-family: "Josefin Sans"; src: url("polices/josefin-sans.woff2") format("woff2");
  font-weight: 100 700; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("polices/cormorant-garamond-600.woff2") format("woff2");
  font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("polices/cormorant-garamond-600-italique.woff2") format("woff2");
  font-weight: 600; font-style: italic; font-display: swap; }

:root {
  --accent: #A3195B;
  --miel: #DBA765;
  --fond: #FFFFFF;
  --texte: #1D1D1B;
  --doux: #6F6F6E;
  --filet: #E4DED4;
  --carte: transparent;
  --pt-fond: #F6EBDB;
  --pt-bord: #DBA765;
  --pt-mot: #8E5F22;
  --police: "Josefin Sans", "Helvetica Neue", Arial, sans-serif;
  --police-titres: "Josefin Sans", "Helvetica Neue", Arial, sans-serif;
  --graisse-titres: 300;
  --rayon: 4px;
  --bouton-fond: #1D1D1B;
  --bouton-texte: #FFFFFF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police); font-size: 17px;
  line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 3px; }
[hidden] { display: none !important; }
strong { font-weight: 600; }

/* Bandeau */
.bandeau { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px 10px; background: color-mix(in srgb, var(--fond) 94%, transparent);
  border-bottom: 1px solid var(--filet); backdrop-filter: blur(8px); }
.marque { color: var(--accent); text-decoration: none; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  font-size: 13px; white-space: nowrap; font-family: "Josefin Sans", sans-serif; }
.bandeau nav { display: flex; gap: 16px; font-size: 14px; }
.bandeau nav a { color: var(--doux); text-decoration: none; padding: 4px 0; white-space: nowrap; }
.bandeau nav a[aria-current="page"] { color: var(--texte); border-bottom: 2px solid var(--miel); }

.page { max-width: 680px; margin: 0 auto; padding: 8px 16px 64px; }

/* Barre de lecture */
.progression { position: fixed; top: 0; left: 0; z-index: 10; height: 3px; width: 0; background: var(--accent);
  transition: width .1s linear; }

/* Une */
.une { padding: 26px 0 8px; }
.une__haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.surtitre { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; font-family: "Josefin Sans", sans-serif; }
.une__date { margin: 0; font-size: 15px; color: var(--doux); }
.une__titre, h1.une__date { margin: 10px 0 0; font-family: var(--police-titres); font-weight: var(--graisse-titres);
  font-size: 34px; line-height: 1.15; letter-spacing: -.01em; color: var(--texte); }
h1.une__date { margin-top: 0; }
.une__meta { margin: 10px 0 0; color: var(--doux); font-size: 14px; }

.titre-section { margin: 40px 0 14px; padding-bottom: 8px; font-family: "Josefin Sans", sans-serif; font-size: 13px;
  font-weight: 700; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--texte); }

/* Météo animée */
.meteo { flex: 0 0 auto; width: 92px; height: 70px; overflow: visible; }
.meteo__soleil circle { fill: #F2B134; }
.meteo__rayons line { stroke: #F2B134; stroke-width: 3; stroke-linecap: round; }
.meteo__rayons { animation: tourner 24s linear infinite; transform-box: view-box; }
.meteo__nuage path { fill: #E9EDF2; stroke: #B9C2CC; stroke-width: 1.5; animation: flotter 6s ease-in-out infinite; }
.meteo__nuage--sombre path { fill: #9AA5B1; stroke: #6F7B88; }
.meteo__pluie line { stroke: #4A8FD1; stroke-width: 2.5; stroke-linecap: round; animation: tomber 1.1s linear infinite; }
.meteo__neige circle { fill: #A8C6E0; animation: tomber 2.4s linear infinite; }
.goutte--2 { animation-delay: .3s !important; } .goutte--3 { animation-delay: .6s !important; }
.goutte--4 { animation-delay: .9s !important; }
.meteo__eclair { fill: #F2C14E; animation: eclair 3.2s infinite; }
.meteo__vent path, .meteo__brume line { fill: none; stroke: #9AA5B1; stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 90; animation: souffler 3s ease-in-out infinite; }
@keyframes tourner { to { transform: rotate(360deg); } }
@keyframes flotter { 50% { transform: translateX(4px); } }
@keyframes tomber { from { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(10px); opacity: 0; } }
@keyframes eclair { 0%, 88%, 100% { opacity: 0; } 90%, 94% { opacity: 1; } }
@keyframes souffler { 0% { stroke-dashoffset: 90; } 60%, 100% { stroke-dashoffset: 0; } }

/* L'essentiel */
.essentiel ol { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.essentiel li { counter-increment: n; position: relative; padding: 12px 0 12px 44px; border-bottom: 1px solid var(--filet);
  font-size: 18px; line-height: 1.45; }
.essentiel li::before { content: counter(n); position: absolute; left: 0; top: 8px; font-weight: 300; font-size: 30px;
  color: var(--miel); line-height: 1; font-family: var(--police-titres); }

/* Infos */
.info { padding: 20px 0 18px; border-bottom: 1px solid var(--filet); }
.info__titre { margin: 0 0 10px; font-family: var(--police-titres); font-weight: 400; font-size: 24px; line-height: 1.25; }
.info--breve .info__titre { font-size: 19px; font-weight: 600; }
.info__faits p { margin: 0 0 12px; }
.suite { display: inline-block; margin-right: 8px; padding: 2px 8px 0; vertical-align: 3px; border: 1px solid var(--miel);
  border-radius: 3px; color: var(--pt-mot); font-family: "Josefin Sans", sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; }
.pour-toi { margin: 4px 0 10px; padding: 10px 14px; background: var(--pt-fond); border-left: 3px solid var(--pt-bord);
  border-radius: 0 var(--rayon) var(--rayon) 0; line-height: 1.5; }
.pour-toi p { margin: 0 0 8px; }
.pour-toi p:last-child { margin-bottom: 0; }
.pour-toi__mot { display: block; margin-bottom: 2px; color: var(--pt-mot); font-family: "Josefin Sans", sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.sources { margin: 6px 0 0; font-size: 14px; color: var(--doux); }
.sources a { color: var(--doux); }

.gestes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.geste { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--filet);
  border-radius: 20px; background: transparent; color: var(--doux); font: inherit; font-size: 14px; cursor: pointer;
  transition: transform .15s ease, background .2s ease; }
.geste:active { transform: scale(.94); }
.geste svg { width: 18px; height: 18px; fill: currentColor; }
.geste span { line-height: 1; padding-top: 2px; }
.geste[data-avis="1"][aria-pressed="true"] { border-color: var(--accent); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent); }
.geste[data-avis="-1"][aria-pressed="true"] { border-color: var(--texte); color: var(--texte);
  background: color-mix(in srgb, var(--texte) 8%, transparent); }
.geste.saute svg { animation: sauter .35s ease; }
@keyframes sauter { 50% { transform: scale(1.35) rotate(-8deg); } }
.plus-form { margin: 0 0 0 auto; }
.plus { margin-left: auto; min-height: 40px; padding: 8px 14px 6px; border: 0; border-radius: 20px; background: var(--bouton-fond);
  color: var(--bouton-texte); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.plus-form .plus { margin-left: 0; }

.duo .titre-section { margin-top: 32px; }
.anecdote .info, .culture .info { background: color-mix(in srgb, var(--miel) 12%, var(--fond)); padding: 18px 16px;
  border: 0; border-radius: var(--rayon); }
.culture .info__titre { font-size: 28px; }
.culture .info__faits p:first-child::first-letter, .a-la-une .info__faits p:first-child::first-letter {
  float: left; margin: 6px 8px 0 0; font-family: var(--police-titres); font-size: 3.4em; line-height: .8; color: var(--accent); }

.phrase-du-jour { margin: 36px 0 8px; padding: 18px 0 18px 22px; border-left: 4px solid var(--accent); }
.phrase-du-jour p { margin: 0; font-family: var(--police-titres); font-size: 24px; line-height: 1.35; font-style: italic; }

.voisines { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; font-size: 14px; }
.style-du-jour { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--filet); color: var(--doux); font-size: 14px; }
.style-du-jour p { margin: 0 0 8px; }

/* Apparition au défilement (seulement si le JavaScript tourne) */
.js-anim .apparition { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-anim .apparition.visible { opacity: 1; transform: none; }

/* Encadrés, attente, messages */
.encadre { margin-top: 20px; padding: 18px 16px; border: 1px solid var(--filet); border-radius: var(--rayon); }
.encadre__titre { margin: 0 0 8px; font-weight: 400; font-size: 22px; line-height: 1.3; }
.encadre p { margin: 0 0 12px; }
.discret { color: var(--doux); font-size: 14px; }
.lien-derniere { margin-top: 24px; }
.message { padding: 10px 14px; background: color-mix(in srgb, var(--miel) 14%, var(--fond)); border-left: 3px solid var(--miel); }
.message--erreur { border-left-color: var(--accent); }
.retour { margin: 20px 0 0; font-size: 14px; }
.sablier { display: inline-block; width: 16px; height: 16px; margin-right: 10px; vertical-align: -1px; border: 2px solid var(--filet);
  border-top-color: var(--accent); border-radius: 50%; animation: tourner 1s linear infinite; }

/* Boutons et champs */
.bouton { display: inline-block; min-height: 44px; padding: 10px 18px 8px; border: 1px solid var(--bouton-fond); border-radius: var(--rayon);
  background: var(--bouton-fond); color: var(--bouton-texte); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.bouton--discret { background: transparent; color: var(--texte); border-color: var(--filet); }
.rangee { display: flex; flex-wrap: wrap; gap: 8px; }
.rangee form { margin: 0; }
.zone { display: block; width: 100%; margin: 0 0 10px; padding: 12px; border: 1px solid var(--filet); border-radius: 4px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; color: var(--texte); background: var(--fond); }
.champ { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--filet); border-radius: 4px;
  font: inherit; color: var(--texte); background: var(--fond); }
.formulaire-court label, .connexion label { display: block; margin-bottom: 14px; font-size: 15px; }
.connexion { max-width: 360px; margin: 18vh auto 0; }
.connexion .une__date { margin-bottom: 24px; }

/* Article */
.article { padding-top: 18px; }
.article__titre { margin: 0; font-weight: 300; font-size: 32px; line-height: 1.2; }
.article__chapeau { margin: 18px 0 8px; font-size: 19px; line-height: 1.5; }
.article__chapeau p { margin: 0 0 10px; }
.article__intertitre { margin: 30px 0 10px; font-weight: 600; font-size: 20px; line-height: 1.3; }
.article__texte p { margin: 0 0 14px; }
.pour-toi--large { margin-top: 28px; padding: 14px 16px; }
.article__sources ul { margin: 0; padding-left: 18px; font-size: 15px; }

/* Éditions, coûts, versions */
.liste-editions { margin: 0; padding: 0; list-style: none; }
.liste-editions li { border-bottom: 1px solid var(--filet); }
.liste-editions a { display: block; padding: 12px 0; color: var(--texte); text-decoration: none; }
.liste-editions__date { display: block; font-weight: 600; }
.liste-editions__resume { display: block; color: var(--doux); font-size: 15px; line-height: 1.45; }
.chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.chiffre { padding: 14px; border: 1px solid var(--filet); border-radius: 4px; }
.chiffre__valeur { margin: 0; font-weight: 300; font-size: 28px; line-height: 1.1; }
.chiffre__legende { margin: 6px 0 0; font-size: 14px; line-height: 1.4; }
.jauge { height: 6px; margin: 16px 0 8px; background: #F3EEE6; border-radius: 3px; overflow: hidden; }
.jauge__plein { display: block; height: 100%; width: 0; background: var(--miel); }
.jauge__plein--alerte { background: var(--accent); }
.appels { margin: 0; padding: 0; list-style: none; }
.appel { padding: 10px 0; border-bottom: 1px solid var(--filet); font-size: 15px; }
.appel__haut { display: flex; justify-content: space-between; gap: 10px; }
.appel--echec .appel__haut span { color: var(--accent); }
.tableau { width: 100%; border-collapse: collapse; font-size: 15px; }
.tableau th, .tableau td { padding: 8px 4px; border-bottom: 1px solid var(--filet); text-align: left; }
.tableau th:last-child, .tableau td:last-child { text-align: right; }
.version { border-bottom: 1px solid var(--filet); padding: 10px 0; }
.version summary { cursor: pointer; }
.version__texte { white-space: pre-wrap; font-size: 13px; background: #F8F5F0; padding: 12px; border-radius: 4px; }

/* ═══ Thème GAZETTE : journal papier d'autrefois ═══════════════════════════════════════════════════════════ */
.theme-gazette { --fond: #F6F0E4; --texte: #2A2118; --doux: #6E5F4E; --filet: #D8CCB6; --police: Georgia, "Iowan Old Style",
  "Times New Roman", serif; --police-titres: "Cormorant", Georgia, serif; --graisse-titres: 600; --pt-fond: #EFE5D2;
  --pt-bord: var(--accent); --pt-mot: var(--accent); --rayon: 0; --bouton-fond: #2A2118; }
.theme-gazette .une { text-align: center; border-top: 4px double var(--texte); border-bottom: 4px double var(--texte);
  margin-top: 18px; padding: 14px 0 16px; }
.theme-gazette .une__haut { flex-direction: column; align-items: center; }
.theme-gazette .une__titre { font-size: 38px; }
.theme-gazette .meteo { width: 70px; height: 54px; }
.theme-gazette .titre-section { text-align: center; border-bottom: 0; border-top: 1px solid var(--texte); padding-top: 8px;
  font-family: var(--police-titres); font-size: 16px; letter-spacing: .3em; }
.theme-gazette .info { border-bottom: 1px dotted var(--doux); }
.theme-gazette .info__faits { text-align: justify; hyphens: auto; }
.theme-gazette .info__titre { font-size: 27px; }
.theme-gazette .info--breve .info__titre { font-size: 21px; }
.theme-gazette .essentiel li::before { color: var(--accent); }
.theme-gazette .fond .info__faits p:first-child::first-letter { float: left; margin: 6px 8px 0 0; font-family: var(--police-titres);
  font-size: 3.4em; line-height: .8; color: var(--accent); }
@media (min-width: 640px) { .theme-gazette .breves { column-count: 2; column-gap: 28px; column-rule: 1px solid var(--filet); }
  .theme-gazette .breves > div { break-inside: avoid; } }

/* ═══ Thème MAGAZINE : grande une colorée ═════════════════════════════════════════════════════════════════ */
.theme-magazine { --police-titres: "Josefin Sans", sans-serif; --graisse-titres: 700; --rayon: 14px; --filet: #ECE7E1;
  --pt-fond: color-mix(in srgb, var(--accent) 9%, #fff); --pt-bord: var(--accent); --pt-mot: var(--accent); }
.theme-magazine .une { margin: 12px -16px 0; padding: 28px 20px 26px; color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #1D1D1B)); border-radius: 0 0 26px 26px; }
.theme-magazine .une .surtitre, .theme-magazine .une__date, .theme-magazine .une__meta, .theme-magazine .une__titre { color: #fff; }
.theme-magazine .une__titre { font-size: 38px; line-height: 1.08; letter-spacing: -.02em; }
.theme-magazine .meteo__nuage path { fill: rgba(255,255,255,.9); stroke: rgba(255,255,255,.5); }
.theme-magazine .essentiel ol { display: grid; gap: 10px; }
.theme-magazine .essentiel li { padding: 16px 16px 16px 64px; border: 0; border-radius: var(--rayon); background: #F7F4F0; }
.theme-magazine .essentiel li::before { left: 16px; top: 12px; font-size: 40px; font-weight: 700; color: var(--accent); }
.theme-magazine .info { padding: 18px; margin-bottom: 12px; border: 0; border-radius: var(--rayon); background: #fff;
  box-shadow: 0 6px 24px rgba(29,29,27,.08); }
.theme-magazine .a-la-une .info { background: #1D1D1B; color: #fff; }
.theme-magazine .a-la-une .info__titre { font-size: 30px; font-weight: 700; color: #fff; }
.theme-magazine .a-la-une .pour-toi { background: rgba(255,255,255,.1); color: #fff; }
.theme-magazine .a-la-une .sources a, .theme-magazine .a-la-une .geste { color: #ddd; }
.theme-magazine .a-la-une .plus { background: var(--accent); }
.theme-magazine .titre-section { border-bottom: 0; color: var(--accent); }
.theme-magazine .phrase-du-jour { border: 0; padding: 0; text-align: center; }
.theme-magazine .phrase-du-jour p { font-size: 30px; font-style: normal; font-weight: 700; color: var(--accent); }
.theme-magazine .phrase-du-jour p::before { content: "“"; display: block; font-size: 70px; line-height: .6; }
@media (min-width: 720px) { .theme-magazine .breves { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } }

/* ═══ Thème NUIT : sombre et lumineux ═════════════════════════════════════════════════════════════════════ */
.theme-nuit { --fond: #12131A; --texte: #ECEAE4; --doux: #9C9AA6; --filet: #2A2D3A; --miel: #E3B873;
  --pt-fond: color-mix(in srgb, var(--accent) 12%, #12131A); --pt-bord: var(--accent); --pt-mot: var(--accent);
  --bouton-fond: var(--accent); --bouton-texte: #12131A; --rayon: 10px; }
.theme-nuit .une__titre { text-shadow: 0 0 28px color-mix(in srgb, var(--accent) 45%, transparent); }
.theme-nuit .titre-section { border-bottom-color: var(--filet); color: var(--accent); }
.theme-nuit .info { border-bottom-color: var(--filet); }
.theme-nuit .anecdote .info, .theme-nuit .culture .info { background: #1B1D27; }
.theme-nuit .meteo__nuage path { fill: #3A3F52; stroke: #565C73; }
.theme-nuit .une { position: relative; }
.theme-nuit .une::before { content: ""; position: absolute; inset: -20px -16px auto; height: 140px; z-index: -1;
  background: radial-gradient(1px 1px at 12% 30%, #fff8, transparent), radial-gradient(1px 1px at 38% 12%, #fff6, transparent),
  radial-gradient(1.5px 1.5px at 70% 40%, #fff7, transparent), radial-gradient(1px 1px at 88% 18%, #fff5, transparent); }

/* ═══ Thème RIVIERA : sable, bleu et vagues ═══════════════════════════════════════════════════════════════ */
.theme-riviera { --fond: #FBF6EE; --texte: #1E3138; --doux: #5F7378; --filet: #E8DCC8; --rayon: 18px;
  --pt-fond: color-mix(in srgb, var(--accent) 9%, #fff); --pt-bord: var(--accent); --pt-mot: var(--accent);
  --bouton-fond: var(--accent); }
.theme-riviera .une { padding-bottom: 34px; background: no-repeat bottom / 100% 22px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 22' preserveAspectRatio='none'%3E%3Cpath d='M0 11 Q37 0 75 11 T150 11 T225 11 T300 11 T375 11 T450 11 T525 11 T600 11' fill='none' stroke='%231F6F8B' stroke-opacity='.35' stroke-width='2'/%3E%3C/svg%3E"); }
.theme-riviera .une__titre { color: var(--accent); }
.theme-riviera .titre-section { border-bottom: 0; color: var(--accent); font-size: 14px; }
.theme-riviera .info { padding: 18px; margin-bottom: 14px; border: 0; border-radius: var(--rayon); background: #fff;
  box-shadow: 0 4px 18px rgba(31,111,139,.08); }
.theme-riviera .essentiel li { border-bottom-style: dashed; }
.theme-riviera .essentiel li::before { color: var(--accent); }
@media (min-width: 720px) { .theme-riviera .breves { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } }

/* ═══ Thème MINIMAL : grille suisse ═══════════════════════════════════════════════════════════════════════ */
.theme-minimal { --police: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; --police-titres: var(--police);
  --graisse-titres: 700; --texte: #000; --doux: #555; --filet: #000; --rayon: 0; --pt-fond: transparent;
  --pt-bord: var(--accent); --pt-mot: var(--accent); --bouton-fond: #000; }
.theme-minimal .une { border-bottom: 6px solid #000; padding-bottom: 18px; }
.theme-minimal .une__titre { font-size: 40px; letter-spacing: -.03em; line-height: 1.02; }
.theme-minimal .titre-section { border-bottom-width: 2px; }
.theme-minimal .essentiel li { padding-left: 76px; min-height: 76px; }
.theme-minimal .essentiel li::before { font-size: 64px; font-weight: 700; color: var(--accent); top: 4px; letter-spacing: -.04em; }
.theme-minimal .info { border-bottom: 1px solid #000; }
.theme-minimal .info__titre { letter-spacing: -.02em; }
.theme-minimal .pour-toi { border-left-width: 6px; padding-left: 12px; }
.theme-minimal .meteo { filter: grayscale(1); }

@media (max-width: 420px) { .geste span { display: none; } .geste { padding: 6px 14px; } }
@media (min-width: 720px) { .une__titre { font-size: 44px; } .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-anim .apparition { opacity: 1; transform: none; }
}
.culture .info > .surtitre { display: none; }  /* « Culture G » est déjà le titre de la section */
