/* ─── Habillage « Provence et crayons de couleur » ───
   Se charge après site.css et ne fait que l'habiller : on peut le retirer sans rien casser.
   Principe : le décor reste en périphérie (en-tête, titres, bords du papier, pied de page) ;
   les dessins de Gérard gardent toute la place et toutes les couleurs.
   Police manuscrite Caveat (SIL OFL), hébergée sur le site : aucun appel à Google Fonts. */

@font-face { font-family: "Caveat"; font-weight: 500; font-display: swap;
  src: url("polices/caveat-latin-500-normal.88f2eabfbc09.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap;
  src: url("polices/caveat-latin-700-normal.9700119a3654.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Caveat"; font-weight: 500; font-display: swap;
  src: url("polices/caveat-latin-ext-500-normal.cfc409ac7b63.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap;
  src: url("polices/caveat-latin-ext-700-normal.6d52f323b0d9.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* La boîte de crayons */
  --lavande: #6a5a98;       /* lisible en texte sur le papier */
  --lavande-clair: #b7abd6;
  --ocre: #d39a2c;          /* ocre jaune de Roussillon — décor seulement */
  --ocre-rouge: #b4532a;
  --tournesol: #e8b93c;
  --cypres: #34503a;
  --olive-clair: #8b9150;
  --ciel: #3f7597;          /* bleu des volets */
  --coquelicot: #c2412d;

  --main: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --trait: #dccfb6;
}

/* Grain de papier à dessin sur tout le site */
body { background: var(--papier) url("dessins/grain.da317a327920.svg"); }

/* ─── Frise de crayons sous l'en-tête ─── */
.site-header { border-bottom: 0; background: color-mix(in srgb, var(--papier) 92%, transparent); backdrop-filter: blur(6px); }
.frise-crayons {
  height: 7px;
  background: linear-gradient(90deg,
    var(--lavande) 0 14%, var(--ciel) 14% 27%, var(--cypres) 27% 40%, var(--olive-clair) 40% 53%,
    var(--tournesol) 53% 66%, var(--ocre) 66% 78%, var(--ocre-rouge) 78% 90%, var(--coquelicot) 90% 100%);
  -webkit-mask: url("dessins/trait.ac44d0f1c2a6.svg") 0 0 / 300px 100% repeat-x;
          mask: url("dessins/trait.ac44d0f1c2a6.svg") 0 0 / 300px 100% repeat-x;
  opacity: .85;
}

/* ─── Signature et touches manuscrites ─── */
.brand-name { font-family: var(--main); font-weight: 700; font-size: 1.95rem; line-height: .9; color: var(--encre); }
.brand-sub { color: var(--lavande); }
.brand-logo { box-shadow: 0 0 0 2px var(--papier), 0 0 0 4px var(--ocre); }

.surtitre { font: 700 1.35rem/1.1 var(--main); letter-spacing: 0; text-transform: none; color: var(--lavande); }
.signature { font-family: var(--main); font-weight: 700; font-size: clamp(3.2rem, 7vw, 5.2rem); line-height: .9; letter-spacing: 0; margin-bottom: .3em; }
.intro { font-size: 1.25rem; }

/* Titres de section soulignés d'un coup de crayon, d'une couleur différente à chaque fois */
.bloc > h2, .entete h1, .historique h2, .page h1 { position: relative; display: inline-block; padding-bottom: .35em; }
.bloc > h2::after, .entete h1::after, .page h1::after {
  content: ""; position: absolute; left: -.15em; right: -.3em; bottom: 0; height: .32em;
  background: var(--crayon, var(--ocre));
  -webkit-mask: url("dessins/trait.ac44d0f1c2a6.svg") 0 0 / 100% 100% no-repeat;
          mask: url("dessins/trait.ac44d0f1c2a6.svg") 0 0 / 100% 100% no-repeat;
  opacity: .8;
}
.bloc:nth-of-type(3n+1) > h2 { --crayon: var(--lavande-clair); }
.bloc:nth-of-type(3n+2) > h2 { --crayon: var(--ocre); }
.bloc:nth-of-type(3n)   > h2 { --crayon: var(--olive-clair); }

/* ─── Navigation : chaque rubrique a son crayon ─── */
.nav li:nth-child(1) { --crayon: var(--lavande); }
.nav li:nth-child(2) { --crayon: var(--ocre); }
.nav li:nth-child(3) { --crayon: var(--cypres); }
.nav li:nth-child(4) { --crayon: var(--ciel); }
.nav li:nth-child(5) { --crayon: var(--coquelicot); }
.nav a { position: relative; border-bottom: 0 !important; font-size: 1rem; }
.nav a::after {
  content: ""; position: absolute; left: -4px; right: -4px; bottom: -4px; height: 8px;
  background: var(--crayon);
  -webkit-mask: url("dessins/trait.ac44d0f1c2a6.svg") 0 0 / 100% 100% no-repeat;
          mask: url("dessins/trait.ac44d0f1c2a6.svg") 0 0 / 100% 100% no-repeat;
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
@media (max-width: 820px) {
  .nav { background: var(--papier) url("dessins/grain.da317a327920.svg"); }
  .nav a::after { bottom: .3rem; right: auto; width: 5rem; }
  .nav-toggle { font: 700 1.3rem/1 var(--main); border-color: var(--ocre); }
}

/* ─── Les dessins posés sur la table, tenus par un bout de scotch ─── */
.papier { position: relative; display: inline-block; line-height: 0; }
.papier img { background: var(--blanc); box-shadow: 0 1px 2px rgba(60,40,20,.12), 0 14px 28px -14px rgba(60,40,20,.45); }
.papier::before {
  content: ""; position: absolute; z-index: 1; top: -11px; left: 50%; width: 78px; height: 24px;
  margin-left: -39px; transform: rotate(var(--scotch-angle, -3deg));
  background: color-mix(in srgb, var(--scotch, var(--tournesol)) 55%, transparent);
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 12%, 96% 0, 100% 10%, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 88%, 4% 100%, 0 90%);
  box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.scotch-1 { --scotch: var(--lavande-clair); --scotch-angle: 2deg; }
.scotch-2 { --scotch: var(--tournesol); }

/* La vignette sert de conteneur de requête : le dessin est borné en unités
   « cqi » (sa largeur), jamais en pourcentage de hauteur. Un max-height en %
   dans un cadre à hauteur automatique fait tomber l'image à 0 px sous Safari
   (iPhone), ne laissant voir que le scotch. */
.vignette { background: none; padding: 0; container-type: inline-size; }
.vignette .papier { transform: rotate(var(--penche, 0deg)); transition: transform .35s ease; }
.vignette .papier img { width: auto; height: auto; max-width: 84cqi; max-height: 80cqi; transition: box-shadow .35s ease; }
.oeuvre-carte a:hover .vignette img { transform: none; box-shadow: 0 1px 2px rgba(60,40,20,.12), 0 22px 36px -14px rgba(60,40,20,.5); }
.oeuvre-carte a:hover .papier { transform: rotate(0deg) translateY(-3px); }
.grille > li:nth-child(4n+1) { --penche: -1.2deg; --scotch: var(--tournesol); }
.grille > li:nth-child(4n+2) { --penche: .9deg;  --scotch: var(--lavande-clair); --scotch-angle: 4deg; }
.grille > li:nth-child(4n+3) { --penche: -.5deg; --scotch: #a9c5a0; --scotch-angle: -5deg; }
.grille > li:nth-child(4n)   { --penche: 1.3deg; --scotch: #e9a58a; --scotch-angle: 2deg; }
.oeuvre-carte h3 { font-size: 1.2rem; }

/* Fiche œuvre : le dessin sur la planche, légèrement penché */
.oeuvre-image { background: none; text-align: center; }
.oeuvre-image .papier { transform: rotate(-.6deg); }
.oeuvre-infos dt { font: 700 1.2rem/1.3 var(--main); color: var(--lavande); }

/* ─── Chevalet : le dernier dessin posé sur un chevalet de peintre en bois (accueil) ───
   Le chevalet est dessiné autour de l'image par des éléments positionnés en absolu : pieds en bois
   derrière, tête et tablette devant. L'image, elle, garde exactement la taille qu'elle aurait sans
   lui (sa colonne de la grille .hero, max-width: 100 %) ; seules les marges du bloc font place
   aux pieds qui dépassent en haut et en bas. */
.chevalet {
  --bois: #a8743d; --bois-clair: #cf9d5e; --bois-sombre: #6b4521;
  --pied: 15px; --pied-angle: 13deg;
  position: relative; display: inline-block; max-width: 100%; line-height: 0;
  margin: 3.4rem 0 3.8rem; isolation: isolate;
}
.chevalet-toile { position: relative; z-index: 1; display: block; }
.chevalet-toile img { box-shadow: 0 2px 4px rgba(60,40,20,.15), 0 18px 30px -14px rgba(60,40,20,.5); }
/* Les trois pieds : deux devant, en V renversé, et un derrière qu'on devine sous le dessin. */
.chevalet-pied {
  position: absolute; z-index: 0; top: -3.4rem; bottom: -3.8rem; left: 50%; width: var(--pied); margin-left: calc(var(--pied) / -2);
  border-radius: 3px; transform-origin: 50% 1.2rem;
  background: linear-gradient(90deg, var(--bois-sombre), var(--bois) 30%, var(--bois-clair) 55%, var(--bois) 80%, var(--bois-sombre));
  box-shadow: 0 2px 3px rgba(60,40,20,.25);
}
.chevalet-pied.gauche { transform: rotate(var(--pied-angle)); }
.chevalet-pied.droit { transform: rotate(calc(-1 * var(--pied-angle))); }
.chevalet-pied.arriere { top: 40%; bottom: -3rem; width: 11px; margin-left: -5.5px; transform: rotate(-1.5deg); filter: brightness(.72); }
/* La tête, qui pince le haut du dessin, et la tablette sur laquelle il repose. */
.chevalet-tete, .chevalet-tablette {
  position: absolute; z-index: 2; border-radius: 3px;
  background: linear-gradient(180deg, var(--bois-clair), var(--bois) 55%, var(--bois-sombre));
}
.chevalet-tete { left: 50%; top: -13px; width: 66px; height: 26px; margin-left: -33px; box-shadow: 0 2px 4px rgba(60,40,20,.35); }
.chevalet-tablette { left: -1.2rem; right: -1.2rem; bottom: -12px; height: 22px; box-shadow: 0 7px 10px -4px rgba(60,40,20,.5); }
.chevalet-tablette::after { content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--bois-clair) 60%, white); opacity: .6; }
@media (max-width: 600px) { .chevalet { --pied: 12px; --pied-angle: 11deg; margin: 2.6rem 0 3rem; } .chevalet-pied { top: -2.6rem; bottom: -3rem; } .chevalet-tablette { left: -.6rem; right: -.6rem; } }

/* ─── Note manuscrite avec flèche (accueil) ─── */
.hero-image { position: relative; }
.hero-image .note-main { display: flex; align-items: flex-start; gap: .4rem; margin-top: .6rem; font: 700 1.45rem/1.15 var(--main); color: var(--ocre-rouge); }
.note-main a { color: inherit; }
.fleche { width: 64px; height: 40px; flex: none; color: var(--ocre-rouge); transform: scaleX(-1) rotate(8deg); margin-top: -.6rem; }

/* ─── Bouton « au pastel » ─── */
.bouton {
  position: relative; isolation: isolate;
  background: var(--ocre-rouge);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  font: 700 1.4rem/1 var(--main); padding: .75rem 1.6rem .85rem;
  box-shadow: 3px 4px 0 -1px color-mix(in srgb, var(--ocre) 70%, transparent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.bouton::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #fff; opacity: .12;
  -webkit-mask: url("dessins/hachures.7e1fb742c1f0.svg"); mask: url("dessins/hachures.7e1fb742c1f0.svg"); }
.bouton:hover { background: var(--terre-fonce); transform: rotate(-1deg); box-shadow: 5px 6px 0 -1px var(--ocre); }
.bouton.petit { font-size: 1.15rem; }

/* ─── Bandeau d'exposition : un aplat de lavande hachuré ─── */
.bandeau-expo { position: relative; background: var(--lavande); overflow: hidden; }
.bandeau-expo::before { content: ""; position: absolute; inset: 0; background: #fff; opacity: .1;
  -webkit-mask: url("dessins/hachures.7e1fb742c1f0.svg"); mask: url("dessins/hachures.7e1fb742c1f0.svg"); }
.bandeau-expo .wrap { position: relative; }
.bandeau-expo .surtitre { color: var(--tournesol); }

/* ─── Expositions : dates écrites à la main ─── */
.expo-quand, .historique .annee-titre { font-family: var(--main); font-weight: 700; font-size: 1.6rem; color: var(--lavande); }

/* Cartes des expositions : fond de carte teinté comme un vieux papier */
.leaflet-tile-pane { filter: sepia(.35) saturate(.85) brightness(1.03); }
.carte { border: 0; box-shadow: 0 0 0 6px var(--blanc), 0 14px 30px -16px rgba(60,40,20,.5); }

/* ─── Paysage au crayon au-dessus du pied de page ─── */
.paysage { display: block; width: 100%; height: clamp(90px, 12vw, 150px); margin-top: 4rem; object-fit: cover; object-position: left bottom; }
.site-footer { margin-top: 0; border-top: 0; background: color-mix(in srgb, var(--lavande) 9%, var(--papier)); }

@media (max-width: 640px) {
  .vignette { aspect-ratio: auto; padding: 1.4rem 0 .6rem; }
  .vignette .papier img { max-width: 92cqi; max-height: 115cqi; }
}

@media (prefers-reduced-motion: reduce) {
  .vignette .papier, .oeuvre-carte a:hover .papier { transform: none; }
}

/* ─── Dessins vendus : le point rouge des galeries ─── */
.point-rouge { display: inline-block; width: .8em; height: .8em; border-radius: 50%; background: var(--coquelicot); vertical-align: -.05em;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,.15); }
.papier > .point-rouge { position: absolute; z-index: 1; right: 10px; bottom: 10px; width: 18px; height: 18px; line-height: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.25), inset -2px -2px 0 rgba(0,0,0,.15); }
.mention-vendu { font: 700 1.2rem/1 var(--main); color: var(--coquelicot); }
.vendu-fiche { font: 700 1.6rem/1.2 var(--main); color: var(--coquelicot); margin: 1.5rem 0 .8rem; }
.vendu-fiche .point-rouge { width: .7em; height: .7em; margin-right: .15em; }
.popup-dessins li a { display: flex; align-items: center; gap: .6rem; }
.popup-dessins img { margin: 0; width: 56px; height: 56px; object-fit: contain; background: var(--papier-2); }

/* Bandeau choisi par Gérard (photo ou dessin scanné) : un peu plus haut que
   le paysage au crayon, recadré par le bas. */
.paysage-photo { height: clamp(110px, 16vw, 240px); object-position: center bottom; }
/* Sans bandeau, le pied de page reprend sa marge. */
main + .site-footer { margin-top: 4rem; }
