/* =========================================================
   Pharma-outils — feuille de style unique
   Concept : l'enseigne de pharmacie. Fond de nuit, modules
   verts qui s'allument, typographie d'affichage.
   ========================================================= */

/* ---------- 1. Réglages ---------- */

:root {
  /* couleurs */
  --nuit:        #0C2019;
  --nuit-clair:  #122E23;
  --nuit-bord:   #1E4736;
  --papier:      #F5F7F3;
  --papier-2:    #E9EEE8;
  --encre:       #0C2019;
  --encre-doux:  #4B5D55;
  --vert:        #10B981;
  --vert-clair:  #4FE3AA;
  --vert-sombre: #067A54;
  --halo:        rgba(79, 227, 170, .45);
  --ambre:       #D99A2B;

  /* typographie */
  --titre: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
  --texte: 'Public Sans', system-ui, -apple-system, sans-serif;
  --code:  'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* rythme */
  --gouttiere: clamp(1.25rem, 5vw, 4rem);
  --largeur: 72rem;
  --bord: 14px;
}

*, *::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-family: var(--texte);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--titre);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

img, svg { max-width: 100%; }

ul { margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--vert);
  outline-offset: 3px;
  border-radius: 4px;
}

.mono {
  font-family: var(--code);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Centrage du contenu sans casser les fonds pleine largeur */
.entete, .hero, .section, .pied, .doc {
  padding-inline: max(var(--gouttiere), (100% - var(--largeur)) / 2);
}

/* ---------- 2. Lien d'évitement ---------- */

.saut {
  position: absolute;
  left: 0; top: 0;
  z-index: 50;
  transform: translateY(-120%);
  padding: .7rem 1.2rem;
  background: var(--vert);
  color: var(--nuit);
  font: 600 .9rem/1 var(--texte);
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: transform .18s ease;
}
.saut:focus { transform: translateY(0); }

/* ---------- 3. En-tête ---------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: .9rem;
  background: rgba(12, 32, 25, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nuit-bord);
  color: var(--papier);
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--titre);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}

/* La croix verte, en CSS pur */
.marque__signe,
.croix {
  display: block;
  width: 1.15em;
  height: 1.15em;
  background: var(--vert);
  clip-path: polygon(
    36% 0, 64% 0, 64% 36%, 100% 36%, 100% 64%, 64% 64%,
    64% 100%, 36% 100%, 36% 64%, 0 64%, 0 36%, 36% 36%
  );
  box-shadow: 0 0 12px var(--halo);
}

.marque__tld { color: var(--vert); }

.nav {
  display: flex;
  gap: clamp(.9rem, 3vw, 2rem);
  font-size: .95rem;
}
.nav a {
  text-decoration: none;
  padding-block: .2rem;
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease, color .18s ease;
}
.nav a:hover { color: var(--vert-clair); border-bottom-color: var(--vert); }

/* ---------- 4. Héros ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(15rem, 22rem) 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(3rem, 9vw, 6.5rem);
  background:
    radial-gradient(70rem 40rem at 12% 25%, rgba(16, 185, 129, .13), transparent 60%),
    var(--nuit);
  color: var(--papier);
}

.hero__texte { max-width: 40ch; }

.sur-titre {
  margin: 0 0 1.1rem;
  color: var(--vert-clair);
}

.hero h1 {
  font-size: clamp(2.3rem, 6.2vw, 4.15rem);
  margin-bottom: 1.2rem;
}

.chapo {
  font-size: clamp(1.05rem, .98rem + .4vw, 1.22rem);
  color: rgba(245, 247, 243, .78);
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin: 0;
}

/* ---------- 5. L'enseigne ---------- */

.hero__enseigne {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.panneau {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(4px, 1vw, 7px);
  width: 100%;
  aspect-ratio: 1;
  padding: clamp(.7rem, 2vw, 1.1rem);
  background: linear-gradient(160deg, #163628, #0A1A14);
  border: 1px solid var(--nuit-bord);
  border-radius: var(--bord);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 24px 60px -30px rgba(0, 0, 0, .9);
}

.module {
  border-radius: 3px;
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
  transition:
    background-color .22s ease,
    box-shadow .22s ease;
  transition-delay: calc(var(--d, 0) * 22ms);
}

.module--on {
  background: var(--vert);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .28),
    0 0 10px var(--halo),
    0 0 22px rgba(16, 185, 129, .3);
}

.module--saute { opacity: .25; }

.panneau__legende {
  margin: 0;
  color: rgba(245, 247, 243, .5);
  text-align: center;
  min-height: 1.2em;
}

/* ---------- 6. Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .72rem 1.35rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--texte);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--plein {
  background: var(--vert);
  border-color: var(--vert);
  color: var(--nuit);
}
.btn--plein:hover { background: var(--vert-clair); border-color: var(--vert-clair); }

.btn--petit { padding: .55rem 1rem; font-size: .88rem; }

.hero .btn:not(.btn--plein):hover { background: rgba(255, 255, 255, .08); }

/* ---------- 7. Sections ---------- */

.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }

.section__titre {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin-bottom: .8rem;
}

.section__intro {
  max-width: 46ch;
  color: var(--encre-doux);
  margin-bottom: clamp(2rem, 5vw, 3.2rem);
}

.section--sombre {
  background: var(--nuit);
  color: var(--papier);
}
.section--sombre .section__intro { color: rgba(245, 247, 243, .7); }

/* ---------- 8. Les outils ---------- */

.outils {
  list-style: none;
  display: grid;
  gap: 1.1rem;
}

.outil {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: clamp(1rem, 3vw, 2.2rem);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  background: #fff;
  border: 1px solid var(--papier-2);
  border-radius: var(--bord);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.outil:hover,
.outil:focus-within {
  border-color: rgba(16, 185, 129, .5);
  box-shadow: 0 18px 40px -28px rgba(12, 32, 25, .55);
  transform: translateY(-2px);
}

.outil--libre {
  background: transparent;
  border-style: dashed;
  border-color: #CBD5CE;
}

/* la mini-enseigne de chaque outil */
.outil__signe {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  width: 2.9rem;
  aspect-ratio: 1;
  padding: 3px;
  background: var(--nuit);
  border-radius: 7px;
}

.mini {
  border-radius: 1px;
  background: rgba(255, 255, 255, .07);
  transition: background-color .2s ease, box-shadow .2s ease;
  transition-delay: calc(var(--d, 0) * 18ms);
}
.mini--on { background: #0E9C6C; }

.outil:hover .mini--on,
.outil:focus-within .mini--on {
  background: var(--vert-clair);
  box-shadow: 0 0 6px var(--halo);
}

.outil__nom {
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  margin-bottom: .35rem;
}

.outil__resume {
  color: var(--encre-doux);
  font-size: 1.02rem;
  margin-bottom: 1.1rem;
}

.outil__points {
  list-style: none;
  display: grid;
  gap: .5rem;
  font-size: .96rem;
}

.outil__points li {
  position: relative;
  padding-left: 1.35rem;
}
.outil__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--vert);
}

.outil__points--prose {
  display: block;
  padding-left: 0;
  max-width: 46ch;
  color: var(--encre-doux);
}

.outil__lien { margin: 1.3rem 0 0; }

/* ---------- 9. Statuts ---------- */

.statut {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .35rem .75rem;
  color: var(--encre-doux);
  background: var(--papier-2);
  border-radius: 999px;
  white-space: nowrap;
}

.statut__point {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.statut--en-ligne {
  color: var(--vert-sombre);
  background: rgba(16, 185, 129, .12);
}
.statut--en-ligne .statut__point {
  background: var(--vert);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .55);
  animation: pouls 2.4s ease-out infinite;
}

@keyframes pouls {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ---------- 10. L'approche ---------- */

.principes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}

.principe {
  padding-top: 1.3rem;
  border-top: 2px solid var(--vert);
}

.principe h3 {
  font-size: 1.2rem;
  margin-bottom: .6rem;
}

.principe p {
  color: rgba(245, 247, 243, .72);
  font-size: .98rem;
}

/* ---------- 11. Contact ---------- */

.section--contact { text-align: center; }

.section--contact .section__titre { margin-bottom: 1.2rem; }

.contact__texte {
  max-width: 48ch;
  margin-inline: auto;
  color: var(--encre-doux);
  margin-bottom: 2rem;
}

.contact__action { margin-bottom: 1.1rem; }

.btn--grand {
  padding: .95rem 2rem;
  font-size: 1.05rem;
}

.contact__direct {
  color: var(--encre-doux);
  margin-bottom: 2.2rem;
}
.contact__direct a {
  color: var(--vert-sombre);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.contact__signature { color: var(--encre-doux); margin: 0; }

/* ---------- 11 bis. La boîte de proposition ---------- */

.dialogue {
  width: min(36rem, calc(100vw - 2rem));
  max-height: min(86vh, 46rem);
  padding: 0;
  border: 1px solid var(--nuit-bord);
  border-radius: var(--bord);
  background: var(--nuit);
  color: var(--papier);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9);
  overflow: auto;
}

.dialogue::backdrop {
  background: rgba(6, 16, 12, .62);
  backdrop-filter: blur(3px);
}

.dialogue__corps {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.5rem, 4vw, 2.2rem);
  text-align: left;
}

.dialogue__titre {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  margin: 0;
}

.dialogue__intro {
  margin: 0;
  font-size: .95rem;
  color: rgba(245, 247, 243, .72);
}

.champ {
  display: grid;
  gap: .4rem;
}

.champ__nom {
  font-size: .92rem;
  font-weight: 600;
}

.champ__option {
  font-family: var(--code);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(245, 247, 243, .45);
  margin-left: .4rem;
}

.champ textarea,
.champ input {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit;
  font-size: .97rem;
  color: var(--papier);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--nuit-bord);
  border-radius: 8px;
  resize: vertical;
  transition: border-color .18s ease, background-color .18s ease;
}

.champ textarea::placeholder,
.champ input::placeholder { color: rgba(245, 247, 243, .38); }

.champ textarea:focus,
.champ input:focus {
  outline: none;
  border-color: var(--vert);
  background: rgba(255, 255, 255, .08);
}

.dialogue__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .7rem;
  margin: .3rem 0 0;
}

/* .btn est écrite pour des liens : un <button> apporte son propre fond. */
.dialogue__actions .btn {
  cursor: pointer;
  font-family: var(--texte);
}
.dialogue__actions .btn:not(.btn--plein) {
  background: transparent;
  color: var(--papier);
}
.dialogue__actions .btn:not(.btn--plein):hover { background: rgba(255, 255, 255, .1); }

.dialogue__note {
  margin: 0;
  text-align: right;
  color: rgba(245, 247, 243, .4);
}

/* Sur un téléphone, l'action principale doit rester sous le pouce
   sans faire défiler la boîte. */
@media (max-width: 480px) {
  .dialogue__corps { gap: .9rem; }
  .dialogue__intro { font-size: .9rem; }
  .champ textarea { height: 5.5rem; }
  .champ textarea[rows="2"] { height: 3.8rem; }

  .dialogue__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .dialogue__actions .btn { justify-content: center; }
  .dialogue__note { text-align: center; }
}

/* ---------- 12. Pied ---------- */

.pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem;
  background: var(--nuit);
  color: rgba(245, 247, 243, .55);
  border-top: 1px solid var(--nuit-bord);
}
.pied p { margin: 0; }
.pied a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.pied a:hover { color: var(--vert-clair); border-bottom-color: currentColor; }

/* ---------- 13. Pages de texte (mentions légales) ---------- */

.doc {
  max-width: none;
  padding-block: clamp(3rem, 8vw, 5rem);
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 2.5rem;
}

.doc h2 {
  font-size: 1.25rem;
  margin: 2.6rem 0 .7rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--papier-2);
}

.doc p, .doc li { max-width: 68ch; }

.doc ul {
  list-style: none;
  display: grid;
  gap: .4rem;
  margin-bottom: 1rem;
}
.doc li { position: relative; padding-left: 1.35rem; }
.doc li::before {
  content: "";
  position: absolute;
  left: 0; top: .6em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--vert);
}

.doc a { color: var(--vert-sombre); }

.doc__retour {
  display: inline-block;
  margin-top: 3rem;
  font-family: var(--code);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--vert);
}

/* ---------- 14. Adaptations ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .hero__enseigne {
    width: min(100%, 16rem);
    align-items: flex-start;
  }
  .panneau__legende { text-align: left; }
}

@media (max-width: 720px) {
  .nav { font-size: .88rem; }
  .marque__mot { font-size: .95rem; }

  /* Ligne 1 : le signe à gauche, le statut à droite. Le corps dessous. */
  .outil { grid-template-columns: auto 1fr; row-gap: 1.2rem; }
  .outil__signe { grid-row: 1; grid-column: 1; }
  .statut { grid-row: 1; grid-column: 2; justify-self: end; align-self: center; }
  .outil__corps { grid-row: 2; grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .entete { gap: .75rem; }
  .marque__tld { display: none; }
  .nav { gap: .8rem; font-size: .84rem; }
}

/* ---------- 15. Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .outil:hover { transform: none; }
  .btn:hover { transform: none; }
}

/* ---------- 16. Impression ---------- */

@media print {
  .entete, .hero__enseigne, .saut { display: none; }
  body { background: #fff; color: #000; }
  .hero, .section--sombre, .pied { background: #fff; color: #000; }
  .outil { break-inside: avoid; border-color: #999; }
}
