/* Les Crayons du Moulin - crayonsdumoulin.fr. Polices sous licence SIL OFL 1.1, servies par le site. */
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap;
             src: url('fonts/Lato-400.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap;
             src: url('fonts/Lato-700.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap;
             src: url('fonts/PlayfairDisplay-700.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 900; font-display: swap;
             src: url('fonts/PlayfairDisplay-900.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 700; font-display: swap;
             src: url('fonts/PlayfairDisplay-700i.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600 700; font-display: swap;
             src: url('fonts/Fredoka-latin.woff2') format('woff2'); }

:root {
  --papier: #fbf8f2;
  --papier-2: #f3ece1;
  --carte: #fff;
  --encre: #241f1a;
  --texte-doux: #4b433a;
  --gris: #6d645a;
  --trait: #e6ddcf;
  --terre: #a4472a;
  --terre-2: #873519;
  --moutarde: #d9a43f;
  --sauge: #5e7d66;
  --ombre: 0 1px 2px rgb(36 31 26 / .06), 0 12px 32px rgb(36 31 26 / .10);
  --ombre-douce: 0 1px 2px rgb(36 31 26 / .07), 0 4px 14px rgb(36 31 26 / .06);
  --rayon: 14px;
  --titres: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 400 1.0625rem/1.65 var(--sans);
       -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--terre); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--terre-2); }
:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--titres); line-height: 1.08; letter-spacing: -.01em; }
h1 { font-weight: 900; font-size: clamp(2.35rem, 5.4vw, 4rem); }
h2 { font-weight: 900; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-weight: 700; font-size: 1.28rem; }
p { margin: 0 0 1em; }
.cadre { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.surtitre { margin: 0 0 1rem; font: 700 .78rem/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase;
            color: var(--terre); }
.evitement { position: absolute; left: -999px; top: .5rem; background: var(--encre); color: #fff; padding: .6rem 1rem;
             border-radius: 8px; z-index: 10; }
.evitement:focus { left: .5rem; }

/* en-tête */
.entete { padding: 1.15rem 0; }
.entete .cadre { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.5rem;
                 flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: .65rem; color: var(--encre); text-decoration: none;
        font: 700 1.22rem/1 var(--titres); }
.logo:hover { color: var(--encre); }
.logo svg { width: 40px; height: 40px; flex: none; }
.menu { display: flex; gap: .4rem 1.5rem; flex-wrap: wrap; }
.menu a { color: var(--encre); text-decoration: none; font-weight: 700; font-size: .95rem; padding: .2rem 0;
          border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--terre); border-bottom-color: currentColor; }

/* boutons */
.bouton { display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.45rem; border-radius: 999px;
          background: var(--terre); color: #fff; text-decoration: none; font: 700 1rem/1.2 var(--sans);
          box-shadow: 0 6px 18px rgb(164 71 42 / .24); transition: transform .15s ease, background-color .15s ease; }
.bouton:hover { background: var(--terre-2); color: #fff; transform: translateY(-1px); }
.bouton svg { width: 1.15em; height: 1.15em; flex: none; }
.bouton.petit { padding: .72rem 1.1rem; font-size: .93rem; box-shadow: 0 4px 12px rgb(164 71 42 / .2); }
.lien-fleche { font-weight: 700; text-decoration: none; }
.lien-fleche:hover { text-decoration: underline; }
.lien-fleche::after { content: '\00a0\2192'; }

/* accueil : ouverture */
.ouverture { padding: clamp(1.5rem, 5vw, 4.5rem) 0 clamp(3rem, 7vw, 6rem); }
.ouverture .cadre { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem);
                    align-items: center; }
.chapo { margin: 1.35rem 0 2.1rem; max-width: 35rem; font-size: 1.2rem; color: var(--texte-doux); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.7rem; }
.feuilles { position: relative; width: 100%; max-width: 500px; aspect-ratio: 1 / 1; margin-inline: auto; }
.feuille { position: absolute; width: 56%; aspect-ratio: 8.5 / 11; overflow: hidden; background: #fff;
           border-radius: 5px; box-shadow: var(--ombre); }
.feuille img { width: 100%; height: 100%; object-fit: contain; }
.feuille:nth-child(1) { left: 0; top: 11%; transform: rotate(-7deg); }
.feuille:nth-child(2) { left: 22%; top: 0; transform: rotate(2deg); z-index: 2; }
.feuille:nth-child(3) { right: 0; top: 15%; transform: rotate(8deg); z-index: 1; }
.crayon { position: absolute; z-index: 3; width: 74%; left: 13%; bottom: 3%; transform: rotate(-9deg); }

/* sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.teinte { background: var(--papier-2); }
.tete { max-width: 42rem; margin-bottom: 2.5rem; }
.tete p { margin: .9rem 0 0; font-size: 1.1rem; color: var(--gris); }
.vide { color: var(--gris); font-size: 1.05rem; }

/* cahiers */
.livres { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2.6rem 2rem;
          padding: 0; margin: 0; list-style: none; }
.livre { display: flex; flex-direction: column; }
.livre .couv { width: 100%; aspect-ratio: 8.625 / 11.25; object-fit: cover; border-radius: 3px 7px 7px 3px;
               background: #fff; box-shadow: var(--ombre); }
.livre h3 { margin: 1.15rem 0 .45rem; }
.livre .st { margin-bottom: .7rem; font-size: .95rem; line-height: 1.5; color: var(--gris); }
.livre .meta { margin-bottom: 1.1rem; font-size: .84rem; letter-spacing: .03em; color: var(--gris); }
.livre .bas { margin-top: auto; }
.etiquette { display: inline-block; padding: .5rem .95rem; border: 1.5px solid var(--trait); border-radius: 999px;
             background: var(--carte); color: var(--texte-doux); font: 700 .82rem/1.2 var(--sans); }

/* atouts */
.atouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; padding: 0; margin: 0;
          list-style: none; }
.atout { padding: 1.55rem 1.4rem 1.35rem; border-top: 4px solid var(--terre); border-radius: var(--rayon);
         background: var(--carte); box-shadow: var(--ombre-douce); }
.atout:nth-child(2) { border-top-color: var(--moutarde); }
.atout:nth-child(3) { border-top-color: var(--sauge); }
.atout:nth-child(4) { border-top-color: var(--encre); }
.atout h3 { margin-bottom: .55rem; font-size: 1.16rem; }
.atout p { margin: 0; font-size: .98rem; color: var(--texte-doux); }

/* pages à imprimer (accueil) */
.imprimer .cadre { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.maquette { width: 100%; max-width: 340px; margin-inline: auto; aspect-ratio: 8.5 / 11; padding: 10% 10% 8%;
            text-align: center; background: #fff; border-radius: 5px; box-shadow: var(--ombre); transform: rotate(-2deg); }
.maquette .m-sur { font: 700 .58rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; }
.maquette .m-filet { width: 22%; height: 2px; margin: .75rem auto; background: var(--encre); }
.maquette .m-titre { font: 900 1.3rem/1.15 var(--titres); }
.maquette .m-texte { margin: .7rem 0 .9rem; font-size: .64rem; line-height: 1.5; color: #333; }
.maquette svg { display: block; width: 44%; margin: 0 auto; }
.maquette .m-adresse { margin-top: .5rem; font: 700 .7rem/1.2 var(--sans); }
.maquette .m-page { margin-top: 1.1rem; font-size: .62rem; color: var(--gris); }
.points { display: grid; gap: 1.15rem; padding: 0; margin: 1.8rem 0; list-style: none; }
.points li { position: relative; padding-left: 2.1rem; }
.points li::before { content: ''; position: absolute; left: .2rem; top: .5rem; width: .7rem; height: .7rem;
                     border-radius: 50%; background: var(--sauge); box-shadow: 0 0 0 .3rem rgb(94 125 102 / .18); }
.points strong { display: block; }
.note { font-size: .96rem; color: var(--gris); }

/* page du bonus */
.bonus-tete { padding: clamp(1.2rem, 4vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.bonus-tete .cadre { display: grid; grid-template-columns: minmax(170px, 290px) 1fr; gap: clamp(1.8rem, 5vw, 4rem);
                     align-items: center; }
.bonus-tete .couv { width: 100%; border-radius: 3px 7px 7px 3px; box-shadow: var(--ombre); }
.bonus-tete .chapo { margin: 1.1rem 0 1.8rem; }
.telecharger { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.4rem; }
.poids { font-size: .92rem; color: var(--gris); }
.lien-essais { margin: 1.3rem 0 0; font-size: .97rem; }
.enfant .bonus-tete h1 { font-family: 'Fredoka', var(--sans); font-weight: 700; letter-spacing: 0; }
.conseils { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; padding: 0;
            margin: 0; list-style: none; counter-reset: conseil; }
.conseils li { position: relative; padding: 1.3rem 1.3rem 1.25rem 3.7rem; border-radius: var(--rayon);
               background: var(--carte); box-shadow: var(--ombre-douce); font-size: .98rem; counter-increment: conseil; }
.conseils li::before { content: counter(conseil); position: absolute; left: 1.2rem; top: 1.2rem; width: 1.75rem;
                       height: 1.75rem; border-radius: 50%; background: var(--terre); color: #fff;
                       font: 700 .9rem/1.75rem var(--sans); text-align: center; }
.conseils strong { display: block; margin-bottom: .2rem; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.6rem 1.1rem;
           padding: 0; margin: 0 0 3rem; list-style: none; }
.galerie a { display: block; color: var(--encre); text-decoration: none; }
.galerie img { width: 100%; background: #fff; border-radius: 4px; box-shadow: var(--ombre-douce);
               transition: transform .15s ease, box-shadow .15s ease; }
.galerie a:hover img { transform: translateY(-3px); box-shadow: var(--ombre); }
.galerie .legende { display: flex; gap: .45rem; margin-top: .65rem; font-size: .88rem; line-height: 1.35; }
.galerie .n { font-weight: 700; color: var(--terre); }
.reserve { max-width: 46rem; font-size: .95rem; color: var(--gris); }

/* textes légaux */
.texte-legal { max-width: 46rem; padding: clamp(1.2rem, 4vw, 3rem) 0 4.5rem; }
.texte-legal h1 { margin-bottom: .7rem; font-size: clamp(2rem, 4.6vw, 3rem); }
.texte-legal h2 { margin: 2.5rem 0 .85rem; font-size: 1.45rem; }
.texte-legal dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.3rem; margin: 0; }
.texte-legal dt { font-weight: 700; }
.texte-legal dd { margin: 0; }
.maj { color: var(--gris); }

/* page introuvable */
.introuvable { max-width: 42rem; padding: clamp(2rem, 7vw, 5rem) 0 6rem; }
.introuvable h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.introuvable h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.introuvable p { margin-top: 1rem; }

/* pied de page */
.pied { padding: 2.6rem 0 3rem; border-top: 1px solid var(--trait); font-size: .93rem; color: var(--gris); }
.pied .cadre { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: start; }
.pied .logo { font-size: 1.05rem; margin-bottom: .7rem; }
.pied .logo svg { width: 30px; height: 30px; }
.pied p { margin: 0 0 .35rem; }
.pied nav { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.pied nav a { color: var(--encre); }

@media (max-width: 860px) {
  .ouverture .cadre, .imprimer .cadre { grid-template-columns: 1fr; }
  .feuilles { max-width: 400px; }
  .atouts { grid-template-columns: 1fr 1fr; }
  .bonus-tete .cadre { grid-template-columns: 1fr; }
  .bonus-tete .couv { max-width: 210px; }
  .pied .cadre { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  body { font-size: 1rem; }
  .atouts { grid-template-columns: 1fr; }
  .galerie { grid-template-columns: repeat(2, 1fr); }
  .livres { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
  .livre h3 { font-size: 1.08rem; }
  .texte-legal dl { grid-template-columns: 1fr; gap: 0; }
  .texte-legal dd { margin-bottom: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
