/* =========================================================
   Sun Med — système commun (site + appli)
   Typo auto-hébergée (Fontshare, licence FFL) : Zodiak (titres, notes en italique) · Switzer (texte, UI)
   Couleurs : papier crème + rose poudré, UN accent fuchsia. Jaune = surligneur / étoiles uniquement.
   ========================================================= */
@font-face{font-family:"Zodiak";src:url(fonts/Zodiak-Regular.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Zodiak";src:url(fonts/Zodiak-Italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Zodiak";src:url(fonts/Zodiak-Bold.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Zodiak";src:url(fonts/Zodiak-BoldItalic.woff2) format("woff2");font-weight:700;font-style:italic;font-display:swap}
@font-face{font-family:"Switzer";src:url(fonts/Switzer-Regular.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Switzer";src:url(fonts/Switzer-Italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Switzer";src:url(fonts/Switzer-Medium.woff2) format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Switzer";src:url(fonts/Switzer-Semibold.woff2) format("woff2");font-weight:600;font-style:normal;font-display:swap}

:root{
  color-scheme:light;
  --paper:#fbf5ee; --paper-2:#f3e9de; --sheet:#fffcf8; --blush:#f9dde8; --blush-2:#f4c9da;
  --ink:#2a1a20; --ink-2:#6a5559; --ink-3:#a08f92; --rule:#eedfd3; --rule-2:#e0cdbf; --line-blue:#cfe0ef;
  --accent:#e2307c; --accent-wash:#fde4ee;
  --hl:#ffe76a; --star:#ffd23f;
  --ok:#2f8f6b; --warn:#c47a00; --late:#c8323c;
  --serif:"Zodiak",Georgia,serif; --sans:"Switzer",system-ui,sans-serif; --mono:"Switzer",system-ui,sans-serif; --hand:"Zodiak",Georgia,serif;
  --r:6px; --r-lg:12px;
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .2 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fibers:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .4 0 0 0 0 .32 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"]{
  --paper:#1a1214; --paper-2:#231a1c; --sheet:#20171a; --blush:#2e1b23; --blush-2:#3a2029;
  --ink:#f6ebe6; --ink-2:#c9b5b1; --ink-3:#8f7d7b; --rule:#33272a; --rule-2:#433437; --line-blue:#2a3440;
  --accent:#ff5c9a; --accent-wash:#3a1726; --hl:#7d6a00;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.6 var(--sans);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;position:relative}
/* grain papier sur toute la page */
body::before{content:"";position:fixed;inset:0;background-image:var(--grain);opacity:.07;pointer-events:none;z-index:100}
h1,h2,h3,h4{font-family:var(--serif);font-weight:400;letter-spacing:-.015em;line-height:1.02;margin:0}
em,.it{font-family:var(--serif);font-style:italic}
.mono{font-family:var(--sans);font-size:11.5px;font-weight:600;letter-spacing:.14em;text-transform:uppercase}
.hand{font-family:var(--serif);font-style:italic}
a{color:inherit}
button{font:inherit;color:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
::selection{background:var(--blush-2)}
.hl{background:linear-gradient(100deg,transparent 2%,var(--hl) 4%,var(--hl) 95%,transparent 97%) no-repeat 0 78%/100% 38%;padding:0 .06em}

/* boutons */
.btn{display:inline-flex;align-items:center;gap:10px;border:1.5px solid var(--ink);border-radius:999px;padding:13px 24px;font-weight:600;text-decoration:none;background:var(--ink);color:var(--paper);transition:background .15s,color .15s,transform .15s,box-shadow .15s;box-shadow:3px 3px 0 var(--accent)}
.btn:hover{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:3px 3px 0 var(--ink)}
.btn:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
.btn-line{background:var(--sheet);color:var(--ink);box-shadow:none}
.btn-line:hover{background:var(--ink);color:var(--paper);border-color:var(--ink);box-shadow:none}
.link{font-weight:600;text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:4px;text-decoration-color:var(--accent)}
.link:hover{color:var(--accent)}

/* ---------- matières ---------- */
.paper{background-color:var(--sheet);background-image:var(--fibers)}
.blush{background-color:var(--blush);background-image:var(--fibers)}
/* feuille lignée avec marge rose */
.ruled{background-color:var(--sheet);background-image:
  linear-gradient(90deg,transparent 54px,var(--blush-2) 54px,var(--blush-2) 56px,transparent 56px),
  repeating-linear-gradient(transparent 0 29px,var(--line-blue) 29px 30px)}
/* quadrillage petits carreaux */
.grid-paper{background-color:var(--sheet);background-image:linear-gradient(var(--rule) 1px,transparent 1px),linear-gradient(90deg,var(--rule) 1px,transparent 1px);background-size:22px 22px}
/* washi tape */
.tape{position:absolute;width:118px;height:30px;z-index:5;opacity:.92;box-shadow:0 1px 1.5px rgba(80,40,40,.12);
  -webkit-mask:linear-gradient(90deg,transparent 0,#000 3px,#000 calc(100% - 3px),transparent 100%),repeating-linear-gradient(transparent 0 3px,#000 3px 6px);
  background:repeating-linear-gradient(90deg,#f6b8cf 0 9px,#fbd5e2 9px 18px)}
.tape.gingham{background:linear-gradient(90deg,rgba(226,48,124,.28) 50%,transparent 50%) 0 0/12px 12px,linear-gradient(rgba(226,48,124,.28) 50%,transparent 50%) 0 0/12px 12px,#fde9f0}
.tape.dots{background:radial-gradient(circle,#fff 2.2px,transparent 2.6px) 0 0/12px 12px,#f7c5d7}
.tape.yellow{background:repeating-linear-gradient(45deg,#ffe58a 0 6px,#fff1b8 6px 12px)}
.tape.blue{background:repeating-linear-gradient(90deg,#bfdcf0 0 9px,#dcecf7 9px 18px)}
/* post-it */
.postit{position:absolute;background:#fff3a8;background-image:var(--fibers);padding:18px 18px 22px;width:170px;font-family:var(--serif);font-style:italic;font-size:19px;line-height:1.2;color:#3b2b14;box-shadow:0 1px 1px rgba(0,0,0,.06),0 12px 18px -10px rgba(90,60,10,.35);z-index:6}
.postit.pink{background-color:#ffd1e1;color:#4a1a2b}
/* spirale de carnet */
.spiral{position:absolute;left:-16px;top:16px;bottom:16px;width:44px;z-index:4;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='28' viewBox='0 0 44 28'%3E%3Ccircle cx='30' cy='14' r='4.2' fill='%23e9dccf' stroke='%23cdb9a8' stroke-width='1'/%3E%3Cpath d='M30 14 C 22 4, 6 4, 4 12 C 3 16, 8 18, 12 16' fill='none' stroke='%23574a4f' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M30 14 C 22 4, 6 4, 4 12' fill='none' stroke='%23a9979c' stroke-width='.9' stroke-linecap='round' transform='translate(0 -1)'/%3E%3C/svg%3E") 0 0/44px 28px repeat-y}
/* bord déchiré (haut d'une section) */
.torn-top{position:relative}
.torn-top::before{content:"";position:absolute;left:0;right:0;top:-14px;height:16px;background:inherit;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 16' preserveAspectRatio='none'%3E%3Cpath d='M0 16 L0 9 L8 6 L14 10 L22 5 L31 9 L38 4 L47 8 L55 3 L63 9 L71 6 L80 10 L88 4 L97 8 L104 5 L113 10 L121 6 L130 9 L137 3 L146 8 L154 5 L162 10 L171 6 L179 9 L188 4 L196 8 L205 5 L213 10 L221 6 L230 9 L240 5 L240 16 Z'/%3E%3C/svg%3E") 0 0/240px 16px repeat-x;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 16' preserveAspectRatio='none'%3E%3Cpath d='M0 16 L0 9 L8 6 L14 10 L22 5 L31 9 L38 4 L47 8 L55 3 L63 9 L71 6 L80 10 L88 4 L97 8 L104 5 L113 10 L121 6 L130 9 L137 3 L146 8 L154 5 L162 10 L171 6 L179 9 L188 4 L196 8 L205 5 L213 10 L221 6 L230 9 L240 5 L240 16 Z'/%3E%3C/svg%3E") 0 0/240px 16px repeat-x}
/* étoile griffonnée (comme sur ses posts) */
.star{position:absolute;width:44px;height:44px;z-index:6;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Cpath d='M25 3 L30.5 18.5 L47 19 L34 29 L39 46 L25 36 L11 46 L16 29 L3 19 L19.5 18.5 Z' fill='%23ffd23f' stroke='%232a1a20' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.sparkle{position:absolute;width:26px;height:26px;z-index:6;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M15 1 C16 10 20 14 29 15 C20 16 16 20 15 29 C14 20 10 16 1 15 C10 14 14 10 15 1Z' fill='none' stroke='%23e2307c' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
