/* =============================================================================
   site.css — feuille de style unique de lyxoudeveloppement.fr
   Direction : éditorial tech sobre. Aucune dépendance externe.

   Sommaire
     0. Polices
     1. Tokens
     2. Reset
     3. Base
     4. Mise en page
     5. Composants
     6. Utilitaires
   ============================================================================= */


/* =============================================================================
   0. POLICES — auto-hébergées (sous-ensemble latin, licence OFL)
   Aucun appel à un service tiers : l'adresse IP du visiteur n'est jamais
   transmise. Bricolage Grotesque est une police variable (graisses 200 à 800,
   axe de taille optique) ; Caveat sert aux annotations manuscrites.
   ============================================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-opsz-normal.ad33cbc6d232.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/caveat-latin-600-normal.018947f2ec96.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.b1c8a895f5fd.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* =============================================================================
   1. TOKENS
   ============================================================================= */

:root {
  /* Surfaces et encres (mode clair) */
  --paper: #FFFFFF;
  --surface: #FFFFFF;
  --ink: #17201C;
  --ink-muted: #4B544F;
  --line: #17201C;
  --line-soft: #E4E9E6;
  --accent: #2C67F8;
  --erreur: #B42318;

  /* Tapis de découpe */
  --mat: #2E6B53;
  --mat-line: #3B7A5F;
  --mat-line-strong: #4A8A6E;
  --mat-ink: #FFFFFF;
  --mat-ink-muted: #E3F0E9;
  --ruler: #FFE45C;

  /* Cubes colorés, et encre posée sur chacun d'eux */
  --cube-jaune: #FFD23F;
  --cube-orange: #FF8A1F;
  --cube-bleu: #2C67F8;
  --cube-vert: #19B36B;
  --cube-rouge: #DC3128;
  --sur-jaune: #17201C;
  --sur-orange: #2B1300;
  --sur-bleu: #FFFFFF;
  --sur-vert: #08291A;
  --sur-rouge: #FFFFFF;

  /* Couleurs éditoriales */
  --theme-automatisme: var(--cube-orange);
  --theme-ia: var(--cube-bleu);
  --theme-cyber: var(--cube-vert);
  --theme-web: var(--cube-jaune);

  /* Encres de thème : les mêmes teintes, assez sombres pour porter du TEXTE
     sur le papier ou le fond de page. Les tuiles colorées gardent la teinte
     pleine (--cube-…) et leur encre --sur-… */
  --encre-automatisme: #C2410C;
  --encre-ia: #2457D6;
  --encre-cyber: #15803D;
  --encre-web: #8A6500;

  /* Typographie */
  --font-sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Caveat", "Segoe Print", cursive;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Formes */
  --radius: 10px;
  --radius-sm: 4px;
  --shadow-objet: 0 2px 0 rgba(0, 0, 0, .18), 0 14px 24px -12px rgba(0, 0, 0, .45);

  /* Espacement : 8, 16, 24, 32, 48, 64, 80, 96 */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 80px;
  --space-8: 96px;

  /* Mise en page */
  --container: 1120px;

  /* Mouvement */
  --transition: 150ms ease;
}

/* Mode sombre : préférence système, sauf choix explicite « clair » */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111613;
    --surface: #1A211D;
    --ink: #E8EFEA;
    --ink-muted: #A9B6AE;
    --line: #3A4640;
    --line-soft: #2C3631;
    --accent: #7FA2FF;
    --erreur: #FF8A80;
    --mat: #1C4434;
    --mat-line: #244F3E;
    --mat-line-strong: #2B5E49;
    --mat-ink: #E8EFEA;
    --mat-ink-muted: #C7D8CF;
    --ruler: #C9A72E;
    --cube-jaune: #F0C53A;
    --cube-orange: #F5852A;
    --cube-bleu: #3F6BEE;
    --cube-vert: #22A866;
    --cube-rouge: #DC3128;
    --encre-automatisme: #F5852A;
    --encre-ia: #7FA2FF;
    --encre-cyber: #22A866;
    --encre-web: #F0C53A;
    --shadow-objet: 0 2px 0 rgba(0, 0, 0, .4), 0 14px 24px -12px rgba(0, 0, 0, .7);
  }
}

/* Mode sombre : choix explicite enregistré */
:root[data-theme="dark"] {
  --paper: #111613;
  --surface: #1A211D;
  --ink: #E8EFEA;
  --ink-muted: #A9B6AE;
  --line: #3A4640;
  --line-soft: #2C3631;
  --accent: #7FA2FF;
  --erreur: #FF8A80;
  --mat: #1C4434;
  --mat-line: #244F3E;
  --mat-line-strong: #2B5E49;
  --mat-ink: #E8EFEA;
  --mat-ink-muted: #C7D8CF;
  --ruler: #C9A72E;
  --cube-jaune: #F0C53A;
  --cube-orange: #F5852A;
  --cube-bleu: #3F6BEE;
  --cube-vert: #22A866;
  --cube-rouge: #DC3128;
  --encre-automatisme: #F5852A;
  --encre-ia: #7FA2FF;
  --encre-cyber: #22A866;
  --encre-web: #F0C53A;
  --shadow-objet: 0 2px 0 rgba(0, 0, 0, .4), 0 14px 24px -12px rgba(0, 0, 0, .7);
}

/* Tapis de découpe : quadrillage régulier, deux pas de graduation. */
.tapis {
  background-color: var(--mat);
  background-image:
    linear-gradient(var(--mat-line-strong) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--mat-line-strong) 1.5px, transparent 1.5px),
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 200px 200px, 200px 200px, 40px 40px, 40px 40px;
  background-position: -1px -1px;
  color: var(--mat-ink);
}

@media (max-width: 767px) {
  .tapis {
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  }
}

/* Règle graduée jaune posée sur le haut d'une surface : grandes graduations
   tous les 200px, petites tous les 40px. Se combine avec le tapis. */
.regle {
  position: relative;
}

.regle::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 26px;
  background-image:
    linear-gradient(90deg, var(--ruler) 1.5px, transparent 1.5px),
    linear-gradient(90deg, color-mix(in srgb, var(--ruler) 60%, transparent) 1px, transparent 1px);
  background-size: 200px 26px, 40px 12px;
  background-repeat: repeat-x;
  pointer-events: none;
}


/* =============================================================================
   2. RESET
   ============================================================================= */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ol, ul, pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

table {
  border-collapse: collapse;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

[hidden] {
  display: none !important;
}


/* =============================================================================
   3. BASE
   ============================================================================= */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  font-optical-sizing: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  transition: color var(--transition);
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

/* Annotation manuscrite, pour une note brève posée sur une page.
   Taille fixe : chaque usage fixe ensuite la sienne en px (jamais en em,
   sinon la mention rétrécit avec le parent). */
.main-ecrite {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.1;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

:focus-visible {
  outline: 3px solid var(--cube-bleu);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =============================================================================
   4. MISE EN PAGE
   ============================================================================= */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

main.container {
  padding-top: 72px;
  padding-bottom: var(--space-8);
  flex: 1 1 auto;
}

.site-main {
  flex: 1 1 auto;
}


/* =============================================================================
   5. COMPOSANTS
   ============================================================================= */

/* --- En-tête -------------------------------------------------------------- */

.site-header {
  position: relative;
  background: var(--paper);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 72px;
}

.site-header__brand {
  order: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-right: auto;
  color: var(--ink);
}

.site-header__brand:hover {
  text-decoration: none;
}

.site-header__name {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Marque : cube coloré, image fixe */
.logo-mark {
  display: block;
  height: auto;
  flex: none;
}

.site-nav {
  order: 2;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink);
  font-size: 15px;
  padding-bottom: 2px;
  border-bottom: 3px solid transparent;
  transition: border-color var(--transition);
}

.site-nav a:hover {
  text-decoration: none;
  border-bottom-color: var(--line-soft);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--cube-jaune);
}

/* Appel à l'action de l'en-tête : apparence de bouton jaune. */
.site-nav a.site-nav__contact {
  padding: 10px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--cube-jaune);
  color: var(--sur-jaune);
  font-weight: 800;
}

/* Petite pastille du jour ouvert, dans le lien « L'Avent » de l'en-tête. */
.avent-pastille {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--cube-jaune);
  color: var(--sur-jaune);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  vertical-align: middle;
}

/* Bandeau d'aperçu réservé à l'administration : posé sur toutes les pages,
   juste sous l'en-tête. */
.apercu-bandeau {
  background: var(--cube-jaune);
  color: var(--sur-jaune);
  border-bottom: 2px solid var(--line);
}

.apercu-bandeau .container {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.apercu-bandeau__titre {
  font-weight: 800;
}

.apercu-bandeau__detail {
  font-size: 14px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.icon-btn:hover {
  border-color: var(--ink);
}

.site-header__theme {
  order: 3;
}

.site-header__burger {
  order: 4;
  display: none;
}

/* Bouton du menu mobile : plein jaune, sans bordure. */
.site-header__burger.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--cube-jaune);
  color: var(--sur-jaune);
}

/* Bascule clair / sombre : une seule icône visible selon le thème actif */
.theme-toggle__sun {
  display: none;
}

.theme-toggle__moon {
  display: block;
}

:root[data-theme="dark"] .theme-toggle__sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle__moon {
    display: none;
  }
}

/* --- Pied de page --------------------------------------------------------- */

/* Le pied de page reste sombre dans les deux thèmes : il ferme la page.
   Les jetons sont redéfinis localement pour que tous ses composants suivent. */
.site-footer {
  --ink: #D7E2DC;
  --ink-muted: #A3B0A9;
  --line: #2B3731;
  --paper: #17201C;
  --surface: #17201C;
  background: var(--paper);
  color: var(--ink);
  margin-top: var(--space-6);
}

:root[data-theme="dark"] .site-footer {
  --paper: #0B0F0D;
  --surface: #0B0F0D;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-footer {
    --paper: #0B0F0D;
    --surface: #0B0F0D;
  }
}

.site-footer a {
  text-decoration: underline;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 40px;
  padding-top: 56px;
  padding-bottom: var(--space-4);
}

/* Titres de colonnes du pied de page : des annotations manuscrites, comme le
   reste du site (c'est .main-ecrite qui porte la police et la graisse). */
.site-footer__title {
  font-size: 24px;
  color: var(--cube-jaune);
  margin-bottom: var(--space-1);
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 12px;
}

.site-footer__text {
  color: var(--ink-muted);
  font-size: 15px;
  margin-bottom: var(--space-2);
}

.site-footer__social {
  display: flex;
  gap: var(--space-1);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  font-size: 15px;
}

.site-footer__links a {
  color: var(--ink);
}

.site-footer__baseline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-muted);
}

.site-footer__baseline-links {
  display: flex;
  gap: 20px;
}

.site-footer__baseline a {
  color: var(--ink-muted);
}

/* --- Formulaire newsletter (pied de page) --------------------------------- */

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-form__row {
  display: flex;
  gap: var(--space-1);
}

.newsletter-form__row .input {
  flex: 1 1 auto;
  min-width: 0;
}

/* Le champ du pied de page se détache du fond sombre. */
.site-footer .input {
  background: #FFFFFF;
  border-color: transparent;
  color: #17201C;
}

.site-footer .input::placeholder {
  color: #6B7671;
}

/* --- Boutons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--cube-jaune);
  color: var(--sur-jaune);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition);
}

.btn:hover {
  text-decoration: none;
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border: 2px solid currentColor;
  font-weight: 600;
}

.btn--small {
  height: 44px;
  padding: 0 18px;
}

/* --- Pastilles de thème éditorial ---------------------------------------- */

.theme-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--ink-muted);
}

.theme-dot--automatisme {
  background: var(--theme-automatisme);
}

.theme-dot--ia {
  background: var(--theme-ia);
}

.theme-dot--cyber {
  background: var(--theme-cyber);
}

.theme-dot--web {
  background: var(--theme-web);
}

/* --- Corps d'article : le texte (.prose) ---------------------------------- */

.prose {
  max-width: 68ch;
  font-family: var(--font-sans);
  font-size: 20px;
  line-height: 1.7;
}

/* Pages légales : le texte tient dans une colonne de 760px, centrée. */
.prose--legale {
  max-width: 760px;
  margin: 0 auto;
}

.prose h2,
.prose h3 {
  font-family: var(--font-sans);
  scroll-margin-top: 24px;
}

.prose h2 {
  margin: 56px 0 16px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 32px 0 12px;
  font-size: 24px;
  font-weight: 800;
}

.prose p {
  margin-bottom: var(--space-3);
}

.prose ul,
.prose ol {
  margin-bottom: var(--space-3);
  padding-left: var(--space-3);
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li::marker {
  color: var(--encre-ia);
}

.prose li + li {
  margin-top: var(--space-1);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Citation : un post-it jaune, jamais en italique. */
.prose blockquote {
  margin: 32px 0;
  padding: 26px 30px;
  background: var(--cube-jaune);
  color: var(--sur-jaune);
  rotate: -1deg;
  box-shadow: var(--shadow-objet);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.4;
  font-style: normal;
}

.prose blockquote p {
  margin: 0;
}

/* Code en ligne. */
.prose code {
  padding: .1em .35em;
  border-radius: 4px;
  background: var(--line-soft);
  font-family: var(--font-mono);
  font-size: .9em;
}

/* Bloc de code : le fond reste sombre dans les deux modes. */
.prose pre {
  margin-bottom: var(--space-3);
  padding: 22px 24px;
  border-radius: 10px;
  background: #17201C;
  color: #E3F0E9;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .875rem;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .prose pre {
    background: #0B0F0D;
  }
}

:root[data-theme="dark"] .prose pre {
  background: #0B0F0D;
}

.prose table {
  display: block;
  width: 100%;
  margin-bottom: var(--space-3);
  overflow-x: auto;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.prose th,
.prose td {
  padding: 10px 14px;
  text-align: left;
}

.prose thead th {
  border-bottom: 1.5px solid var(--line);
  font-weight: 700;
}

.prose tbody tr {
  border-bottom: 1px solid var(--line-soft);
}

/* Image dans le texte : cadre polaroid léger. */
.prose img {
  max-width: 100%;
  padding: 10px;
  background: #FFFFFF;
  box-shadow: var(--shadow-objet);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .prose img {
    background: #E8EFEA;
  }
}

:root[data-theme="dark"] .prose img {
  background: #E8EFEA;
}

/* hr : une petite règle graduée, sur toute la largeur du texte. */
.prose hr {
  width: 100%;
  height: 14px;
  margin: 48px 0;
  border: 0;
  background-image: linear-gradient(90deg, var(--line) 1.5px, transparent 1.5px);
  background-size: 40px 14px;
  opacity: .5;
}

/* --- Notes en marge : le « ^^ » du Markdown ------------------------------- */

/* La note est rattachée au bloc qui la précède : les deux vivent dans un
   `.annote`, le texte commenté d'abord, la note ensuite. Sous 1280px, la note
   se pose sous le paragraphe ; au-delà, elle part dans la marge de droite. */
.note-marge {
  position: relative;
  margin: 0 0 26px;
  padding-left: 18px;
  font-family: var(--font-hand);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.15;
}

.note-marge--bleu {
  color: var(--encre-ia);
}

.note-marge--orange {
  color: var(--encre-automatisme);
}

.annote > .note-marge {
  /* Le paragraphe commenté garde sa marge basse : la note vient juste dessous. */
  margin-top: -14px;
}

.note-marge p {
  margin: 0;
}

.note-marge a {
  color: inherit;
  text-decoration: underline;
}

.note-marge::before {
  content: "↳";
  position: absolute;
  left: 0;
}

/* À partir de 1280px, la note quitte le fil du texte et se pose en marge. */
@media (min-width: 1280px) {
  .annote {
    position: relative;
  }

  .annote > .note-marge {
    position: absolute;
    top: .2em;
    left: calc(100% + 40px);
    width: min(220px, calc((100vw - 760px) / 2 - 80px));
    margin: 0;
    padding: 0;
    font-size: 25px;
  }

  .annote > .note-marge--bleu {
    rotate: -3deg;
  }

  .annote > .note-marge--orange {
    rotate: 2deg;
  }

  .annote > .note-marge::before {
    content: none;
  }
}

/* À l'impression, la note reprend sa place dans le fil, en italique. */
@media print {
  .note-marge,
  .annote > .note-marge {
    position: static;
    rotate: none;
    margin: 0 0 18px;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    font-style: italic;
  }

  .note-marge::before {
    content: none;
  }
}

@media (max-width: 600px) {
  .prose {
    font-size: 18px;
  }

  .prose blockquote {
    font-size: 20px;
  }
}

/* La citation en post-it suit la même échelle que les citations d'article. */
@media (max-width: 600px) {
  .post-it--citation {
    padding: 22px 24px;
    font-size: 20px;
  }
}

/* --- Formulaires ---------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.label {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.input {
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  transition: border-color var(--transition);
}

.input::placeholder {
  color: var(--ink-muted);
}

.input:focus {
  border-color: var(--cube-bleu);
  outline: 3px solid var(--cube-bleu);
  outline-offset: 2px;
}

.input.is-invalid {
  border-color: var(--erreur);
}

textarea.input {
  height: auto;
  min-height: 180px;
  padding: 12px 14px;
  resize: vertical;
}

.error {
  font-size: 15px;
  color: var(--erreur);
}

/* --- Notices (messages Django) -------------------------------------------- */
/* La confirmation d'un envoi se pose en post-it, en bas à droite. */

.notices {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: min(360px, calc(100% - 48px));
}

.notice {
  padding: 18px 22px;
  rotate: -1deg;
  box-shadow: var(--shadow-objet);
  background: var(--cube-jaune);
  color: var(--sur-jaune);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.notice--success {
  background: var(--cube-vert);
  color: var(--sur-vert);
}

.notice--warning {
  background: var(--cube-jaune);
  color: var(--sur-jaune);
}

.notice--error {
  background: var(--cube-rouge);
  color: var(--sur-rouge);
}

/* Sous 600px, les post-its se posent en haut du contenu : fixés en bas, ils
   recouvraient les champs des formulaires. */
@media (max-width: 600px) {
  .notices {
    position: static;
    width: auto;
    margin: 16px;
  }

  .notice {
    rotate: none;
  }
}


/* =============================================================================
   6. UTILITAIRES
   ============================================================================= */

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

/* Champ piège : invisible pour les visiteurs, accessible aux robots */
.champ-piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.is-hidden {
  display: none;
}

/* --- Points de rupture ---------------------------------------------------- */

@media (max-width: 767px) {
  .site-header__inner {
    min-height: 64px;
    gap: var(--space-1);
  }

  .site-header__name {
    font-size: 18px;
  }

  .site-header__burger {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-1) 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: var(--space-2) var(--space-3);
    border-bottom: 0;
  }

  .site-nav a[aria-current="page"] {
    border-bottom: 0;
  }

  main.container {
    padding-top: var(--space-5);
    padding-bottom: var(--space-6);
  }
}


/* =============================================================================
   7. LE CARNET ET LES ARTICLES
   ============================================================================= */

/* --- Bandeau de page ------------------------------------------------------ */
/* Ouvre les pages du carnet et des présentations : posé sur le tapis, avec la
   règle graduée en haut (classes .tapis .regle sur l'élément). */

.bandeau {
  padding: 64px 0 56px;
}

.bandeau__verbe {
  font-size: 34px;
  color: var(--cube-jaune);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.bandeau__titre {
  margin: 8px 0 0;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--mat-ink);
}

.bandeau__intro {
  margin-top: 16px;
  max-width: 40em;
  font-size: 20px;
  line-height: 1.5;
  color: var(--mat-ink-muted);
}

/* Lien posé sur le tapis : il prend l'encre claire du fond. */
.bandeau__lien {
  display: inline-block;
  margin-top: 20px;
  color: var(--mat-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bandeau__lien:hover {
  color: var(--cube-jaune);
}

.bandeau__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Bandeau plein écran : page introuvable. */
.bandeau--plein {
  display: flex;
  align-items: center;
  min-height: 60vh;
}

/* Sur le tapis, le bouton secondaire passe en blanc. */
.bandeau .btn--secondary {
  color: var(--mat-ink);
}

@media (max-width: 600px) {
  .bandeau {
    padding: 40px 0 40px;
  }
}

/* --- Le carnet : filtres de thème ---------------------------------------- */

.carnet-filtres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.carnet-filtre {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .14);
  color: var(--mat-ink);
  font-size: 16px;
  font-weight: 600;
  transition: background-color var(--transition);
}

.carnet-filtre:hover {
  background: rgba(255, 255, 255, .26);
}

.carnet-filtre[aria-current="true"] {
  background: var(--cube-jaune);
  color: var(--sur-jaune);
}

.carnet-filtre--automatisme[aria-current="true"] {
  background: var(--theme-automatisme);
  color: var(--sur-orange);
}

.carnet-filtre--ia[aria-current="true"] {
  background: var(--theme-ia);
  color: var(--sur-bleu);
}

.carnet-filtre--cyber[aria-current="true"] {
  background: var(--theme-cyber);
  color: var(--sur-vert);
}

.carnet-filtre--web[aria-current="true"] {
  background: var(--theme-web);
  color: var(--sur-jaune);
}

/* Sur une étiquette active, le carré du thème passe au blanc. */
.carnet-filtre[aria-current="true"] .theme-dot {
  background: #FFFFFF;
}

/* --- Le carnet : contenu -------------------------------------------------- */

.carnet-contenu {
  padding-bottom: 96px;
}

/* --- Le carnet : article vedette ----------------------------------------- */

.vedette {
  padding-top: 56px;
}

/* --encre-theme : le verbe de la vedette est posé sur le papier, pas sur une
   tuile : il prend l'encre du thème, lisible, et non la teinte pleine. */
.vedette--automatisme {
  --encre-theme: var(--encre-automatisme);
}

.vedette--ia {
  --encre-theme: var(--encre-ia);
}

.vedette--cyber {
  --encre-theme: var(--encre-cyber);
}

.vedette--web {
  --encre-theme: var(--encre-web);
}

.vedette__cadre {
  rotate: -1deg;
}

.vedette__corps {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.vedette__verbe {
  font-size: 30px;
  color: var(--encre-theme, var(--encre-web));
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.vedette__titre {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.vedette__titre a {
  color: var(--ink);
}

.vedette__titre a:hover {
  text-decoration: underline;
}

.vedette__chapo {
  max-width: 40em;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.vedette__infos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  color: var(--ink-muted);
}

.vedette__theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Deux colonnes seulement quand la place le permet. */
@media (min-width: 900px) {
  .vedette--illustree {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
  }
}

/* --- Le carnet : lignes d'articles --------------------------------------- */

.carnet-liste .carnet__ligne {
  align-items: start;
}

.carnet-liste .carnet__pastille,
.carnet-liste .carnet__date {
  margin-top: 4px;
}

.carnet-liste .carnet__bloc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  row-gap: 6px;
  min-width: 0;
}

.carnet-liste .carnet__titre {
  grid-column: 1 / -1;
}

.carnet-liste .carnet__chapo {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.carnet-liste .carnet__temps {
  align-self: end;
  font-size: 15px;
  white-space: nowrap;
  color: var(--ink-muted);
}

/* Sous 600px, la ligne passe en une colonne : l'ordre de lecture est reposé
   explicitement (date, titre, chapô, temps). Sans cela, le titre placé en
   colonne 2 par la règle générale du carnet se retrouve sous le chapô. */
@media (max-width: 600px) {
  .carnet-liste .carnet__bloc {
    grid-template-columns: minmax(0, 1fr);
  }

  .carnet-liste .carnet__titre {
    grid-column: 1;
    grid-row: 1;
  }

  .carnet-liste .carnet__chapo {
    grid-column: 1;
    grid-row: 2;
  }

  .carnet-liste .carnet__temps {
    grid-column: 1;
    grid-row: 3;
  }
}

/* --- Le carnet : pagination ---------------------------------------------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.pagination__etat {
  font-size: 15px;
  color: var(--ink-muted);
}

.pagination .btn[aria-disabled="true"] {
  opacity: .4;
  cursor: default;
}

/* --- Le carnet : liste vide ---------------------------------------------- */

.liste-vide {
  padding-top: 24px;
  font-size: 30px;
}

/* --- Page article --------------------------------------------------------- */

.brouillon-bandeau {
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--theme-automatisme);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 15px;
}

/* --- Article : bandeau ---------------------------------------------------- */

.article-entete {
  padding: 72px 0 64px;
}

/* Quand une couverture chevauche le bandeau, on lui réserve sa place. */
.article-entete--illustree {
  padding-bottom: 260px;
}

.article-entete__grille {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr);
  padding: 0 var(--space-3);
  align-items: start;
}

.article-entete__corps {
  grid-column: 2;
  min-width: 0;
}

.article-fil {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 16px;
  color: var(--mat-ink-muted);
}

.article-fil a {
  color: var(--mat-ink-muted);
}

.article-fil a:hover {
  text-decoration: underline;
}

.article-entete__verbe {
  font-size: 34px;
  color: var(--cube-jaune);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.article-entete__titre {
  margin: 8px 0 16px;
  font-size: clamp(34px, 4.2vw, 60px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.035em;
  color: var(--mat-ink);
}

.article-entete__chapo {
  max-width: 34em;
  font-size: 22px;
  line-height: 1.45;
  color: var(--mat-ink-muted);
}

.article-entete__etiquettes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

/* Étiquettes : même famille que les filtres du carnet, un cran plus bas.
   Le voile blanc reste léger : sur le tapis clair, un voile plus appuyé
   ferait tomber l'encre atténuée sous le seuil de contraste. */
.etiquette {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  color: var(--mat-ink);
  font-size: 15px;
  font-weight: 600;
}

.etiquette--neutre {
  color: var(--mat-ink-muted);
}

.etiquette--automatisme {
  background: var(--theme-automatisme);
  color: var(--sur-orange);
}

.etiquette--ia {
  background: var(--theme-ia);
  color: var(--sur-bleu);
}

.etiquette--cyber {
  background: var(--theme-cyber);
  color: var(--sur-vert);
}

.etiquette--web {
  background: var(--theme-web);
  color: var(--sur-jaune);
}

/* Polaroid « par Rémi », posé à droite du bandeau, à l'écart du titre. */
.article-entete__auteur {
  display: none;
  position: absolute;
  top: 56px;
  right: var(--space-3);
  width: 170px;
  rotate: 4deg;
}

.article-entete__auteur figcaption {
  height: 44px;
  font-size: 21px;
}

/* --- Article : colonne de lecture ---------------------------------------- */

.article-layout {
  padding: 0 var(--space-3);
}

.article {
  min-width: 0;
  max-width: 760px;
  margin: 0 auto;
}

/* Cadre photo : polaroid sobre, pour les images d'articles. */
.cadre-photo {
  position: relative;
  margin: 0;
  padding: 14px;
  background: #FFFFFF;
  box-shadow: var(--shadow-objet);
}

.cadre-photo::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 110px;
  height: 30px;
  background: rgba(255, 246, 214, .72);
  transform: translateX(-50%) rotate(2deg);
}

.cadre-photo img {
  display: block;
  width: 100%;
  height: auto;
}

/* Les cadres photo restent clairs en mode sombre. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cadre-photo {
    background: #E8EFEA;
  }
}

:root[data-theme="dark"] .cadre-photo {
  background: #E8EFEA;
}

/* La couverture remonte chevaucher le bandeau. */
.article__couverture {
  width: 100%;
  margin: -220px 0 32px;
  rotate: -0.6deg;
}

/* --- Article : sommaire (fiche) ------------------------------------------- */

.sommaire,
.sommaire-aside {
  background: #FFFFFF;
  border-top: 6px solid var(--cube-bleu);
  box-shadow: var(--shadow-objet);
  color: #17201C;
  /* La fiche reste claire même en mode sombre : son encre de thème doit donc
     rester celle du mode clair, sinon le bleu pâlirait sur le papier. */
  --encre-ia: #2457D6;
}

/* Les fiches du sommaire restent claires en mode sombre. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sommaire,
  :root:not([data-theme="light"]) .sommaire-aside {
    background: #E8EFEA;
  }
}

:root[data-theme="dark"] .sommaire,
:root[data-theme="dark"] .sommaire-aside {
  background: #E8EFEA;
}

.sommaire {
  margin: 32px 0 40px;
}

.sommaire summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 10px 20px;
  cursor: pointer;
  list-style: none;
}

.sommaire summary::-webkit-details-marker {
  display: none;
}

.sommaire__resume {
  font-size: 24px;
  color: var(--encre-ia);
}

.sommaire__chevron {
  flex: 0 0 auto;
  transition: transform var(--transition);
}

.sommaire[open] .sommaire__chevron {
  transform: rotate(180deg);
}

/* Liste numérotée : c'est un ordre de lecture. Les numéros sont posés par le
   CSS pour que le filet séparateur coure sur toute la largeur. */
.sommaire__liste,
.sommaire-aside__liste {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sommaire;
}

.sommaire__liste {
  padding: 0 20px 16px;
  border-top: 1px solid #E9EEF7;
}

.sommaire__liste li + li,
.sommaire-aside__liste li + li {
  border-top: 1px solid #E9EEF7;
}

.sommaire__liste a,
.sommaire-aside__liste a {
  display: block;
  padding: 9px 0;
  font-size: 16px;
  color: #4B544F;
}

.sommaire__liste a::before,
.sommaire-aside__liste a::before {
  counter-increment: sommaire;
  content: counter(sommaire) ".";
  display: inline-block;
  min-width: 22px;
  font-weight: 600;
  color: var(--encre-ia);
}

.sommaire__liste a:hover,
.sommaire-aside__liste a:hover {
  color: #17201C;
  text-decoration: underline;
}

/* Partie en cours de lecture : posée par sommaire.js. */
.sommaire__liste a[aria-current="true"],
.sommaire-aside__liste a[aria-current="true"] {
  font-weight: 800;
  color: #17201C;
}

/* --- Article : sommaire (colonne collante) ------------------------------- */

.sommaire-aside {
  display: none;
}

.sommaire-aside__titre {
  margin: 0 0 6px;
  font-size: 26px;
  color: var(--encre-ia);
}

/* --- Article : fin et articles liés -------------------------------------- */

.article__fin {
  margin-top: 64px;
}

.article__appel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 36px 40px;
  border-radius: 4px;
  rotate: 0.5deg;
  box-shadow: var(--shadow-objet);
}

/* « et vous ? » : une mention manuscrite. Le sélecteur porte deux classes pour
   l'emporter sur `.article__appel p` (spécificité 0,1,1) qui fixe 18px. */
.article__appel .article__appel-verbe {
  font-size: 30px;
  color: var(--cube-jaune);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.article__appel h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mat-ink);
}

.article__appel p {
  max-width: 34em;
  font-size: 18px;
  color: var(--mat-ink-muted);
}

.article__appel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* Sur le tapis, le bouton secondaire passe en blanc. */
.article__appel .btn--secondary {
  color: var(--mat-ink);
}

.articles-lies {
  margin-top: 96px;
  padding: 64px 0 96px;
}

.articles-lies h2 {
  margin-bottom: 32px;
  font-size: 36px;
}

.articles-lies__grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.articles-lies__grille .objet {
  min-height: 190px;
}

.articles-lies__grille .objet__titre {
  font-size: 22px;
}

.articles-lies__grille .objet__duree {
  margin-top: auto;
  font-size: 14px;
}

.articles-lies__grille .objet:nth-child(3n + 1) {
  --r: -1.5deg;
}

.articles-lies__grille .objet:nth-child(3n + 2) {
  --r: 1deg;
}

.articles-lies__grille .objet:nth-child(3n + 3) {
  --r: -0.5deg;
}

@media (min-width: 700px) {
  .articles-lies__grille {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- Article : bureau ----------------------------------------------------- */

@media (min-width: 1200px) {
  .article-layout {
    display: grid;
    /* Colonnes latérales au moins larges que la fiche (260px) plus sa marge de
       sécurité (56px) : le sommaire n'est jamais collé au bord de la fenêtre. */
    grid-template-columns: minmax(308px, 1fr) minmax(0, 760px) minmax(308px, 1fr);
    padding: 0;
    align-items: start;
  }

  .article {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .article-entete__auteur {
    display: block;
  }

  .sommaire-aside {
    display: block;
    grid-column: 1;
    /* La ligne est explicite : sans elle, l'article posé en colonne 2 déplace
       le curseur de placement et le sommaire tombe sous l'article. */
    grid-row: 1;
    align-self: start;
    justify-self: end;
    position: sticky;
    top: 24px;
    width: 260px;
    /* La fiche ne déborde jamais de sa colonne quand la place manque. Les 56px
       laissent 8px de marge à gauche : sous 1376px la colonne tombe à 308px, ce
       qui ramène la fiche à 252px et absorbe les 2px pris par la rotation. */
    max-width: calc(100% - 56px);
    margin-right: 48px;
    padding: 18px 20px 14px;
    rotate: -1deg;
  }

  .sommaire--replie {
    display: none;
  }
}

/* --- Article : mobile ----------------------------------------------------- */

@media (max-width: 600px) {
  .article-entete {
    padding: 36px 16px 64px;
  }

  .article-entete--illustree {
    padding-bottom: 120px;
  }

  .article-entete__grille {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }

  .article-entete__titre {
    font-size: 34px;
  }

  .etiquette {
    height: 30px;
    padding: 0 12px;
    font-size: 14px;
  }

  .article-layout {
    padding: 0 16px;
  }

  /* Sous 600px, les rotations sont divisées par deux : sur une colonne unique,
     l'inclinaison écarte les coins du bloc et les ferait sortir de l'écran.
     On retire aussi 2px sur chaque bord aux blocs tournés pleine largeur :
     leur boîte inclinée reste ainsi toujours à 16px du bord. */
  .article__couverture {
    /* Largeur 100% : ce sont les marges qui déborderaient si la largeur ne
       leur cédait pas la place. */
    width: calc(100% - 4px);
    margin: -92px 2px 32px;
    rotate: -0.3deg;
  }

  .prose blockquote {
    margin-left: 2px;
    margin-right: 2px;
    rotate: -0.5deg;
  }

  .article__appel {
    margin-left: 2px;
    margin-right: 2px;
    padding: 28px 24px;
    rotate: 0.25deg;
  }

  .article__appel .article__appel-verbe {
    font-size: 24px;
  }

  .post-it:nth-child(odd) {
    transform: rotate(-0.6deg);
  }

  .post-it:nth-child(even) {
    transform: rotate(0.6deg);
  }

  .article__appel-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .article__appel-actions .btn {
    width: 100%;
  }
}


/* =============================================================================
   8. PAGES DE PRÉSENTATION
   Accueil, À propos, Services et Contact. Uniquement des variables de la charte,
   pour que le mode sombre reste cohérent.
   ============================================================================= */

/* --- Accueil : l'établi --------------------------------------------------- */

/* Un seul plan, douze colonnes : chaque objet connaît sa place. Le bas du plan
   laisse la place aux outils de l'établi, sur grand écran. */
.etabli__plan {
  max-width: 1328px;
  margin: 0 auto;
  padding: 72px 56px 140px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 40px;
  align-items: start;
}

/* Rotation, décalage et place de chaque objet, désignés par leur emplacement. */
.etabli__plan > [data-place="portrait"] {
  grid-column: 1 / 4;
  grid-row: 1 / 3;
  max-width: 320px;
  --r: -3.5deg;
}

.etabli__plan > [data-place="texte"] {
  grid-column: 4 / 10;
  grid-row: 1 / 4;
  align-self: center;
  padding: 0 24px;
}

.etabli__plan > [data-place="article"] {
  grid-column: 1 / 4;
  grid-row: 3;
  --r: 2deg;
  --dx: 12px;
}

.etabli__plan > [data-place="projet-1"] {
  grid-column: 10 / 13;
  grid-row: 1;
  --r: 4deg;
}

.etabli__plan > [data-place="projet-2"] {
  grid-column: 10 / 13;
  grid-row: 2;
  --r: -2.5deg;
  --dx: 24px;
}

.etabli__plan > [data-place="projet-3"] {
  grid-column: 10 / 13;
  grid-row: 3;
  --r: 2deg;
  --dx: -8px;
}

.etabli__plan > [data-place^="projet-"] {
  max-width: 260px;
  justify-self: end;
}

.etabli__plan > [data-place="theme-1"] {
  grid-column: 1 / 4;
  grid-row: 4;
  --r: -3deg;
  --dy: 10px;
}

.etabli__plan > [data-place="theme-2"] {
  grid-column: 4 / 7;
  grid-row: 4;
  --r: 2.5deg;
  --dy: -6px;
}

.etabli__plan > [data-place="theme-3"] {
  grid-column: 7 / 10;
  grid-row: 4;
  --r: -1.5deg;
  --dy: 14px;
}

.etabli__plan > [data-place="theme-4"] {
  grid-column: 10 / 13;
  grid-row: 4;
  --r: 3deg;
}

.etabli__plan > [data-place^="theme-"] {
  margin-top: 24px;
}

/* Objet posé sur l'établi : un article, un projet, un thème.
   --dx / --dy sont le décalage d'origine, --tx / --ty celui de la main. */
.objet,
.polaroid {
  transform: translate(
      calc(var(--dx, 0px) + var(--tx, 0px)),
      calc(var(--dy, 0px) + var(--ty, 0px))
    )
    rotate(calc(var(--r, 0deg) * var(--r-echelle, 1)));
  transition: transform 200ms ease;
}

.objet {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 18px 22px 22px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-objet);
  text-decoration: none;
}

.objet:hover,
.objet:focus-visible {
  transform: translate(
      calc(var(--dx, 0px) + var(--tx, 0px)),
      calc(var(--dy, 0px) + var(--ty, 0px) - 4px)
    )
    rotate(0deg);
}

@media (prefers-reduced-motion: reduce) {
  .objet,
  .polaroid {
    transition: none;
  }
}

.objet__verbe {
  font-family: var(--font-hand);
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
}

.objet__titre {
  font-size: 25px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  hyphens: auto;
}

.objet__texte {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Sous 900 px, trois lignes de texte suffisent sur un objet. */
@media (max-width: 900px) {
  .objet__texte {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

.objet--automatisme {
  background: var(--cube-orange);
  color: var(--sur-orange);
}

.objet--ia {
  background: var(--cube-bleu);
  color: var(--sur-bleu);
}

.objet--cyber {
  background: var(--cube-vert);
  color: var(--sur-vert);
}

.objet--web {
  background: var(--cube-jaune);
  color: var(--sur-jaune);
}

.objet--rouge {
  background: var(--cube-rouge);
  color: var(--sur-rouge);
}

/* Fiche bristol : papier ligné, réservée au troisième projet. */
.objet--fiche {
  background-color: #FFFFFF;
  background-image: linear-gradient(#E9EEF7 1px, transparent 1px);
  background-size: 100% 26px;
  background-position: 0 46px;
  color: #17201C;
  /* Le bristol reste clair en mode sombre : son encre garde la teinte du
     mode clair, sinon le bleu s'éclaircirait sur le papier. */
  --encre-ia: #2457D6;
}

.objet--fiche .objet__verbe {
  color: var(--encre-ia);
}

/* Étiquette de consignation : papier clair, bande hachurée jaune et noire en
   haut, œillet au centre. Porte l'objet du calendrier de l'Avent. */
.objet--avent {
  position: relative;
  padding-top: 30px;
  background-color: #FFFFFF;
  color: #17201C;
}

.objet--avent::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 10px;
  background: repeating-linear-gradient(
    45deg,
    var(--cube-jaune) 0 6px,
    #17201C 6px 12px
  );
}

/* L'œillet : un anneau posé au milieu de la bande, le hachurage le traverse. */
.objet--avent::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 14px;
  height: 14px;
  border: 3px solid #17201C;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Mini-grille : une case par jour, huit colonnes. Décorative : le texte de
   l'objet dit déjà tout. */
.avent-mini {
  display: grid;
  grid-template-columns: repeat(8, 18px);
  gap: 4px;
  margin-top: 10px;
}

/* Consignée : contour en pointillés — c'est le style par défaut de la case. */
.avent-mini__case {
  width: 18px;
  height: 18px;
  border: 2px dashed #17201C;
  border-radius: 2px;
}

/* En préparation : contour plein. */
.avent-mini__case--preparation {
  border-style: solid;
}

/* Ouverte : remplie de la couleur de son thème. */
.avent-mini__case--ouverte {
  border-color: transparent;
}

.avent-mini__case--automatisme {
  background-color: var(--cube-orange);
}

.avent-mini__case--ia {
  background-color: var(--cube-bleu);
}

.avent-mini__case--cyber {
  background-color: var(--cube-vert);
}

.avent-mini__case--web {
  background-color: var(--cube-jaune);
}

/* Case du jour : un anneau jaune autour. */
.avent-mini__case--aujourdhui {
  box-shadow: 0 0 0 2px var(--cube-jaune);
}

/* Polaroid scotché : photo carrée, légende manuscrite. */
.polaroid {
  position: relative;
  margin: 0;
  padding: 14px 14px 0;
  background: #FFFFFF;
  box-shadow: var(--shadow-objet);
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 110px;
  height: 30px;
  background: rgba(255, 246, 214, .72);
  transform: translateX(-50%) rotate(2deg);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.polaroid figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  font-family: var(--font-hand);
  font-size: 27px;
  font-weight: 600;
  color: #2A2F2C;
}

/* Les objets en papier restent clairs en mode sombre. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .polaroid,
  :root:not([data-theme="light"]) .objet--fiche,
  :root:not([data-theme="light"]) .objet--avent {
    background-color: #E8EFEA;
  }
}

:root[data-theme="dark"] .polaroid,
:root[data-theme="dark"] .objet--fiche,
:root[data-theme="dark"] .objet--avent {
  background-color: #E8EFEA;
}

/* Bloc de texte central. */
.etabli__texte {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.etabli__salut {
  font-family: var(--font-hand);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  color: var(--cube-jaune);
  transform: rotate(-2deg);
  transform-origin: left center;
}

.etabli__plan h1 {
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.etabli__intro {
  max-width: 34em;
  font-size: 20px;
  line-height: 1.5;
  color: var(--mat-ink-muted);
}

.etabli__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

/* Sur le tapis, le bouton secondaire prend l'encre claire du fond. */
.etabli .btn--secondary {
  color: var(--mat-ink);
}

/* Tablette : six colonnes, le reste s'empile en flux sous le texte. */
@media (min-width: 901px) and (max-width: 1100px) {
  .etabli__plan {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .etabli__plan > [data-place="portrait"] {
    grid-column: 1 / 3;
    grid-row: auto;
  }

  .etabli__plan > [data-place="texte"] {
    grid-column: 3 / 7;
    grid-row: auto;
    padding: 0;
  }

  .etabli__plan > [data-place="article"],
  .etabli__plan > [data-place^="projet-"],
  .etabli__plan > [data-place^="theme-"] {
    grid-column: auto / span 2;
    grid-row: auto;
    max-width: none;
    justify-self: stretch;
    margin-top: 0;
  }
}

/* Mobile : deux colonnes, ordre du document respecté. */
@media (max-width: 900px) {
  .etabli__plan {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 40px 16px 48px;
  }

  .etabli__plan > [data-place="portrait"] {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: center;
    max-width: 220px;
  }

  .etabli__plan > [data-place="texte"] {
    grid-column: 1 / -1;
    grid-row: auto;
    padding: 0;
  }

  .etabli__plan h1 {
    font-size: 38px;
  }

  .etabli__actions {
    flex-direction: column;
  }

  .etabli__actions .btn {
    width: 100%;
  }

  .etabli__plan > [data-place="article"] {
    grid-column: 1 / -1;
    grid-row: auto;
    --dx: 0px;
    --dy: 0px;
  }

  .etabli__plan > [data-place^="projet-"],
  .etabli__plan > [data-place^="theme-"] {
    grid-column: auto / span 1;
    grid-row: auto;
    max-width: none;
    justify-self: stretch;
    margin-top: 0;
    min-height: 160px;
    --dx: 0px;
    --dy: 0px;
    --r-echelle: .5;
  }

  .etabli__plan > [data-place^="projet-"] .objet__verbe,
  .etabli__plan > [data-place^="theme-"] .objet__verbe {
    font-size: 21px;
  }

  .etabli__plan > [data-place^="projet-"] .objet__titre,
  .etabli__plan > [data-place^="theme-"] .objet__titre {
    font-size: 18px;
  }
}

/* --- Accueil : les outils de l'établi ------------------------------------- */
/* Affichés seulement quand l'interaction est active : le JavaScript retire
   l'attribut hidden. Sans JavaScript, ils restent masqués. */

.etabli__outils {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.etabli__astuce {
  margin-right: auto;
  font-size: 26px;
  color: var(--cube-jaune);
  transform: rotate(-2deg);
  transform-origin: left center;
}

.etabli__cube {
  flex: none;
  width: 72px;
  height: 64px;
  transform: rotate(8deg);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .35));
}

.etabli__ranger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: #FFFFFF;
  color: #17201C;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-objet);
}

.etabli__ranger svg {
  flex: none;
  width: 20px;
  height: 20px;
}

/* Une icône selon l'état : grille pour ranger, flèches croisées pour déranger. */
.etabli__ranger .etabli__icone--grille {
  fill: currentColor;
}

.etabli__ranger .etabli__icone--melange {
  display: none;
}

.etabli__ranger[aria-pressed="true"] .etabli__icone--grille {
  display: none;
}

.etabli__ranger[aria-pressed="true"] .etabli__icone--melange {
  display: block;
}

/* Le papier du bouton reste clair en mode sombre. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .etabli__ranger {
    background: #E8EFEA;
  }
}

:root[data-theme="dark"] .etabli__ranger {
  background: #E8EFEA;
}

/* --- Accueil : déplacer, ranger ------------------------------------------- */

.etabli--interactif .etabli__plan > .objet,
.etabli--interactif .etabli__plan > .polaroid {
  cursor: grab;
}

/* Objet en cours de glisser : il passe au-dessus, sans survol ni transition. */
.etabli--interactif .is-glisse,
.etabli--interactif .is-glisse:hover,
.etabli--interactif .is-glisse:focus-visible {
  cursor: grabbing;
  transition: none;
  box-shadow: 0 24px 40px -16px rgba(0, 0, 0, .55);
  transform: translate(
      calc(var(--dx, 0px) + var(--tx, 0px)),
      calc(var(--dy, 0px) + var(--ty, 0px))
    )
    rotate(calc(var(--r, 0deg) * var(--r-echelle, 1)));
}

/* Pendant le rangement, la rotation suit la position. */
.etabli--anime .objet,
.etabli--anime .polaroid {
  transition: transform 480ms cubic-bezier(.2, .8, .2, 1);
}

/* Établi rangé : le texte à gauche, neuf objets en grille de trois. */
.etabli--range .etabli__plan {
  grid-template-columns: minmax(0, 1fr) repeat(3, 208px);
  column-gap: 14px;
  row-gap: 14px;
  align-items: stretch;
}

.etabli--range .etabli__plan > [data-place="texte"] {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: center;
  padding: 0 64px 0 0;
}

.etabli--range .etabli__plan > [data-place="article"] {
  grid-column: 2;
  grid-row: 1;
}

.etabli--range .etabli__plan > [data-place="projet-1"] {
  grid-column: 3;
  grid-row: 1;
}

.etabli--range .etabli__plan > [data-place="theme-1"] {
  grid-column: 4;
  grid-row: 1;
}

.etabli--range .etabli__plan > [data-place="theme-2"] {
  grid-column: 2;
  grid-row: 2;
}

.etabli--range .etabli__plan > [data-place="portrait"] {
  grid-column: 3;
  grid-row: 2;
}

.etabli--range .etabli__plan > [data-place="projet-2"] {
  grid-column: 4;
  grid-row: 2;
}

.etabli--range .etabli__plan > [data-place="projet-3"] {
  grid-column: 2;
  grid-row: 3;
}

.etabli--range .etabli__plan > [data-place="theme-3"] {
  grid-column: 3;
  grid-row: 3;
}

.etabli--range .etabli__plan > [data-place="theme-4"] {
  grid-column: 4;
  grid-row: 3;
}

/* Chaque objet occupe exactement une case, bien droit. */
.etabli--range .etabli__plan > .objet,
.etabli--range .etabli__plan > .polaroid {
  width: 208px;
  height: 208px;
  max-width: none;
  margin: 0;
  justify-self: stretch;
  border-radius: var(--radius-sm);
  --r: 0deg;
  --dx: 0px;
  --dy: 0px;
}

/* Titre un peu plus petit dans la grille rangée : il tient sur moins de lignes. */
.etabli--range .objet__titre {
  font-size: 20px;
}

.etabli--range .objet__texte {
  margin-top: auto;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* Rangé, l'objet du calendrier perd sa mini-grille : la case est trop petite. */
.etabli--range .objet--avent .avent-mini {
  display: none;
}

/* Le polaroid rangé : photo haute, légende courte, plus de ruban. */
.etabli--range .polaroid {
  padding: 10px 10px 0;
}

.etabli--range .polaroid::before {
  display: none;
}

.etabli--range .polaroid img {
  height: 158px;
  aspect-ratio: auto;
  object-position: 50% 30%;
}

.etabli--range .polaroid figcaption {
  height: 40px;
}

/* --- Accueil : sections --------------------------------------------------- */

.section {
  padding: 48px 0;
}

/* Le premier bloc d'une page garde un haut de page plus large. */
.site-main > .section:first-child {
  padding-top: 72px;
}

/* Un titre posé à même le conteneur respire avant son contenu. */
.section .container > h2 {
  margin-bottom: var(--space-4);
}

/* --- Accueil : le carnet et l'atelier ------------------------------------- */

.carnet {
  display: grid;
  gap: var(--space-6);
}

.carnet__principal h2 {
  font-size: 48px;
}

.carnet__sous-titre {
  margin-top: 12px;
  max-width: 44em;
  color: var(--ink-muted);
}

.carnet__liste {
  margin-top: 32px;
  border-top: 1.5px solid var(--line);
}

.carnet__ligne {
  display: grid;
  grid-template-columns: 22px 130px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1.5px solid var(--line);
}

.carnet__pastille {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.carnet__pastille--automatisme {
  background: var(--theme-automatisme);
}

.carnet__pastille--ia {
  background: var(--theme-ia);
}

.carnet__pastille--cyber {
  background: var(--theme-cyber);
}

.carnet__pastille--web {
  background: var(--theme-web);
}

.carnet__date {
  font-size: 15px;
  color: var(--ink-muted);
}

.carnet__titre {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.carnet__lien {
  margin-top: 24px;
  font-weight: 600;
}

/* Encart « Mon atelier » : l'offre Lyxou Développement. */
.atelier {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.atelier__verbe {
  font-family: var(--font-hand);
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-muted);
}

.atelier__logo {
  width: 200px;
  height: auto;
}

/* Le PNG du logo a un fond blanc : on l'isole sur les fonds sombres. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .atelier__logo {
    padding: 12px;
    border-radius: var(--radius);
    background: #FFFFFF;
  }
}

:root[data-theme="dark"] .atelier__logo {
  padding: 12px;
  border-radius: var(--radius);
  background: #FFFFFF;
}

.atelier h2 {
  font-size: 1.625rem;
}

.atelier__texte {
  max-width: 46em;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* Colonne de droite du carnet : « sur l'établi en ce moment », puis l'atelier. */
.carnet__cote {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.en-cours__titre {
  font-size: 28px;
  font-weight: 800;
}

.en-cours__liste {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
  list-style: none;
}

/* Un carré de la couleur du thème, aligné sur la première ligne du texte. */
.en-cours__ligne {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  column-gap: 14px;
}

.en-cours__carre {
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--line);
}

.en-cours__carre--automatisme {
  background: var(--theme-automatisme);
}

.en-cours__carre--ia {
  background: var(--theme-ia);
}

.en-cours__carre--cyber {
  background: var(--theme-cyber);
}

.en-cours__carre--web {
  background: var(--theme-web);
}

.en-cours__texte {
  font-size: 18px;
  line-height: 1.4;
}

.en-cours__maj {
  margin-top: 20px;
  font-size: 24px;
  color: var(--ink-muted);
}

@media (min-width: 900px) {
  .carnet {
    grid-template-columns: 1fr 400px;
    gap: 96px;
  }
}

/* --- Accueil : projets (polaroids) --------------------------------------- */

.projets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6) var(--space-4);
}

.projets__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 20px;
  background: #FFFFFF;
  box-shadow: var(--shadow-objet);
  color: #17201C;
}

.projets__item:nth-child(3n + 1) {
  transform: rotate(-1deg);
}

.projets__item:nth-child(3n + 2) {
  transform: rotate(1deg);
}

.projets__item:nth-child(3n) {
  transform: rotate(-0.5deg);
}

.projets__item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.projets__item h3 {
  font-size: 1.25rem;
}

.projets__categories,
.projets__texte {
  font-size: 15px;
  line-height: 1.55;
  color: #4B544F;
}

.projets__lien {
  font-size: 15px;
  font-weight: 600;
  color: #17201C;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Les polaroids restent clairs en mode sombre. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .projets__item {
    background: #E8EFEA;
  }
}

:root[data-theme="dark"] .projets__item {
  background: #E8EFEA;
}

@media (max-width: 1100px) {
  .projets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .projets {
    grid-template-columns: 1fr;
  }
}

/* --- Services : les quatre post-its --------------------------------------- */
/* Chaque service est un objet coloré, sans effet de survol : ce n'est pas un
   lien, il ne doit pas inviter au clic. */

.services-postits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.service {
  gap: 12px;
  min-height: 190px;
  --r: -2deg;
}

.service:nth-child(2) {
  --r: 1.5deg;
}

.service:nth-child(3) {
  --r: -1deg;
}

.service:nth-child(4) {
  --r: 2deg;
}

/* Survol et focus rendent le même dessin que le repos : un post-it ne bouge pas. */
.services-postits .service,
.services-postits .service:hover,
.services-postits .service:focus-visible {
  transform: translate(
      calc(var(--dx, 0px) + var(--tx, 0px)),
      calc(var(--dy, 0px) + var(--ty, 0px))
    )
    rotate(calc(var(--r, 0deg) * var(--r-echelle, 1)));
}

.service--jaune {
  background: var(--cube-jaune);
  color: var(--sur-jaune);
}

.service--bleu {
  background: var(--cube-bleu);
  color: var(--sur-bleu);
}

.service--vert {
  background: var(--cube-vert);
  color: var(--sur-vert);
}

.service--orange {
  background: var(--cube-orange);
  color: var(--sur-orange);
}

.service__titre {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.service__texte {
  font-size: 16px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .services-postits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .services-postits {
    grid-template-columns: 1fr;
  }
}

/* --- Accueil : témoignages (post-it) ------------------------------------- */

.temoignages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-5);
}

.post-it {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--cube-jaune);
  color: var(--sur-jaune);
}

.post-it:nth-child(odd) {
  transform: rotate(-1.2deg);
}

.post-it:nth-child(even) {
  transform: rotate(1.2deg);
}

.post-it blockquote {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
}

.post-it figcaption {
  font-family: var(--font-hand);
  font-size: 22px;
  line-height: 1;
}

/* Citation posée seule sur une page : le dessin des citations d'article. */
.post-it--citation {
  max-width: 46em;
  margin: var(--space-5) 0 0;
  padding: 26px 30px;
  rotate: -1deg;
  transform: none;
  box-shadow: var(--shadow-objet);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.4;
}

/* La citation qui suit la frise se détache de la règle graduée. */
.frise + .post-it--citation {
  margin-top: 40px;
}

/* --- À propos : le portrait et le texte ----------------------------------- */

.bloc-portrait {
  display: grid;
  gap: var(--space-5);
}

.bloc-portrait__media {
  justify-self: start;
  width: 100%;
  max-width: 320px;
}

/* Le polaroid reste en vue pendant la lecture du texte. */
@media (min-width: 900px) {
  .bloc-portrait {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }

  .bloc-portrait__media {
    position: sticky;
    top: 24px;
  }
}

/* --- Frise graduée (le parcours, la méthode) ------------------------------ */
/* Une règle graduée verticale : un trait de 2px, une graduation de 12px par
   étape. La dernière étape peut devenir un objet jaune. */

.frise {
  position: relative;
  margin-top: var(--space-4);
  padding-left: 36px;
  list-style: none;
}

.frise::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

/* Le numéro tient la première colonne, le texte la seconde : les deux
   s'alignent sur leur première ligne, l'étape ne fait qu'une ligne de haut. */
.frise__etape {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: baseline;
  padding-bottom: 20px;
}

.frise__etape:last-child {
  padding-bottom: 0;
}

/* La graduation de l'étape, posée sur la règle. */
.frise__etape::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 13px;
  width: 12px;
  height: 2px;
  background: var(--line);
}

.frise__numero {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--encre-ia);
}

.frise__corps {
  min-width: 0;
}

.frise__titre {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.frise__texte {
  font-size: 19px;
  line-height: 1.5;
}

/* Dernière étape : un objet bleu, décalé sur la colonne du texte pour ne plus
   couvrir la règle graduée. */
.frise__etape--objet {
  margin: 8px 0 0 44px;
  padding: 18px 24px 20px;
  background: var(--cube-bleu);
  color: var(--sur-bleu);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-objet);
  rotate: -1deg;
}

.frise__etape--objet .frise__numero {
  color: var(--sur-bleu);
}

.frise__etape--objet::before {
  display: none;
}

/* --- À propos : les domaines en tuiles ------------------------------------ */

.domaines {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.domaines > :nth-child(odd) {
  --r: -1.2deg;
}

.domaines > :nth-child(even) {
  --r: 1.2deg;
}

@media (max-width: 1100px) {
  .domaines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .domaines {
    grid-template-columns: 1fr;
  }
}

/* --- Rangée de boutons ---------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-5);
}

/* --- Lien discret (renvoi vers la page LinkedIn de Lyxou) ----------------- */

.lien-discret {
  display: inline-block;
  margin-top: var(--space-3);
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 600;
}

.lien-discret:hover {
  color: var(--ink);
}

/* --- Services : la méthode en règle graduée horizontale ------------------- */
/* Sous 900px, la méthode garde la frise verticale du parcours ; au-dessus,
   elle s'étale en cinq colonnes sous une règle graduée horizontale. */

/* La méthode pose un titre au-dessus d'un texte : le texte s'en détache. */
.frise--methode .frise__texte {
  margin-top: 6px;
}

@media (min-width: 900px) {
  .frise--methode {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-4);
    padding-top: 26px;
    padding-left: 0;
  }

  /* Même dessin que la règle des bandeaux, à l'encre du texte. */
  .frise--methode::before {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 26px;
    background-color: transparent;
    background-image:
      linear-gradient(90deg, var(--line) 1.5px, transparent 1.5px),
      linear-gradient(90deg, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px);
    background-size: 200px 26px, 40px 12px;
    background-repeat: repeat-x;
  }

  /* Dans la règle horizontale, le numéro se pose au-dessus du titre. */
  .frise--methode .frise__etape {
    display: block;
    padding-bottom: 0;
  }

  .frise--methode .frise__etape::before {
    display: none;
  }

  .frise--methode .frise__numero {
    margin-bottom: 12px;
    font-size: 40px;
  }

  .frise--methode .frise__titre {
    font-size: 22px;
  }

  .frise--methode .frise__texte {
    font-size: 17px;
  }
}

/* --- Les fiches en papier (formulaires et textes) ------------------------- */
/* Une fiche bristol : papier clair dans les deux modes, bordure haute jaune,
   ombre franche, jamais d'inclinaison — on écrit droit sur un formulaire. */

.fiche {
  /* Le papier reste clair en mode sombre : ses encres gardent les valeurs du
     mode clair, sans quoi le texte deviendrait illisible. */
  --surface: #FFFFFF;
  --ink: #17201C;
  --ink-muted: #4B544F;
  --line: #17201C;
  --line-soft: #E4E9E6;
  --accent: #2C67F8;
  --erreur: #B42318;
  max-width: 640px;
  padding: 32px;
  background: #FFFFFF;
  border-top: 6px solid var(--cube-jaune);
  box-shadow: var(--shadow-objet);
  color: var(--ink);
}

.fiche--texte p + p {
  margin-top: var(--space-2);
}

/* --- Contact : le formulaire et le post-it -------------------------------- */

.contact-grille {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 900px) {
  .contact-grille {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 64px;
    align-items: start;
  }
}

.contact-aside {
  gap: 18px;
  rotate: 2deg;
  transform: none;
}

.contact-aside__titre {
  font-size: 30px;
  line-height: 1;
}

.contact-aside__liste {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.contact-aside__liste li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-aside__libelle {
  font-size: 14px;
  font-weight: 600;
}

.contact-aside__liste a {
  color: inherit;
  font-size: 18px;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* --- Points de rupture des pages de présentation ------------------------- */

@media (max-width: 767px) {
  .section {
    padding: 32px 0;
  }

  .site-main > .section:first-child {
    padding-top: 48px;
  }

  .section .container > h2 {
    margin-bottom: var(--space-3);
  }

  main.container {
    padding-top: 48px;
  }

  .carnet__principal h2 {
    font-size: 36px;
  }

  /* Sur écran étroit, le code passe à la ligne au lieu de forcer un
     défilement horizontal : rien ne dépasse la largeur de l'écran. */
  .prose pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}

/* Le carnet sur téléphone : le carré de couleur reste à gauche, la date
   et le titre s'empilent à droite, la date au-dessus. */
@media (max-width: 600px) {
  .carnet__ligne {
    grid-template-columns: 22px minmax(0, 1fr);
    row-gap: 4px;
  }

  .carnet__pastille {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .carnet__date {
    grid-column: 2;
    grid-row: 1;
    font-size: 14px;
  }

  .carnet__titre {
    grid-column: 2;
    grid-row: 2;
    font-size: 20px;
  }
}
