/* Pharmacie Walter — palette tirée de la façade : bardage anthracite, croix lumineuse, enseigne verte. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bardage: #2E3338;
  --nuit: #1D2125;
  --croix: #2DC84D;
  --vert: #4FAE33;
  --vert-fonce: #1F6B1A;
  --lumiere: #F3F6F1;
  /* fonds sauge : ni gris ni blanc, teintés du vert de l'enseigne */
  --sauge-1: #E9F1E5;
  --sauge-2: #DCEAD6;
  --sauge-3: #C4DCB9;
  --acier: #A9B1B8;
  --texte: #1D2125;

  --display: "Archivo", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;

  /* espacements : serré dans un groupe, large entre les groupes, très large entre les sections */
  --s-1: 8px;
  --s-2: 12px;
  --s-3: 20px;
  --s-4: clamp(28px, 3vw, 40px);
  --s-5: clamp(44px, 5.5vw, 80px);
  --s-section: clamp(96px, 12vw, 176px);

  /* courbes (Emil Kowalski) : ease-out franc pour ce qui entre, ease-in-out pour ce qui se déplace */
  --bar-h: 64px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sauge-1);
  color: var(--texte);
  font-family: var(--display);
  font-size: clamp(17px, 1.05vw + 12px, 20px);
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--croix); outline-offset: 3px; border-radius: 4px; }
.hours :focus-visible { outline-color: var(--nuit); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Bandeau fixe ---------------------------------------------------------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--bar-h);
  padding: 0 max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  background: var(--sauge-1); border-bottom: 1px solid rgba(29,33,37,.1);
}
.bar__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-variation-settings: "wdth" 112; font-size: 1.05rem; letter-spacing: .01em; }
.bar__cross { width: 24px; height: 24px; fill: var(--croix); }
.bar__info { display: flex; align-items: center; gap: 10px; }
/* accès direct aux trois sections utiles, toujours visibles */
.bar__nav { display: flex; gap: var(--s-1); margin-right: auto; margin-left: var(--s-4); }
.bar__nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: .95rem; color: #4A5157;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.bar__nav a[aria-current="true"] { color: var(--texte); background: rgba(29,33,37,.07); }
.bar__nav a:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .bar__nav a:hover { color: var(--texte); background: rgba(29,33,37,.05); } }
.bar__tel svg { display: none; width: 18px; height: 18px; fill: currentColor; }
section[id] { scroll-margin-top: var(--bar-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* statut et itinéraire rejoignent le bandeau quand le panneau du hero quitte l'écran */
.bar__status, .bar__go { opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 220ms; }
.bar.is-solid .bar__status, .bar.is-solid .bar__go { opacity: 1; visibility: visible; transform: none; }
.bar__status { margin: 0; padding: 7px 14px 7px 11px; background: rgba(29,33,37,.06); font-size: .9rem; }
.bar__go {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid rgba(29,33,37,.3); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.bar__go svg { width: 18px; height: 18px; fill: currentColor; }
.bar__tel {
  display: inline-flex; align-items: center; min-height: 40px;
  text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 0 16px; border-radius: 999px; background: var(--croix); color: var(--nuit);
}

/* Statut ouvert / fermé ------------------------------------------------- */
.status { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; font-weight: 600; }
.status__dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--acier); }
.status.is-open .status__dot { background: var(--croix); box-shadow: 0 0 0 0 rgba(45,200,77,.7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(45,200,77,0); } 100% { box-shadow: 0 0 0 0 rgba(45,200,77,0); } }

/* Hero : la façade sans le ciel sur toute la largeur, l'essentiel dans un bandeau uni juste dessous */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; display: flex; flex-direction: column; padding-top: var(--bar-h); background: var(--sauge-2); }
/* la photo garde ses proportions (rien de coupé) ; le bandeau prend la hauteur restante */
.hero__media { position: relative; flex: 0 1 auto; aspect-ratio: 1600 / 690; min-height: 0; transform-origin: 0 0; will-change: transform; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
/* fond de la plongée : la façade floutée et assombrie, pour que la croix ne flotte pas sur du vide */
.hero__ghost {
  position: absolute; inset: 0; opacity: 0;
  background: url(img/facade-900.webp?v=5) 60% 50% / cover no-repeat; filter: blur(22px) brightness(.95) saturate(1.1); transform: scale(1.1);
}

/* La croix de l'enseigne, posée exactement sur celle de la photo (position calculée en JS) */
.hero__cross { position: absolute; left: 0; top: 0; width: 0; aspect-ratio: 1; z-index: 1; }
.hero__shape, .hero__glow {
  position: absolute; inset: 0; background: var(--croix);
  clip-path: polygon(34% 0, 66% 0, 66% 34%, 100% 34%, 100% 66%, 66% 66%, 66% 100%, 34% 100%, 34% 66%, 0 66%, 0 34%, 34% 34%);
}
.hero__glow { inset: -30%; clip-path: none; background: radial-gradient(closest-side, rgba(45,200,77,.75), rgba(45,200,77,.25) 55%, rgba(45,200,77,0)); animation: glow 3.2s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .55; } }

/* Bandeau calé sur la même grille que le menu : nom et statut | adresse et actions | horaires */
.hero__content {
  position: relative; z-index: 2; flex: 1 0 auto; display: grid; justify-content: space-between; align-content: center; align-items: start;
  grid-template-columns: auto auto minmax(16rem, 24rem); grid-template-areas: "title addr hours" "status actions hours";
  gap: var(--s-2) var(--s-5);
  padding: var(--s-4) max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  background: var(--sauge-2);
}
.hero__title { grid-area: title; font-weight: 850; font-variation-settings: "wdth" 125; font-size: clamp(1.7rem, 2.4vw, 2.4rem); line-height: 1; letter-spacing: -.02em; }
.hero__title .line { display: inline-block; overflow: hidden; padding-bottom: .05em; vertical-align: top; }
.hero__title .line > span { display: block; }
.hero__info { display: contents; }
.hero__info > .hero__status { grid-area: status; justify-self: start; }
.hero__hours { grid-area: hours; border-top: 1px solid rgba(29,33,37,.14); }
.hero__hours li { display: flex; justify-content: space-between; gap: var(--s-3); padding: 9px 0; border-bottom: 1px solid rgba(29,33,37,.14); color: #4A5157; }
.hero__hours b { color: var(--texte); font-weight: 700; font-variant-numeric: tabular-nums; }
.hero__hours li.is-today span, .hero__hours li.is-today b { color: var(--vert-fonce); }
.hero__status { padding: 10px 18px 10px 14px; background: rgba(29,33,37,.09); color: var(--nuit); }
.hero__status.is-open { background: var(--croix); }
.hero__status .status__dot { background: var(--nuit); }
.hero__status.is-open .status__dot { background: var(--nuit); box-shadow: 0 0 0 0 rgba(29,33,37,.5); animation-name: pulse-dark; }
@keyframes pulse-dark { 70% { box-shadow: 0 0 0 9px rgba(29,33,37,0); } 100% { box-shadow: 0 0 0 0 rgba(29,33,37,0); } }
.hero__addr { grid-area: addr; font-style: normal; line-height: 1.35; color: var(--texte); }
.hero__actions { grid-area: actions; display: flex; gap: var(--s-2); margin-top: var(--s-1); }

/* Boutons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px;
  padding: 0 26px; border-radius: 999px; text-decoration: none;
  font-weight: 700; font-size: 1.05rem;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.btn--solid { background: var(--croix); color: var(--nuit); }
.btn--ghost { border: 2px solid rgba(29,33,37,.55); color: var(--texte); }
.btn--dark { background: var(--nuit); color: var(--lumiere); }
/* tout ce qui se presse répond sous le doigt */
.btn:active, .bar__tel:active, .bar__go:active, .acces__tel:active { transform: scale(.97); }
.bar__tel, .bar__go { transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
/* survols réservés aux vrais pointeurs : sur mobile le tap ne laisse pas d'état collant */
@media (hover: hover) and (pointer: fine) {
  .btn--solid:hover, .bar__tel:hover { background: #4BE069; }
  .btn--ghost:hover { background: var(--nuit); color: var(--lumiere); border-color: var(--nuit); }
  .btn--dark:hover { background: var(--vert-fonce); }
  .bar__go:hover { background: var(--nuit); color: var(--lumiere); }
  .acces__tel:hover { color: var(--nuit); }
}

/* Horaires ------------------------------------------------------------- */
.hours { background: var(--croix); color: var(--nuit); padding: var(--s-section) 0; }
.hours__title, .services__title, .acces__title {
  font-weight: 850; font-variation-settings: "wdth" 125;
  font-size: clamp(2.4rem, 6.5vw, 5.4rem); line-height: .95; letter-spacing: -.015em;
}
.hours__grid { margin-top: var(--s-5); display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 4vw, 64px); }
.hours__days { font-size: clamp(1.15rem, 1.4vw + .5rem, 1.6rem); font-weight: 700; }
.hours__time {
  font-weight: 900; font-variation-settings: "wdth" 110; font-variant-numeric: tabular-nums;
  font-size: clamp(3.4rem, 8vw, 7.5rem); line-height: .9; letter-spacing: -.035em;
  display: flex; align-items: center; gap: .14em;
}
.hours__sep { display: inline-block; width: .42em; height: .1em; background: currentColor; border-radius: 2px; }
.hours__note { margin-top: 10px; display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--nuit); color: var(--croix); font-weight: 700; }

.week { margin-top: var(--s-5); display: grid; grid-template-columns: repeat(7, 1fr); border-top: 3px solid var(--nuit); }
.week li { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px 18px; border-right: 1px solid rgba(29,33,37,.25); }
.week li:last-child { border-right: 0; }
.week li span:first-child { font-weight: 700; }
.week li span:last-child { font-variant-numeric: tabular-nums; }
.week li.is-today { background: var(--nuit); color: var(--lumiere); border-radius: 0 0 14px 14px; }
.week li.is-today span:first-child::after { content: " (aujourd’hui)"; font-weight: 500; color: var(--croix); }
.hours__garde { margin-top: 36px; max-width: 60ch; font-size: 1.05rem; }
.hours__garde a { font-weight: 800; }

/* Services ------------------------------------------------------------- */
.services {
  position: relative; padding: var(--s-section) 0;
  /* nervures du bardage, à peine marquées */
  background: repeating-linear-gradient(90deg, transparent 0 54px, rgba(29,33,37,.04) 54px 56px), var(--sauge-1);
}
/* quatre familles rangées dans les angles d'une grande croix verte, qui s'assemble au scroll */
.services__board {
  --core: clamp(84px, 8vw, 120px); --line: 4px; --space: clamp(28px, 4vw, 64px);
  margin-top: var(--s-5); display: grid;
  grid-template-columns: minmax(0, 1fr) var(--core) minmax(0, 1fr); grid-template-rows: auto var(--core) auto;
}
.group--nw { grid-area: 1 / 1; padding: 0 var(--space) var(--space) 0; }
.group--ne { grid-area: 1 / 3; padding: 0 0 var(--space) var(--space); }
.group--sw { grid-area: 3 / 1; padding: var(--space) var(--space) 0 0; }
.group--se { grid-area: 3 / 3; padding: var(--space) 0 0 var(--space); }
.board-cross { display: contents; }
.board-cross__arm { background: var(--croix); border-radius: 2px; }
.board-cross__arm--n { grid-area: 1 / 2; justify-self: center; width: var(--line); transform-origin: 50% 100%; }
.board-cross__arm--s { grid-area: 3 / 2; justify-self: center; width: var(--line); transform-origin: 50% 0; }
.board-cross__arm--w { grid-area: 2 / 1; align-self: center; height: var(--line); transform-origin: 100% 50%; }
.board-cross__arm--e { grid-area: 2 / 3; align-self: center; height: var(--line); transform-origin: 0 50%; }
.board-cross__core { grid-area: 2 / 2; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.board-cross__core i { background: var(--croix); }
.board-cross__core i:nth-child(1) { grid-area: 1 / 2; }
.board-cross__core i:nth-child(2) { grid-area: 2 / 1; }
.board-cross__core i:nth-child(3) { grid-area: 2 / 2; }
.board-cross__core i:nth-child(4) { grid-area: 2 / 3; }
.board-cross__core i:nth-child(5) { grid-area: 3 / 2; }
.group__name { font-size: 1.1rem; font-weight: 700; color: var(--vert-fonce); padding-bottom: 6px; }
.group li { display: grid; gap: 2px; padding: 18px 0; border-bottom: 1px solid rgba(29,33,37,.14); }
.group li:last-child { border-bottom: 0; }
.group li strong { font-size: clamp(1.25rem, 1.2vw + .8rem, 1.7rem); font-weight: 750; font-variation-settings: "wdth" 108; line-height: 1.15; }
.group li span { color: #4A5157; }
.group__call { margin-top: var(--s-2); }

/* Accès ---------------------------------------------------------------- */
.acces { background: var(--sauge-3); color: var(--texte); padding: var(--s-section) 0; }
.acces__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(36px, 5vw, 80px); align-items: stretch; }
.acces__info { display: flex; flex-direction: column; }
/* trois blocs : adresse, téléphone, action ; serrés à l'intérieur, francs entre eux */
.acces__addr { margin-top: var(--s-4); font-style: normal; font-size: clamp(1.2rem, .9vw + .8rem, 1.6rem); font-weight: 600; line-height: 1.3; }
.acces__park { margin-top: var(--s-1); color: #3D4549; }
.acces__tel {
  align-self: flex-start; margin-top: var(--s-4); text-decoration: none; white-space: nowrap;
  font-weight: 900; font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 3.4vw, 3.4rem); line-height: 1.15; letter-spacing: -.02em; color: var(--vert-fonce);
  transition: transform 160ms var(--ease-out), color 200ms ease;
}
.acces__telnote { margin-top: var(--s-2); color: #3D4549; }
.acces__actions { margin: var(--s-4) 0 var(--s-4); }
.acces__titulaire { margin-top: auto; padding-top: var(--s-3); border-top: 1px solid rgba(29,33,37,.18); font-weight: 600; }
.acces__map { min-height: 380px; border-radius: 20px; overflow: hidden; background: #DDE3DA; }
.acces__map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* Pied de page --------------------------------------------------------- */
.foot { background: var(--vert-fonce); color: #DDE8DA; padding: 28px 0; font-size: .92rem; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Mobile --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .bar__status { display: none; }
}
@media (max-width: 1000px) {
  .hero__content { grid-template-columns: auto minmax(15rem, 22rem); grid-template-areas: "title hours" "status hours" "addr hours" "actions hours"; }
}
@media (max-width: 860px) {
  .hours__grid, .acces__grid { grid-template-columns: 1fr; }
  /* la croix se pose en tête, les familles s'empilent sous un filet vert */
  .services__board { --core: 64px; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: var(--s-4); }
  .group--nw, .group--ne, .group--sw, .group--se { grid-area: auto; align-self: auto; padding: var(--s-3) 0 0; border-top: 3px solid var(--croix); }
  .board-cross__arm { display: none; }
  .board-cross__core { grid-area: auto; order: -1; width: var(--core); height: var(--core); }
  .week { grid-template-columns: 1fr; border-top-width: 3px; }
  .week li { flex-direction: row; justify-content: space-between; padding: 13px 4px; border-right: 0; border-bottom: 1px solid rgba(29,33,37,.25); }
  .week li.is-today { border-radius: 10px; padding: 13px 14px; }
  .acces__map, .acces__map iframe { min-height: 320px; }
  .bar__go span { display: none; }
  .bar__go { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 600px) {
  .bar__brand span { display: none; }
  .bar__status { font-size: .82rem; padding: 6px 11px 6px 9px; }
  .bar__status .status__more { display: none; }
  .bar { gap: var(--s-1); }
  .bar__go { display: none; }
  .bar__nav { gap: 2px; margin-left: var(--s-1); }
  .bar__nav a { padding: 0 9px; font-size: .9rem; }
  .bar__tel { width: 40px; padding: 0; justify-content: center; }
  .bar__tel svg { display: block; }
  .bar__tel span { display: none; }
  /* sans plongée, le hero prend sa hauteur naturelle : photo entière, puis les infos d'un seul bloc */
  .hero { height: auto; min-height: 0; }
  .hero__content { flex: none; display: flex; flex-direction: column; align-items: stretch; padding: var(--s-4) var(--gutter) var(--s-5); }
  .hero__title { font-size: clamp(2.2rem, 11vw, 3rem); }
  .hero__info { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "status" "hours" "addr" "actions"; margin-top: var(--s-2); gap: var(--s-3); }
  .hero__hours { display: grid; grid-template-columns: 1.4fr 1fr 1fr; padding: 12px 0; border-top: 1px solid rgba(29,33,37,.14); border-bottom: 1px solid rgba(29,33,37,.14); }
  .hero__hours li { flex-direction: column; gap: 0; padding: 0 0 0 10px; border-bottom: 0; border-left: 1px solid rgba(29,33,37,.14); font-size: .85rem; }
  .hero__hours li:first-child { padding-left: 0; border-left: 0; }
  .hero__status { font-size: .95rem; padding: 8px 16px 8px 12px; }
  .hero__addr { font-size: .95rem; }
  .hero__actions { margin-top: 4px; }
  .hero__actions .btn { flex: 1 1 0; min-height: 52px; padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .status.is-open .status__dot, .hero__glow { animation: none; }
}

/* Carreaux de la façade pour la plongée (créés en JS) */
.hero__tiles { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
.hero__tiles > i { position: absolute; background-repeat: no-repeat; will-change: transform; --g: 0; }
.hero__tiles > i::after { content: ""; position: absolute; inset: 0; background: var(--croix); opacity: var(--g); }
