/* Case du Jour · casedujour.net — charte JG&Co. Consulting (ds-jgandco) :
   éditorial et sobre, angles vifs, un seul accent bleu, Space Grotesk + Inter.
   Le titre « Case du Jour » est en Bricolage Grotesque, posé dans des cases. */

@font-face { font-family: "Bricolage Grotesque"; src: url("polices/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("polices/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("polices/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --encre: #0a0a0c;
  --fond: #ffffff;
  --pierre: #f4f3f0;
  --filet: #e2e1dc;
  --discret: #55575c;
  --bleu: #5998b3;
  --bleu-fort: #367390;
  --titre: "Bricolage Grotesque", "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --affiche: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --texte: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --tuile: clamp(46px, 5.5vw, 84px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--fond); color: var(--encre);
  font: 400 16px/1.6 var(--texte);
  overflow-x: hidden;
}
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Grille de filets verticaux en filigrane. */
.grille {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), var(--filet) calc(100% / 12 - 1px) calc(100% / 12));
  opacity: .55;
  -webkit-mask: linear-gradient(#000, transparent 85%); mask: linear-gradient(#000, transparent 85%);
}

/* ——— La scène ——— */
.scene {
  flex: 1; width: min(980px, 100% - 32px); margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 72px 0 48px;
}

.surtitre {
  display: flex; align-items: center; gap: 14px; margin: 0 0 28px;
  font: 500 12px/1 var(--texte); letter-spacing: .28em; text-transform: uppercase; color: var(--discret);
  animation: monte 600ms 100ms both;
}
.surtitre::before { content: ""; width: 40px; height: 2px; background: var(--bleu); }

/* Le titre : chaque lettre dans une case, le trait central du calendrier derrière elle ;
   le J est la case du jour, pleine, traversée d'un reflet. */
.titre { margin: 0 0 36px; }
.titre__mots { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--tuile) * .32); }
.mot { display: flex; gap: 6px; }
.tuile {
  position: relative; display: grid; place-items: center;
  width: var(--tuile); height: var(--tuile);
  border: 1.5px solid var(--encre);
  font: 800 calc(var(--tuile) * .62)/1 var(--titre); letter-spacing: -.02em;
  font-variation-settings: "wdth" 100;
  background: var(--fond);
  animation: tombe 700ms cubic-bezier(.2, .8, .25, 1) both;
  animation-delay: calc(300ms + var(--i) * 70ms);
}
.tuile::before {
  content: ""; position: absolute; top: 8%; bottom: 8%; left: 50%;
  border-left: 1px dashed currentColor; opacity: .28; z-index: -1;
}
.tuile--jour {
  color: #fff; border-color: var(--bleu);
  background:
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%) 150% 0 / 250% 100% no-repeat,
    var(--bleu);
  animation: tombe 700ms cubic-bezier(.2, .8, .25, 1) both, reflet 3.4s 1.8s ease-in-out infinite;
  animation-delay: calc(300ms + var(--i) * 70ms), 1.8s;
}
.tuile--jour::before { opacity: .5; }
.tuile--jour::after {
  content: ""; position: absolute; inset: -7px; border: 1.5px solid var(--bleu);
  animation: respire 2.6s 1.4s ease-in-out infinite both; pointer-events: none;
}

.accroche {
  max-width: 22ch; margin: 0 0 18px;
  font: 500 clamp(28px, 3.6vw, 46px)/1.12 var(--affiche); letter-spacing: -.022em;
  animation: monte 700ms 1s both;
}
.accroche mark { background: var(--bleu-fort); color: #fff; padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.promesse {
  max-width: 58ch; margin: 0 0 32px; color: var(--discret); font-size: clamp(16px, 1.25vw, 18px);
  animation: monte 700ms 1.15s both;
}

.bouton {
  display: inline-flex; align-items: center; gap: 12px; padding: 18px 30px;
  background: var(--bleu); color: #fff; text-decoration: none;
  font: 600 14px/1 var(--texte); letter-spacing: .14em; text-transform: uppercase;
  transition: background 150ms, transform 150ms;
  animation: monte 700ms 1.3s both;
}
.bouton span { transition: transform 150ms; }
.bouton:hover, .bouton:focus-visible { background: var(--bleu-fort); }
.bouton:hover span, .bouton:focus-visible span { transform: translateX(4px); }
.bouton:focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; }
.usages { margin: 18px 0 0; font-size: 14px; color: var(--discret); animation: monte 700ms 1.45s both; }

/* ——— Éléments abstraits ——— */
.decor { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.carre { position: absolute; display: block; animation: flotte 9s ease-in-out infinite alternate; }
.carre--1 { top: 12%; left: 7%; width: 74px; height: 74px; border: 1.5px solid var(--encre); }
.carre--2 { top: 22%; left: 13%; width: 26px; height: 26px; background: var(--bleu); animation-delay: -3s; }
.carre--3 { bottom: 20%; right: 8%; width: 110px; height: 110px; border: 1.5px dashed var(--bleu); animation-delay: -5s; }
.carre--4 { top: 14%; right: 14%; width: 40px; height: 40px; background: var(--pierre); border: 1.5px solid var(--filet); animation-delay: -2s; }
.carre--5 { bottom: 26%; left: 10%; width: 52px; height: 52px; border: 1.5px solid var(--bleu); animation-delay: -6s; }
.carre--6 { bottom: 14%; right: 20%; width: 18px; height: 18px; background: var(--encre); animation-delay: -1s; }
.carre--1::before, .carre--3::before, .carre--5::before {
  content: ""; position: absolute; top: 12%; bottom: 12%; left: 50%; border-left: 1px dashed currentColor; opacity: .35;
}
.carre--3, .carre--5 { color: var(--bleu); }

.etiquette {
  position: absolute; padding: 9px 14px; border: 1px solid var(--bleu); background: var(--fond);
  font: 500 11px/1 var(--texte); letter-spacing: .2em; text-transform: uppercase; color: var(--bleu-fort);
  white-space: nowrap; animation: monte 700ms both;
}
.etiquette--1 { top: 30%; left: 4%; transform: rotate(-6deg); animation-delay: 1.6s; }
.etiquette--2 { top: 27%; right: 5%; transform: rotate(5deg); animation-delay: 1.75s; }
.etiquette--3 { bottom: 34%; right: 3%; transform: rotate(-4deg); animation-delay: 1.9s; }
.etiquette--4 { bottom: 38%; left: 5%; transform: rotate(4deg); animation-delay: 2.05s; }

/* ——— Pied ——— */
.pied {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 24px 28px 26px;
}
.signature { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.signature__avant { font: 500 10px/1 var(--texte); letter-spacing: .28em; text-transform: uppercase; color: var(--discret); }
.signature__logo { display: flex; align-items: baseline; gap: 10px; }
.signature__nom { font: 500 26px/1 var(--affiche); letter-spacing: -.02em; }
.signature__esperluette { color: var(--bleu); }
.signature__metier { font: 400 10px/1 var(--texte); letter-spacing: 3px; color: var(--bleu); }
.pied__liens { display: flex; gap: 22px; margin: 0; font-size: 13px; color: var(--discret); }
.pied__liens a { text-underline-offset: 3px; }
.pied__liens a:hover { color: var(--bleu-fort); }

/* ——— Animations ——— */
@keyframes tombe { from { opacity: 0; transform: translateY(-18px) rotate(-4deg); } }
@keyframes monte { from { opacity: 0; translate: 0 10px; } }
@keyframes reflet { 0% { background-position: 150% 0, 0 0; } 45%, 100% { background-position: -60% 0, 0 0; } }
@keyframes respire { 0%, 100% { opacity: .25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes flotte { to { translate: 0 -14px; rotate: 3deg; } }

/* ——— Petits écrans : le titre passe sur trois lignes, les étiquettes s'effacent ——— */
@media (max-width: 760px) {
  :root { --tuile: clamp(52px, 15vw, 68px); }
  .titre__mots { flex-direction: column; align-items: center; gap: 10px; }
  .etiquette, .carre--2, .carre--3, .carre--4, .carre--5, .carre--6 { display: none; }
  .carre--1 { top: 10px; left: -30px; width: 56px; height: 56px; }
  .surtitre { font-size: 11px; letter-spacing: .2em; gap: 10px; }
  .surtitre::before { width: 24px; }
  .scene { padding-top: 48px; }
  .pied { padding: 20px 16px 24px; }
}

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

/* ——— Pages de texte (mentions légales) ——— */
.page-texte { display: block; }
.texte { width: min(720px, 100% - 32px); margin: 0 auto; padding: 64px 0; }
.texte .surtitre { animation: none; }
.texte h1 { font: 500 clamp(32px, 4vw, 44px)/1.1 var(--affiche); letter-spacing: -.022em; margin: 0 0 32px; }
.texte h2 { font: 500 20px/1.3 var(--affiche); margin: 32px 0 8px; padding-top: 16px; border-top: 1px solid var(--filet); }
.texte p { margin: 0 0 12px; }
.retour-texte { display: inline-block; margin-top: 24px; color: var(--bleu-fort); }
