/* La Hauteville. Langage visuel inspiré du modèle Skolar (Metrik, Webflow), réécrit sans ses fichiers :
   version claire : bandeau lavande, grand titre serif en capitales, fond gris chaud, blocs posés à coins doux.
   Gambarino (Fontshare) pour les titres, Roboto pour le texte, toutes deux servies depuis le site. */

@font-face { font-family: "Gambarino"; font-style: normal; font-weight: 400; font-display: swap; src: url(polices/gambarino.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(polices/roboto-latin.woff2) format("woff2"); }

:root {
  color-scheme: light;

  --fond: #e6e5e3;
  --clair: #f1f0ee;
  --blanc: #ffffff;
  --encre: #34345b;
  --encre-2: #5b5b7e;
  --nuit: #ffffff;
  --violet: #d6d6de;
  --lavande: #d6d6de;
  --cyan: #94ebf5;
  --sur-nuit: #34345b;
  --sur-nuit-2: #5b5b7e;
  --filet: #34345b29;
  --filet-nuit: #34345b29;

  --serif: "Gambarino", "Times New Roman", Georgia, serif;
  --sans: "Roboto", Arial, sans-serif;

  --rayon: 0.375rem;
  --marge: clamp(0.75rem, 0.4rem + 1.4vw, 1.25rem);
  --interieur: clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);
  --ecart: clamp(3rem, 2rem + 5vw, 6.5rem);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 1rem/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
img, iframe { display: block; max-width: 100%; }
img { height: auto; border-radius: var(--rayon); background: var(--lavande); }
small { font-size: 0.8125rem; color: var(--encre-2); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; border-radius: 2px; }
.nuit :focus-visible, main > header :focus-visible, footer :focus-visible, .haut :focus-visible { outline-color: var(--encre); }

.evitement { position: absolute; left: -200vw; }
.evitement:focus { left: 1rem; top: 1rem; z-index: 30; padding: 0.5rem 1rem; background: var(--blanc); border-radius: var(--rayon); }

h1, h2 { font-family: var(--serif); font-weight: 400; text-wrap: balance; }
h2 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.6875rem); line-height: 1; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; font-weight: 500; line-height: 1.3; }

/* ---------- Barre du haut : nom à gauche, liens à droite, pastille Menu au centre ---------- */

.haut { position: absolute; inset: 0 0 auto; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; padding: 0 clamp(1rem, 0.5rem + 2vw, 2rem); color: var(--sur-nuit); }
.marque { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; font: 400 1.375rem/1 var(--serif); color: var(--encre); text-decoration: none; }
.marque::before { content: ""; width: 0.3rem; height: 1.3em; border-radius: 1px; background: var(--encre); }
.haut ul { display: flex; align-items: center; gap: 0 1.5rem; }
.haut ul a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 500; text-decoration: none; }
.haut ul a:hover { text-decoration: underline; }
@media (max-width: 40em) { .haut li:not(:last-child) { display: none; } }

.menu { position: fixed; top: 0.6rem; left: 50%; z-index: 20; translate: -50% 0; }
.menu summary { display: flex; align-items: center; gap: 0.6rem; min-height: 2.5rem; padding: 0 0.9rem; border-radius: var(--rayon); background: var(--blanc); color: var(--nuit); font-weight: 500; cursor: pointer; list-style: none; box-shadow: 0 0 0 1px #1a1a2d14; user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 0.85rem; height: 0.4rem; border-block: 2px solid currentColor; }
.menu[open] summary::after { height: 0; border-bottom: 0; }
.menu nav { position: absolute; top: calc(100% + 0.4rem); left: 50%; translate: -50% 0; width: min(22rem, calc(100vw - 1.5rem)); padding: 0.5rem; border-radius: var(--rayon); background: var(--blanc); color: var(--encre); box-shadow: 0 0 0 1px #34345b1f, 0 1rem 2.5rem #34345b33; }
.menu nav a { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; padding: 0 0.9rem; border-radius: calc(var(--rayon) - 2px); font: 400 1.375rem/1 var(--serif); text-decoration: none; }
.menu nav a::after { content: "→"; font: 400 1rem var(--sans); opacity: 0; }
.menu nav a:hover, .menu nav a[aria-current] { background: var(--violet); color: var(--encre); }
.menu nav a:hover::after { opacity: 1; }

/* ---------- Bandeau de tête ---------- */

main > header {
  display: grid; justify-items: center; gap: 1.5rem;
  padding: clamp(6rem, 4rem + 8vw, 9rem) var(--interieur) clamp(2.5rem, 1.5rem + 4vw, 5rem);
  background: var(--lavande); color: var(--encre);
  text-align: center;
}
h1 { font-size: clamp(2.75rem, 0.9rem + 8.2vw, 7.2rem); line-height: 1; letter-spacing: -0.00125em; text-transform: uppercase; color: var(--encre); max-width: 14ch; }
main > header > p { max-width: 38rem; font-size: clamp(1.0625rem, 0.95rem + 0.6vw, 1.48rem); font-weight: 500; line-height: 1.4; }
main > header strong { font-weight: 500; color: var(--encre); }
main > header a { color: inherit; }

/* Accueil : le titre chevauche la photo, comme dans Skolar */
main > header.accueil { padding-bottom: 0; background: linear-gradient(var(--lavande) calc(100% - 4rem), var(--fond) 0); }
.accueil h1 { position: relative; z-index: 1; margin-bottom: -0.42em; }
.accueil figure { width: min(100%, 50rem); }
.accueil figure img { width: 100%; }

/* ---------- Sections ---------- */

main > section { display: grid; gap: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); padding: var(--ecart) var(--marge) 0; }
main > section > * { min-width: 0; }
main > section > h2, main > section > p, main > section > h3, main > section > .puces, main > section > .liens, main > section > .horaires, main > section > table { margin-inline: calc(var(--interieur) - var(--marge)); }
main > section > p, main > section > .puces { max-width: 44rem; font-size: 1.0625rem; line-height: 1.6; }
main > section > .liens, main > section > .horaires { max-width: 50rem; }
main > section > h3 { margin-top: 0.75rem; }
main > section:last-child { padding-bottom: var(--ecart); }

/* Panneaux */
.panneau { padding: var(--interieur); border-radius: var(--rayon); background: var(--clair); display: grid; gap: 1.25rem; align-content: start; }
.panneau.nuit, .nuit { background: var(--nuit); color: var(--sur-nuit); }
.panneau.lavande { background: var(--lavande); }
.nuit h2, .nuit h3 { color: var(--encre); }
.nuit small { color: var(--sur-nuit-2); }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--marge); }
@media (max-width: 52em) { .duo { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Bouton : libellé + carré fléché ---------- */

.bouton { display: inline-flex; align-items: stretch; gap: 2px; min-height: 2.75rem; text-decoration: none; font-weight: 500; color: #fff; }
.bouton > span, .bouton::after { display: grid; place-items: center; padding: 0 1rem; border-radius: var(--rayon); background: var(--encre); transition: background-color 0.2s, color 0.2s; }
.bouton::after { content: "→"; padding: 0 0.85rem; }
.bouton:hover > span, .bouton:hover::after { background: var(--cyan); color: var(--encre); }



/* ---------- Cartes à bandeau (les catégories de Skolar) ---------- */

.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: var(--marge); }
.cartes a { display: grid; grid-template-rows: auto 1fr; gap: 2px; text-decoration: none; }
.cartes span { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.75rem; padding: 0 0.9rem; border-radius: var(--rayon); background: var(--clair); font-weight: 500; transition: background-color 0.2s, color 0.2s; }
.cartes span::after { content: "→"; }
.cartes img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cartes a:hover span { background: var(--encre); color: #fff; }

/* ---------- Liste en lignes (les cours à la une de Skolar) ---------- */

.inventaire li { border-top: 1px solid var(--filet-nuit); }
.inventaire a { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) auto; gap: 0.25rem 1.5rem; align-items: center; min-height: 4rem; padding: 0.9rem 0; text-decoration: none; }
.inventaire strong { font: 400 clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem)/1.15 var(--serif); }
.inventaire span { color: var(--sur-nuit-2); }
.inventaire a::after { content: "→"; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--rayon); background: var(--violet); color: var(--encre); transition: background-color 0.2s, color 0.2s; }
.inventaire a:hover strong { color: var(--encre); }
.inventaire a:hover::after { background: var(--encre); color: #fff; }
@media (max-width: 44em) { .inventaire a { grid-template-columns: minmax(0, 1fr) auto; } .inventaire span { grid-column: 1; } .inventaire a::after { grid-row: 1 / span 2; grid-column: 2; } }

/* ---------- Listes ---------- */

.puces { display: grid; gap: 0.35em; }
.puces li { position: relative; padding-left: 1.4em; }
.puces li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.5em; height: 0.5em; border-radius: 1px; background: var(--encre); }

.liens { border-radius: var(--rayon); background: var(--clair); padding: 0.25rem 1.1rem; }
.liens li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; border-top: 1px solid var(--filet); }
.liens li:first-child { border-top: 0; }
.liens a { flex: 1 1 14rem; display: flex; align-items: center; min-height: 2.9rem; padding: 0.4rem 0; font-weight: 500; text-decoration: none; }
.liens a::after { content: "→"; margin-left: 0.5rem; }
.liens a:hover { text-decoration: underline; }
.liens.colonnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
.liens.colonnes li:nth-child(2) { border-top: 0; }

.horaires { border-radius: var(--rayon); background: var(--lavande); padding: 0.25rem 1.1rem; }
.horaires div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; padding: 0.8rem 0; border-top: 1px solid var(--filet); }
.horaires div:first-child { border-top: 0; }
.horaires dd { font-weight: 700; }
.panneau .horaires { background: none; padding: 0; }

.avis { padding: var(--interieur); border-radius: var(--rayon); background: var(--lavande); display: grid; gap: 0.6rem; }
.avis h3 { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.avis p { font: 400 clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem)/1.1 var(--serif); }

.deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--marge); align-items: start; margin-inline: calc(var(--interieur) - var(--marge)); }
.deux > * { display: grid; gap: 0.6rem; align-content: start; }

/* ---------- Photos ---------- */

.planche { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: calc(var(--marge) / 2); }
.planche img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.panorama, .plan { margin-inline: 0; }
.panorama img { width: 100%; max-width: 50rem; }
.plan img { width: 100%; }
figcaption { margin-top: 0.6rem; font-size: 0.8125rem; color: var(--encre-2); }
.portrait { display: flex; flex-wrap: wrap; gap: var(--marge); align-items: end; margin-inline: calc(var(--interieur) - var(--marge)); }

/* ---------- Annuaire ---------- */

.fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--marge); }
.fiche { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem; border-radius: var(--rayon); background: var(--clair); }
.fiche h3 { font: 400 1.5rem/1.1 var(--serif); }
.fiche p { font-size: 0.875rem; color: var(--encre-2); }
.fiche .contacts { color: var(--encre); font-weight: 500; line-height: 1.9; }
.fiche figure { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.9rem; }
.fiche img { max-height: 10rem; width: auto; }

/* ---------- Tableau ---------- */

table { border-collapse: separate; border-spacing: 0; border-radius: var(--rayon); background: var(--clair); overflow: hidden; font-size: 0.9375rem; }
th, td { padding: 0.8rem 1.1rem; text-align: left; vertical-align: baseline; border-top: 1px solid var(--filet); }
thead th { border-top: 0; background: var(--lavande); color: var(--encre); font-weight: 500; }
tbody th { font: 400 1.25rem/1.15 var(--serif); }
td small { display: block; }

/* ---------- Menus, bulletins, vidéos ---------- */

.semaines { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: calc(var(--marge) / 2); }
.semaines a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.9rem; padding: 0 0.9rem; border-radius: var(--rayon); background: var(--clair); font-weight: 500; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.semaines a::after { content: "PNG"; font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--encre-2); }
.semaines a[href$=".pdf"]::after { content: "PDF"; }
.semaines a:hover { background: var(--encre); color: #fff; }
.semaines a:hover::after { color: inherit; }

.couvertures { display: flex; flex-wrap: wrap; gap: var(--marge); align-items: start; }
.couvertures figure { flex: 0 1 14rem; }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: var(--marge); }
.video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--rayon); background: var(--lavande); }

/* ---------- Pied de page : trois panneaux ---------- */

footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 2px; padding: var(--ecart) var(--marge) var(--marge); color: var(--sur-nuit); }
footer > * { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; padding: 1.25rem 1.5rem; border-radius: var(--rayon); background: var(--violet); }
footer ul { display: flex; flex-wrap: wrap; gap: 0 1.1rem; flex: 1 1 14rem; }
footer a { display: inline-flex; align-items: center; min-height: 2rem; font-weight: 500; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer address { display: grid; color: var(--encre); font-size: 0.9375rem; }
footer > p { grid-column: 1 / -1; padding: 0.75rem 0.25rem 0; background: none; font-size: 0.8125rem; color: var(--encre); justify-content: space-between; }
footer > p a { font-weight: 400; }
@media (max-width: 60em) { footer { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 40em) {
  .liens.colonnes, .deux { grid-template-columns: minmax(0, 1fr); }
  .liens.colonnes li:nth-child(2) { border-top: 1px solid var(--filet); }
  thead { display: none; }
  tbody tr { display: grid; gap: 0.1rem; padding: 0.9rem 1.1rem; border-top: 1px solid var(--filet); }
  th, td { padding: 0; border: 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  .menu, .haut ul, .video { display: none; }
  main > header { background: none; color: #000; }
  h1 { color: #000; }
}

.avis-texte { font: 400 clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem)/1.05 var(--serif); color: var(--encre); }
.nuit h3 { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.panneau h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); }

/* Petit écran : la pastille Menu passe à droite pour ne pas recouvrir le nom */
@media (max-width: 40em) {
  .haut ul { display: none; }
  .menu { left: auto; right: 0.75rem; translate: none; }
  .menu nav { left: auto; right: 0; translate: none; }
}

/* Accueil : la photo de la mairie en pleine page, le titre posé sur le ciel */
main > header.accueil { position: relative; isolation: isolate; align-content: start; min-height: 100vh; min-height: 100svh; padding-bottom: 2rem; background: var(--lavande); }
.accueil h1 { margin-bottom: 0; max-width: none; }
.accueil figure { position: absolute; inset: 0; z-index: -1; width: auto; }
.accueil figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#ffffffd9 0%, #ffffff00 42%); }
.accueil figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; border-radius: 0; }
.menu summary { color: var(--encre); }
.accueil figure::after { background: linear-gradient(#fffffff2 0%, #ffffffb3 22%, #ffffff00 52%); }

/* Accueil : le panorama de la place sur toute la largeur de la page, le titre chevauche son bord haut */
main > header.accueil { min-height: 0; padding-inline: 0; padding-bottom: 0; background: linear-gradient(var(--lavande) 9rem, var(--fond) 0); }
.accueil h1 { margin-bottom: -0.42em; }
.accueil figure { position: static; width: 100%; }
.accueil figure::after { content: none; }
.accueil figure img { height: auto; object-fit: fill; }

/* Barre du haut fixe : nom, pastille Menu et liens restent visibles pendant le défilement */
.haut { position: fixed; z-index: 15; background: var(--lavande); border-bottom: 1px solid var(--filet); }
@media print { .haut { position: static; } }

/* Accueil, composition du haut : la photo commence sous la barre fixe, le titre est posé en bas de la photo,
   en très grand, aligné sur son bord ; une ligne de repères court dessous. */
main > header.accueil { grid-template-columns: minmax(0, 1fr); gap: 0; justify-items: stretch; padding: 3.75rem 0 0; background: var(--fond); text-align: left; }
.accueil figure { grid-area: 1 / 1; position: relative; }
.accueil figure::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(#1a1a2d00, #1a1a2db8); }
.accueil figure img { display: block; width: 100%; min-height: 15rem; object-fit: cover; border-radius: 0; }
.accueil h1 { grid-area: 1 / 1; align-self: end; z-index: 1; max-width: none; margin: 0 0 -0.03em; padding-inline: var(--marge); color: #fff; font-size: clamp(3.25rem, 13.4vw, 16.5rem); line-height: 0.82; letter-spacing: -0.02em; white-space: nowrap; }
main > header.accueil > .repere { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 2rem; max-width: none; padding: 0.9rem var(--marge); border-bottom: 1px solid var(--filet); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.08em; line-height: 1.4; text-transform: uppercase; color: var(--encre); }

/* Titre de l'accueil : centré, plus petit, entièrement dans la photo (tiers bas, sur les pavés) */
.accueil h1 { justify-self: center; margin: 0 0 clamp(0.9rem, 3.4vw, 3.5rem); padding-inline: var(--marge); font-size: clamp(2.5rem, 8.6vw, 10.5rem); line-height: 0.9; letter-spacing: 0.01em; text-align: center; }
.accueil figure::after { inset: 30% 0 0; background: linear-gradient(#1a1a2d00, #1a1a2d99 70%, #1a1a2da6); }

/* Titre de l'accueil en relief : épaisseur indigo empilée vers le bas à droite, puis ombre portée sur les pavés */
.accueil h1 {
  text-shadow:
    0.006em 0.008em 0 #2b2b4d, 0.012em 0.016em 0 #2b2b4d, 0.018em 0.024em 0 #262645,
    0.024em 0.032em 0 #262645, 0.030em 0.040em 0 #20203b, 0.036em 0.048em 0 #20203b,
    0.042em 0.056em 0 #1a1a2d, 0.048em 0.064em 0 #1a1a2d,
    0.07em 0.11em 0.06em #0d0d1acc, 0.1em 0.2em 0.28em #0d0d1a99;
}

/* ---------- Tout centré : titres, textes, boutons, grilles. Les lignes de listes et de tableaux restent alignées à gauche pour la lecture. ---------- */

main > section { text-align: center; }
main > section > * { width: 100%; }
main > section > h2, main > section > h3, main > section > p, main > section > .puces,
main > section > .liens, main > section > .horaires, main > section > table, .deux, .portrait { margin-inline: auto; }
main > section > .liens, main > section > .horaires, table, .inventaire, .fiche .contacts { text-align: left; }
.puces { width: fit-content; text-align: left; }
.panneau { justify-items: center; text-align: center; }
.panneau > * { width: 100%; }
.panneau .horaires { max-width: 34rem; text-align: left; }
.portrait, .couvertures { justify-content: center; }
.panorama img { margin-inline: auto; }
figcaption { text-align: center; }

/* Photos deux fois plus grandes : jusqu'à 300 px, leur taille réelle, sur autant de lignes qu'il faut */
.planche { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 18.75rem)); justify-content: center; gap: var(--marge); }

.cartes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 20rem)); justify-content: center; }
.fiches { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 24rem)); justify-content: center; }
.fiche { align-items: center; text-align: center; }
.fiche .contacts { text-align: center; }
.fiche figure { justify-content: center; }
.videos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 30rem)); justify-content: center; }
.semaines { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 20rem)); justify-content: center; }

/* ---------- Têtes des pages intérieures : titre en relief, sommaire cliquable, photos en éventail ---------- */

main > header.tete { position: relative; gap: 1.25rem; padding-top: clamp(6.5rem, 5rem + 6vw, 9.5rem); padding-bottom: 0; background: linear-gradient(var(--lavande) calc(100% - clamp(3.5rem, 9vw, 8rem)), var(--fond) 0); overflow: hidden; }
main > header.tete:not(:has(.eventail)) { padding-bottom: clamp(2.5rem, 1.5rem + 4vw, 5rem); background: var(--lavande); }

/* Grand cercle clair derrière le titre : donne de la profondeur au bandeau */
main > header.tete::before { content: ""; position: absolute; z-index: 0; left: 50%; top: -18rem; width: min(70rem, 130vw); aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, #ffffffb3, #ffffff00); pointer-events: none; }
.tete > * { position: relative; z-index: 1; }

.tete h1 { max-width: 16ch; text-shadow: 0.012em 0.016em 0 #ffffff, 0.03em 0.04em 0 #b4b4c6, 0.05em 0.065em 0 #a3a3b8, 0.07em 0.09em 0 #9292a9, 0.1em 0.16em 0.22em #34345b59; }
.tete > p { text-wrap: balance; }

.sommaire ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; max-width: 56rem; }
.sommaire a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 0.95rem; border-radius: var(--rayon); background: var(--blanc); font-size: 0.9375rem; font-weight: 500; text-decoration: none; box-shadow: 0 0.15rem 0 #34345b26; transition: background-color 0.2s, color 0.2s, translate 0.2s, box-shadow 0.2s; }
.sommaire a::after { content: "↓"; margin-left: 0.5rem; opacity: 0.55; }
.sommaire a:hover { background: var(--encre); color: #fff; translate: 0 0.15rem; box-shadow: 0 0 0 #34345b26; }

/* Éventail : la première photo au centre et devant, les autres inclinées derrière, de part et d'autre */
.eventail { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; align-items: end; margin-top: clamp(0.75rem, 2vw, 2rem); padding: 0 var(--marge) 0.5rem; }
.eventail img { width: auto; height: clamp(8rem, 21vw, 17.5rem); max-width: 38vw; object-fit: cover; border: clamp(0.25rem, 0.6vw, 0.5rem) solid var(--blanc); border-radius: var(--rayon); box-shadow: 0 0.6rem 1.6rem #34345b40, 0 0.1rem 0.3rem #34345b33; background: var(--blanc); transition: rotate 0.35s, translate 0.35s; }
.eventail img:nth-child(1) { grid-column: 2; grid-row: 1; z-index: 2; }
.eventail img:nth-child(2) { grid-column: 1; grid-row: 1; height: clamp(6.5rem, 17vw, 14rem); margin-right: clamp(-5rem, -6vw, -1.5rem); rotate: -6deg; translate: 0 -0.75rem; }
.eventail img:nth-child(3) { grid-column: 3; grid-row: 1; height: clamp(6.5rem, 17vw, 14rem); margin-left: clamp(-5rem, -6vw, -1.5rem); rotate: 6deg; translate: 0 -0.75rem; }
.eventail:hover img:nth-child(2) { rotate: -9deg; translate: -0.75rem -1rem; }
.eventail:hover img:nth-child(3) { rotate: 9deg; translate: 0.75rem -1rem; }
.eventail.n2 { grid-template-columns: repeat(2, auto); }
.eventail.n2 img:nth-child(1) { grid-column: 2; rotate: 3deg; }
.eventail.n2 img:nth-child(2) { margin-right: clamp(-3rem, -4vw, -1rem); }

/* La section ciblée par le sommaire se signale un instant */
main > section:target > h2 { animation: cible 1.4s ease-out; }
@keyframes cible { from { color: #0d8a96; letter-spacing: 0.02em; } }
@media (prefers-reduced-motion: reduce) { main > section:target > h2 { animation: none; } }
.sommaire { width: 100%; min-width: 0; }
.sommaire ul { margin-inline: auto; }
main > header.tete { grid-template-columns: minmax(0, 1fr); }
.tete > * { min-width: 0; max-width: 100%; }
.tete > .eventail { max-width: none; width: 100%; }

/* Photos cliquables : chaque vignette ouvre son fichier image */
.planche a { display: block; border-radius: var(--rayon); overflow: hidden; }
.planche a img { transition: scale 0.3s; }
.planche a:hover img { scale: 1.04; }

/* ---------- Accueil : les trois accès directs de l'ancien site (Flash info, Plan, Informations) ---------- */

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--marge); padding: var(--marge) var(--marge) 0; }
.trio a { display: grid; gap: 0.3rem; align-content: center; justify-items: center; min-height: 5.5rem; padding: 1rem 1.25rem; border-radius: var(--rayon); background: var(--blanc); color: var(--encre); text-align: center; text-decoration: none; box-shadow: 0 0.25rem 0 #34345b26; transition: translate 0.2s, box-shadow 0.2s, background-color 0.2s; }
.trio strong { font: 400 clamp(1.5rem, 1.2rem + 1.3vw, 2.25rem)/1.05 var(--serif); color: inherit; }
.trio span { font-size: 0.875rem; line-height: 1.35; opacity: 0.85; }
.trio a.flash { background: #b3261e; color: #fff; box-shadow: 0 0.25rem 0 #7c1711; }
.trio a.infos { background: var(--encre); color: #fff; box-shadow: 0 0.25rem 0 #1a1a2d; }
.trio a:hover { translate: 0 0.25rem; box-shadow: 0 0 0 transparent; }
@media (max-width: 52em) { .trio { grid-template-columns: minmax(0, 1fr); } .trio a { min-height: 4.5rem; } }

/* ---------- Bascule de langue ---------- */

.langues { display: flex; gap: 0.25rem; }
.haut ul .langues a { gap: 0.4rem; min-height: 2.25rem; padding: 0 0.55rem; border-radius: var(--rayon); font-size: 0.8125rem; letter-spacing: 0.04em; }
.langues svg { width: 1.35rem; height: 0.9rem; border-radius: 1px; box-shadow: 0 0 0 1px #34345b33; }
.langues a[aria-current] { background: var(--blanc); box-shadow: 0 0 0 1px #34345b26; }
.haut ul .langues a:hover { text-decoration: none; background: var(--blanc); }
@media (max-width: 40em) {
  .haut ul { display: flex; margin-right: 6.5rem; }
  .haut ul li:not(.langues) { display: none; }
  .langues a { padding: 0 0.4rem; }
  .langues a:not([aria-current]) svg, .langues a[aria-current] svg { width: 1.2rem; }
  .marque { font-size: 1.125rem; }
}
.marque { white-space: nowrap; }
@media (max-width: 40em) { .marque { font-size: 1rem; gap: 0.35rem; } .haut { padding-inline: 0.75rem; } .haut ul { margin-right: 6rem; } }

/* ---------- Site dynamique : éléments ajoutés ---------- */

.grande { margin-inline: auto; }
.grande img { margin-inline: auto; }
.grande a { display: block; }

/* Plan interactif : zones invisibles posées sur le plan, nom et photo au survol ou au toucher */
.plan { margin-inline: auto; max-width: 78rem; }
.plan-carte { position: relative; border-radius: var(--rayon); background: var(--blanc); }
.plan-carte > img { display: block; width: 100%; height: auto; border-radius: var(--rayon); }
.plan .zone { position: absolute; min-width: 1.25rem; min-height: 1.25rem; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }
.plan .zone.photo::before { content: ""; position: absolute; left: 50%; top: 50%; width: 0.7rem; height: 0.7rem; translate: -50% -50%; border: 2px solid #fff; border-radius: 50%; background: #c8102e; box-shadow: 0 0 0 1px #0000004d; }
.plan .zone:hover, .plan .zone:focus-visible { z-index: 3; outline: 2px solid var(--encre); outline-offset: 1px; background: #34345b26; }
.plan .bulle { position: absolute; z-index: 4; display: none; width: max-content; max-width: min(15rem, 62vw); padding: 0.4rem; border-radius: var(--rayon); background: var(--encre); color: #fff; font: 500 0.9375rem/1.3 var(--sans); text-align: center; box-shadow: 0 0.4rem 1.2rem #00000059; pointer-events: none; }
.plan .zone:hover .bulle, .plan .zone:focus .bulle { display: grid; gap: 0.35rem; justify-items: center; }
.plan .bulle img { display: block; width: 12.5rem; max-width: 100%; height: auto; border-radius: 4px; }
.plan .bulle b { padding: 0.1rem 0.4rem; font-weight: 500; }
.plan .bas .bulle { top: calc(100% + 0.4rem); }
.plan .haut .bulle { bottom: calc(100% + 0.4rem); }
.plan .g .bulle { left: 0; }
.plan .d .bulle { right: 0; }
.plan .c .bulle { left: 50%; translate: -50% 0; }
.plan figcaption { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--gris, #5b5b7e); }
@media print { .plan .zone { display: none; } }

.menu-semaine { display: grid; gap: 0.9rem; justify-items: center; padding: var(--interieur); border-radius: var(--rayon); background: var(--blanc); }
.menu-semaine h3 { font: 400 clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem)/1.1 var(--serif); }
.menu-semaine img { width: 100%; max-width: 64rem; border: 1px solid var(--filet); }
.semaines a[aria-current] { background: var(--encre); color: #fff; }
.semaines a[aria-current]::after { color: inherit; }

/* Liens de modification, visibles seulement une fois connecté à l'administration */
.modif { justify-self: center; width: auto !important; margin: 0 auto -0.75rem; padding: 0.15rem 0.6rem; border-radius: 99rem; background: #ffe08a; color: #3a2f00; font: 500 0.75rem/1.6 var(--sans); text-decoration: none; opacity: 0.85; }
.modif:hover { opacity: 1; box-shadow: 0 0 0 2px #3a2f00; }
.acces-admin { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; padding: 0.7rem 1.1rem; border-radius: 99rem; background: #ffe08a; color: #3a2f00; font-weight: 700; text-decoration: none; box-shadow: 0 0.4rem 1.2rem #0000004d; }

/* Menu de la semaine en texte, jour par jour */
.menu-jours { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; width: 100%; text-align: left; }
.menu-jours > div { padding: 1rem; border-radius: var(--rayon); background: var(--clair); }
.menu-jours > div.aujourdhui { background: var(--lavande); box-shadow: inset 0 0.25rem 0 var(--encre); }
.menu-jours h4 { margin: 0 0 0.6rem; font: 400 1.5rem/1.1 var(--serif); }
.menu-jours h4 small { font: 500 0.875rem var(--sans); }
.menu-jours ul { display: grid; gap: 0.5rem; }
.menu-jours li { padding-top: 0.5rem; border-top: 1px solid var(--filet); font-size: 0.9375rem; line-height: 1.35; }
.menu-jours li:first-child { padding-top: 0; border-top: 0; }
.semaines a::after, .semaines a[href$=".pdf"]::after { content: "→"; font-size: 1rem; letter-spacing: 0; }
@media (max-width: 52em) { .menu-jours { grid-template-columns: minmax(0, 1fr); } }
