/* ==================================================================
   accueil.css — styles propres a la page d'accueil.
   A deposer dans squelettes/css/ et appeler apres style.css.
   Charte : pierre / encre / bronze, Playfair Display + Montserrat.
   ================================================================== */

/* La carte : le SVG est statique, la colorisation vient du JavaScript */
svg.carte-fr{width:100%;height:auto;display:block}
svg.carte-fr path{stroke:var(--pierre,#f4f2ed);stroke-width:1.1;transition:fill .15s ease}
svg.carte-fr path:hover{stroke:var(--encre,#1c1a17);stroke-width:1.6}

:root{--pierre:#f4f2ed;--pierre2:#e6e2da;--encre:#1c1a17;--encre2:#4a4540;
--sourd:#8c857c;--bronze:#8b7355;--bronzef:#6b5745;--mesure:68ch}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Montserrat',system-ui,sans-serif;background:var(--pierre);color:var(--encre2);
font-size:17px;line-height:1.65;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{font-family:'Playfair Display',Georgia,serif;font-weight:500;color:var(--encre);line-height:1.2}
a{color:inherit}img{display:block;max-width:100%}
:focus-visible{outline:2px solid var(--bronze);outline-offset:3px}
.wrap{max-width:1120px;margin:0 auto;padding:0 1.5rem}
.bandeau{border-bottom:1px solid var(--pierre2)}
.bandeau .in{max-width:1120px;margin:0 auto;padding:1.1rem 1.5rem;display:flex;
align-items:center;justify-content:space-between;gap:2rem}
.marque{font-family:'Playfair Display',serif;font-size:1.28rem;text-decoration:none;color:var(--encre);line-height:1.15}
.marque small{display:block;font-family:'Montserrat',sans-serif;font-size:.67rem;
color:var(--sourd);letter-spacing:.11em;margin-top:.15rem}
.menu{display:flex;gap:1.7rem;font-size:.9rem}
.menu a{text-decoration:none;padding-bottom:3px;border-bottom:1px solid transparent}
.menu a:hover{border-bottom-color:var(--bronze)}
.planche{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:2px;
background:var(--pierre2);border-bottom:1px solid var(--pierre2)}
.planche a{display:block;aspect-ratio:1;overflow:hidden;filter:grayscale(1) contrast(.92)}
.planche img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.planche a:hover{filter:none}.planche a:hover img{transform:scale(1.06)}
.ouv{padding:3.6rem 0 3rem;border-bottom:1px solid var(--pierre2)}
.ouv h1{font-size:clamp(1.8rem,3.7vw,2.8rem);max-width:24ch;letter-spacing:-.008em}
.ouv h1 em{font-style:italic;color:var(--bronzef)}
.ouv .s{max-width:var(--mesure);margin-top:1.1rem;font-size:1.02rem}
.chercher{margin-top:2.1rem;max-width:600px;display:flex;border-bottom:2px solid var(--encre)}
.chercher input{flex:1;border:0;background:transparent;font-family:inherit;font-size:1.12rem;
padding:.7rem .2rem;color:var(--encre)}
.chercher input::placeholder{color:var(--sourd)}.chercher input:focus{outline:none}
.chercher button{border:0;background:transparent;font-family:inherit;font-size:.9rem;
color:var(--bronzef);cursor:pointer;padding:0 .4rem}
.ex{margin-top:.8rem;font-size:.85rem;color:var(--sourd)}
.ex a{text-decoration:none;border-bottom:1px solid var(--pierre2)}
.ex a:hover{border-bottom-color:var(--bronze)}

/* Carte + liste */
.geo{padding:3.2rem 0;border-bottom:1px solid var(--pierre2)}
.geo .tt{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;
flex-wrap:wrap;margin-bottom:1.6rem}
.geo h2{font-size:1.5rem}
.geo .tt p{font-size:.86rem;color:var(--sourd);max-width:44ch}
.geogrid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:3rem;align-items:start}
.cartebox{position:relative}
svg.fr{width:100%;height:auto;display:block}
svg.fr path{stroke:var(--pierre);stroke-width:1.1;cursor:pointer;transition:fill .15s ease}
svg.fr path:hover{stroke:var(--encre);stroke-width:1.6}
.infobulle{position:absolute;pointer-events:none;background:var(--encre);color:var(--pierre);
padding:.45rem .7rem;font-size:.78rem;line-height:1.35;border-radius:2px;opacity:0;
transition:opacity .12s ease;white-space:nowrap;z-index:3}
.infobulle b{display:block;font-family:'Playfair Display',serif;font-size:.92rem;color:#fff}
.legende{display:flex;align-items:center;gap:.55rem;margin-top:1rem;font-size:.76rem;color:var(--sourd)}
.legende i{display:flex;flex:1;max-width:190px;height:.55rem}
.legende i span{flex:1}
.filtres{display:flex;align-items:center;gap:.6rem;margin-bottom:1rem;font-size:.85rem;color:var(--sourd)}
.filtres select{padding:.42rem 2rem .42rem .8rem;border:1px solid var(--pierre2);
background-color:var(--pierre);font-family:inherit;font-size:.85rem;color:var(--encre);cursor:pointer;
appearance:none;border-radius:2px;background-repeat:no-repeat;background-position:right .7rem center;
background-size:.7rem;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238c857c' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")}
.filtres select:hover{border-color:var(--bronze)}
.liste{border-top:1px solid var(--encre);max-height:420px;overflow-y:auto}
.ligne{display:flex;align-items:baseline;gap:.7rem;padding:.55rem .2rem;
border-bottom:1px solid var(--pierre2);text-decoration:none;font-size:.9rem}
.ligne .num{font-family:'Playfair Display',serif;color:var(--sourd);font-size:.84rem;flex:0 0 1.8rem}
.ligne .nom{flex:1;color:var(--encre2)}
.ligne .n{font-size:.75rem;color:var(--sourd)}
.ligne:hover,.ligne.on{background:var(--pierre2)}
.ligne:hover .nom{color:var(--bronzef)}

.axes{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--pierre2)}
.axes>div{padding:2.6rem 0}
.axes>div:first-child{padding-right:3rem;border-right:1px solid var(--pierre2)}
.axes>div:last-child{padding-left:3rem}
.axes h2{font-size:1.2rem}.axes .n{font-size:.8rem;color:var(--sourd);margin:.15rem 0 1.2rem}
.az{display:flex;flex-wrap:wrap;gap:.15rem}
.az a{font-family:'Playfair Display',serif;font-size:1.28rem;width:2.05rem;height:2.05rem;
display:flex;align-items:center;justify-content:center;text-decoration:none;color:var(--encre)}
.az a:hover{background:var(--encre);color:var(--pierre)}
.regions{display:flex;flex-wrap:wrap;gap:.35rem .5rem;font-size:.88rem}
.regions a{text-decoration:none;border-bottom:1px solid var(--pierre2);padding-bottom:1px}
.regions a:hover{border-bottom-color:var(--bronze);color:var(--encre)}
.regions b{font-family:'Playfair Display',serif;font-weight:500;color:var(--sourd);font-size:.82rem}

.corps{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:4.5rem;padding:3rem 0}
.th{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin-bottom:.2rem}
.th h2{font-size:1.32rem}.th a{font-size:.83rem;color:var(--bronzef);text-decoration:none}
.fiche{display:grid;grid-template-columns:150px 1fr;gap:1.5rem;padding:1.45rem 0;
border-bottom:1px solid var(--pierre2)}
.fiche:first-of-type{border-top:1px solid var(--encre)}
.fiche .vig{aspect-ratio:4/3;overflow:hidden;background:var(--pierre2)}
.fiche .vig img{width:100%;height:100%;object-fit:cover}
.fiche .l{font-size:.75rem;color:var(--sourd);letter-spacing:.05em;margin-bottom:.28rem}
.fiche h3{font-size:1.12rem;margin-bottom:.35rem}
.fiche h3 a{text-decoration:none}.fiche h3 a:hover{color:var(--bronzef)}
.fiche p{font-size:.92rem;max-width:var(--mesure)}
.visites{background:var(--encre);color:var(--pierre);padding:2.7rem 2.5rem;margin-top:2.8rem}
.visites h2{color:var(--pierre);font-size:1.45rem;max-width:22ch}
.visites p{color:rgba(244,242,237,.75);margin-top:.85rem;max-width:60ch;font-size:.95rem}
.act{margin-top:1.6rem;display:flex;gap:.7rem;flex-wrap:wrap}
.b{display:inline-block;padding:.7rem 1.5rem;font-size:.88rem;text-decoration:none}
.b1{background:var(--bronze);color:#fff}
.b2{border:1px solid rgba(244,242,237,.35);color:var(--pierre)}
.cote section{margin-bottom:2.3rem}
.cote h3{font-size:.76rem;letter-spacing:.09em;color:var(--sourd);font-family:'Montserrat',sans-serif;
font-weight:500;padding-bottom:.5rem;border-bottom:1px solid var(--pierre2);margin-bottom:.85rem}
.br{padding:.55rem 0;border-bottom:1px solid var(--pierre2)}.br:last-child{border-bottom:0}
.br h4{font-size:.93rem;font-family:'Montserrat',sans-serif;font-weight:500;color:var(--encre)}
.br span{font-size:.73rem;color:var(--sourd)}.br a{text-decoration:none}
.nb{display:flex;justify-content:space-between;padding:.4rem 0;font-size:.87rem;
border-bottom:1px solid var(--pierre2)}.nb:last-child{border-bottom:0}
.nb b{font-family:'Playfair Display',serif;font-weight:500;color:var(--encre);font-size:1rem}
.cm{padding:.6rem 0;border-bottom:1px solid var(--pierre2);font-size:.84rem}
.cm:last-child{border-bottom:0}.cm b{color:var(--encre);font-weight:500}
.cm span{color:var(--sourd);font-size:.77rem;display:block}.cm a{text-decoration:none}
.auteur{border-top:1px solid var(--encre);padding:2.5rem 0 3.2rem;display:grid;
grid-template-columns:100px 1fr;gap:1.8rem;align-items:start}
.auteur .ph{width:100px;height:100px;border-radius:50%;overflow:hidden;background:var(--pierre2)}
.auteur .ph img{width:100%;height:100%;object-fit:cover}
.auteur h3{font-size:1.14rem}
.auteur .r{font-size:.81rem;color:var(--bronzef);margin:.15rem 0 .65rem}
.auteur p{font-size:.92rem;max-width:var(--mesure)}
footer{background:var(--encre);color:rgba(244,242,237,.6);padding:2.8rem 0 1.7rem;font-size:.86rem}
.fg{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:2rem}
footer h4{color:var(--pierre);font-size:.93rem;margin-bottom:.55rem;
font-family:'Montserrat',sans-serif;font-weight:500}
footer ul{list-style:none}footer li{padding:.16rem 0}
footer a{text-decoration:none}footer a:hover{color:var(--pierre)}
.cp{margin-top:2rem;padding-top:1.2rem;border-top:1px solid rgba(244,242,237,.14);
font-size:.78rem;color:rgba(244,242,237,.4)}
@media (max-width:980px){
.geogrid{grid-template-columns:1fr;gap:2rem}
.cartebox{max-width:520px;margin:0 auto}
.liste{max-height:none}}
@media (max-width:880px){
body{font-size:16px}.menu{display:none}
.axes{grid-template-columns:1fr}
.axes>div:first-child{padding-right:0;border-right:0;border-bottom:1px solid var(--pierre2)}
.axes>div:last-child{padding-left:0}
.corps{grid-template-columns:1fr;gap:2.6rem;padding:2.2rem 0}
.ouv{padding:2.6rem 0 2.2rem}.visites{padding:2rem 1.5rem}
.auteur{grid-template-columns:1fr}.fiche{grid-template-columns:110px 1fr;gap:1rem}
.planche{grid-template-columns:repeat(auto-fill,minmax(62px,1fr))}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ------------------------------------------------------------------
   Echelle typographique : le lectorat du site est en bonne partie
   age. On remonte le corps general de 17 a 18,5 px et on suit sur
   les elements secondaires, sans toucher aux titres qui sont deja
   dimensionnes en clamp().
   ------------------------------------------------------------------ */
body{font-size:18.5px;line-height:1.7}
.ouv .s{font-size:1.08rem}
.ex{font-size:.92rem}
.axes h2{font-size:1.3rem}
.axes .n{font-size:.88rem}
.az a{font-size:1.4rem;width:2.25rem;height:2.25rem}
.regions{font-size:.95rem}
.geo h2{font-size:1.55rem}
.geo .tt p{font-size:.94rem}
.filtres,.filtres select{font-size:.92rem}
.ligne{font-size:.96rem}
.ligne .num{font-size:.9rem}
.ligne .n{font-size:.82rem}
.legende{font-size:.82rem}
.th h2{font-size:1.4rem}
.th a{font-size:.9rem}
.fiche .l{font-size:.8rem}
.fiche h3{font-size:1.18rem}
.fiche p{font-size:.98rem}
.visites h2{font-size:1.55rem}
.visites p{font-size:1rem}
.b{font-size:.94rem}
.cote{font-size:.94rem}
.cote h3{font-size:.78rem}
.br h4{font-size:.98rem}
.br span{font-size:.78rem}
.nb{font-size:.92rem}
.nb b{font-size:1.06rem}
.cm{font-size:.9rem}
.cm span{font-size:.82rem}
.auteur h3{font-size:1.2rem}
.auteur .r{font-size:.86rem}
.auteur p{font-size:.97rem}
.infobulle{font-size:.84rem}
@media (max-width:880px){
  body{font-size:17px}
}

/* ------------------------------------------------------------------
   Largeur et echelle. La page etait a l'etroit sur grand ecran :
   le conteneur passe de 1120 a 1320 px, la carte gagne en presence,
   et le corps de texte monte encore d'un demi-point.
   ------------------------------------------------------------------ */
body{font-size:19px}
.wrap{max-width:1320px}
.bandeau .in{max-width:1320px}
.geogrid{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:4rem}
.corps{grid-template-columns:minmax(0,1fr) 320px;gap:5rem}
.axes>div:first-child{padding-right:4rem}
.axes>div:last-child{padding-left:4rem}
.ouv h1{max-width:26ch}
.az a{font-size:1.55rem;width:2.5rem;height:2.5rem}
.regions{font-size:1rem}
.ligne{font-size:1rem;padding:.7rem 0}
.fiche h3{font-size:1.24rem}
.fiche p{font-size:1.01rem}
.liste{max-height:none}
@media (max-width:1200px){
  .geogrid{grid-template-columns:1fr;gap:2.4rem}
  .corps{grid-template-columns:minmax(0,1fr) 290px;gap:3.4rem}
}
@media (max-width:880px){
  body{font-size:17px}
  .corps{grid-template-columns:1fr}
  .axes>div:first-child,.axes>div:last-child{padding:0}
}

/* ------------------------------------------------------------------
   Planche-contact : nombre de colonnes fixe pour que les rangees
   soient toujours completes. 48 photographies, divisibles par 12,
   par 8 et par 4 : aucune rangee tronquee, quelle que soit la taille
   de l'ecran. Le recadrage se fait en CSS (object-fit) et non par
   image_recadre, qui ajoute du blanc autour des images trop petites.
   ------------------------------------------------------------------ */
.planche{display:grid;grid-template-columns:repeat(12,1fr);gap:2px}
.planche a{display:block;aspect-ratio:1;overflow:hidden;background:var(--pierre2,#e6e2da);
  filter:grayscale(1) contrast(.92)}
.planche a:hover{filter:none}
.planche img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}
.planche a:hover img{transform:scale(1.06)}
@media (max-width:1100px){.planche{grid-template-columns:repeat(8,1fr)}}
@media (max-width:640px){.planche{grid-template-columns:repeat(4,1fr)}}

/* ------------------------------------------------------------------
   Champ de recherche. Le blanc casse le detache du fond pierre et
   le rend identifiable au premier coup d'oeil ; la loupe dit ce que
   c'est avant qu'on lise ; le bouton sombre porte l'action. Un seul
   filet, celui du cadre : plus de soulignement surnumeraire.
   ------------------------------------------------------------------ */
.chercher{display:flex;align-items:center;gap:.7rem;max-width:560px;
  background:#fbfaf7;border:1px solid var(--pierre3,#d9d3c8);border-radius:3px;
  padding:0 .35rem 0 1rem;border-bottom-width:1px}
.chercher .loupe{flex:none;color:var(--sourd,#8c857c);display:block}
.chercher input{flex:1;min-width:0;border:0;background:transparent;font-family:inherit;
  font-size:1.02rem;padding:.8rem 0;color:var(--encre,#1c1a17)}
.chercher input::placeholder{color:var(--sourd,#8c857c)}
.chercher input:focus{outline:none}
.chercher:focus-within{border-color:var(--encre,#1c1a17)}
.chercher button{flex:none;border:0;background:var(--encre,#1c1a17);color:var(--pierre,#f4f2ed);
  font-family:inherit;font-size:.9rem;padding:.62rem 1.3rem;border-radius:2px;
  cursor:pointer;margin:.28rem 0}
.chercher button:hover{background:var(--bronzef,#6b5745)}

/* Le theme souligne les champs de saisie : on neutralise dans la recherche */
.chercher input,.chercher input::placeholder{text-decoration:none;border:0;box-shadow:none}
.chercher input::placeholder{color:var(--sourd,#8c857c);opacity:1}
.chercher input:focus,.chercher input:hover{border:0;box-shadow:none;text-decoration:none}

/* Planche : deux rangees pleines sur grand ecran, une bande qui defile
   sur telephone plutot que six rangees de vignettes. */
.planche{grid-auto-rows:1fr}
@media (max-width:640px){
  .planche{display:flex;overflow-x:auto;gap:2px;scroll-snap-type:x mandatory}
  .planche::-webkit-scrollbar{display:none}
  .planche a{flex:0 0 108px;aspect-ratio:1;scroll-snap-align:start}
}

/* Portrait de l'auteur */
.auteur .ph{width:120px;height:120px;border-radius:50%;object-fit:cover;
  background:var(--pierre2,#e6e2da);display:block}

/* Planche : vingt colonnes, deux rangees pleines. Les vignettes
   retrouvent la taille qu'elles avaient au depart. */
.planche{grid-template-columns:repeat(20,1fr)}
@media (max-width:1400px){.planche{grid-template-columns:repeat(10,1fr)}}
@media (max-width:640px){.planche{display:flex}}

/* La liste des departements ne doit pas allonger la page :
   on la borne a la hauteur de la carte et elle defile. */
.liste{max-height:520px;overflow-y:auto;scrollbar-width:thin}

/* Exactement deux rangees : on masque tout ce qui depasse la 40e vignette */
.planche{overflow:hidden}
.planche a:nth-child(n+41){display:none}
@media (max-width:1400px){.planche a:nth-child(n+41){display:block}}

/* Le theme souligne les champs : on tranche, sur l'element et son invite */
.chercher input[type="search"]{text-decoration:none !important;
  border:0 !important;border-bottom:0 !important;box-shadow:none !important;
  background:transparent !important;-webkit-appearance:none;appearance:none}
.chercher input[type="search"]::placeholder{text-decoration:none !important;
  color:var(--sourd,#8c857c) !important;opacity:1}
.chercher input[type="search"]::-webkit-search-decoration,
.chercher input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}

/* Ouverture : les chiffres deviennent une mesure, pas une phrase */
.mesures{display:flex;flex-wrap:wrap;gap:2.6rem;margin:1.7rem 0 1.4rem}
.mesure b{display:block;font-family:'Playfair Display',Georgia,serif;font-weight:500;
  font-size:1.7rem;line-height:1;color:var(--encre,#1c1a17)}
.mesure span{display:block;font-size:.68rem;letter-spacing:.13em;text-transform:uppercase;
  color:var(--sourd,#8c857c);margin-top:.3rem}
.ouv .s{margin-top:0}
@media (max-width:640px){
  .mesures{gap:1.4rem 2rem}
  .mesure b{font-size:1.4rem}
}

/* Rien n'est souligne dans l'ouverture en dehors des vrais liens */
.ouv h1,.ouv h1 em,.ouv .s,.mesures,.mesures *{text-decoration:none}

/* Portrait : le cercle etait rond mais l'image s'etirait dedans.
   On impose les dimensions et le recadrage plutot que l'etirement. */
.auteur img.ph,.auteur .ph{width:120px !important;height:120px !important;
  min-width:120px;border-radius:50%;object-fit:cover;object-position:center top;
  display:block;background:var(--pierre2,#e6e2da);flex:none}
