/* ==========================================================================
   Cabinet Dentaire de Bourg-Saint-Andéol — style.css
   Base technique commune : variables, reset, polices, boutons.
   Commun à toutes les pages du site.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Inter:wght@400;600;800&display=swap');

:root {
  /* Bleus pastel */
  --bleu-tres-clair: #eaf4fc;
  --bleu-clair: #cfe7f8;
  --bleu-pastel: #a9d2ee;
  --bleu-moyen: #5b9bd0;
  --bleu-fonce: #2f6690;
  --bleu-nuit: #1c3b52;
  --bleu-titre: #2643a6; /* bleu indigo, réservé aux titres (h1-h3) */

  /* Neutres */
  --blanc: #ffffff;
  --gris-texte: #3a4650;
  --gris-placeholder: #d9dfe4;
  --gris-placeholder-texte: #4d5860;
  --noir-footer: #14181d;

  /* Rayons et ombres */
  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 32px;
  --radius-pill: 999px;
  --ombre-douce: 0 8px 24px rgba(47, 102, 144, 0.15);

  /* Typo */
  --font-titres: "Poppins", sans-serif;
  --font-texte: "Inter", sans-serif;
}

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

html,
body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li,
figure,
figcaption {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-texte);
  font-size: 17px;
  line-height: 1.6;
  color: var(--gris-texte);
  background: var(--blanc);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-titres);
  color: var(--bleu-titre);
  line-height: 1.3;
}

h1 {
  font-size: 2.9rem;
}

h2 {
  font-size: 2.1rem;
}

h3 {
  font-size: 1.45rem;
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
}

/* ==========================================================================
   Boutons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-s);
  font-family: var(--font-titres);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-primaire {
  background: var(--bleu-fonce);
  color: var(--blanc);
}

.btn-primaire:hover {
  background: var(--bleu-nuit);
  transform: translateY(-2px);
}

.btn-secondaire {
  background: var(--blanc);
  color: var(--bleu-fonce);
  border: 2px solid var(--bleu-pastel);
}

.btn-secondaire:hover {
  background: var(--bleu-tres-clair);
}

/* ==========================================================================
   Placeholder de photo manquante (commun à toutes les pages)
   ========================================================================== */

.placeholder-photo {
  background: var(--gris-placeholder);
  border: 2px dashed #b7c1c9;
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--gris-placeholder-texte);
  font-family: var(--font-texte);
  font-size: 0.85rem;
  padding: 12px;
  min-height: 220px;
}

/* ==========================================================================
   Header commun + image de fond réductible (hero-bg)
   ========================================================================== */

.site-header {
  position: relative;
  z-index: 40;
}

.hero-bg {
  position: relative;
  height: 70vh;
  background-size: cover;
  background-position: center;
  filter: none;
  transition: height 0.5s ease, filter 0.5s ease;
}

.hero-bg.reduit {
  height: 180px;
  filter: grayscale(85%) brightness(0.85);
}

.header-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 24px 40px;
  background: linear-gradient(180deg, rgba(20, 24, 29, 0.6) 0%, rgba(20, 24, 29, 0) 100%);
}

.logo {
  display: inline-flex;
}

.logo img {
  height: 56px;
  width: auto;
  transition: height 0.3s ease;
}

.hero-bg.reduit .logo img {
  height: 76px;
}

/* Alignée tout en haut de l'image, indépendamment de la position du logo */
.nav-principale {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.nav-principale a {
  display: inline-block;
  font-family: var(--font-titres);
  font-weight: 700;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--blanc);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  padding: 6px 4px;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.nav-principale a:hover,
.nav-principale a:focus-visible {
  opacity: 0.7;
}

@media (max-width: 1024px) {
  .hero-bg {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 320px;
  }

  .hero-bg.reduit {
    height: auto;
    min-height: 0;
  }

  .header-bar {
    position: static;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    padding: 16px 20px;
  }

  .logo img,
  .hero-bg.reduit .logo img {
    height: 48px;
  }

  .nav-principale {
    position: static;
    transform: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
  }

  .nav-principale a {
    font-size: 1.05rem;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-principale a {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   Menu latéral déroulant (barre fixe + panneau des prises en charge)
   ========================================================================== */

body {
  margin-left: 64px;
  transition: margin-left 0.35s ease;
}

body.menu-ouvert {
  margin-left: 320px;
}

.menu-lateral {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 64px;
  background: var(--bleu-fonce);
  box-shadow: var(--ombre-douce);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.35s ease, height 0.35s ease, top 0.35s ease,
    left 0.35s ease, border-radius 0.35s ease;
}

.menu-lateral.ouvert {
  width: 320px;
}

.menu-toggle {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icone-hamburger {
  position: relative;
  width: 26px;
  height: 18px;
}

.icone-hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--blanc);
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.icone-hamburger span:nth-child(1) {
  top: 0;
}

.icone-hamburger span:nth-child(2) {
  top: 7.5px;
}

.icone-hamburger span:nth-child(3) {
  top: 15px;
}

.menu-lateral.ouvert .icone-hamburger span:nth-child(1) {
  top: 7.5px;
  transform: rotate(45deg);
}

.menu-lateral.ouvert .icone-hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-lateral.ouvert .icone-hamburger span:nth-child(3) {
  top: 7.5px;
  transform: rotate(-45deg);
}

.menu-panneau {
  flex: 1;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.menu-lateral.ouvert .menu-panneau {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.1s;
}

.menu-panneau ul {
  display: flex;
  flex-direction: column;
  padding: 8px 0 24px;
}

.menu-panneau a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  color: var(--blanc);
  font-family: var(--font-titres);
  font-weight: 600;
  font-size: 1.2rem;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.menu-panneau a:hover,
.menu-panneau a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.menu-icone {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: var(--ombre-douce);
}

.menu-lien-texte {
  padding-left: 88px;
}

.lien-mobile {
  display: none;
}

@media (max-width: 1024px) {
  .menu-lateral.ouvert {
    width: 100vw;
  }

  body.menu-ouvert {
    margin-left: 64px;
  }

  .menu-panneau ul {
    padding-top: 24px;
  }
}

@media (max-width: 640px) {
  /* Sur téléphone, les liens Accueil / Notre cabinet / Horaires et accès /
     Contact ne sont plus dans le bandeau du haut : ils rejoignent les
     prises en charge dans le menu latéral déroulant. */
  .nav-principale {
    display: none;
  }

  .lien-mobile {
    display: flex;
  }

  /* Le bouton rond flotte par-dessus la page (comme un bouton flottant) :
     on ne réserve plus de bande blanche sur le côté pour lui. */
  body {
    margin-left: 0;
  }

  body.menu-ouvert {
    margin-left: 0;
  }

  .header-bar {
    padding-left: 64px;
  }

  /* Fermé : juste un bouton rond (les 3 traits blancs sur fond bleu),
     flottant dans son coin plutôt qu'une barre pleine hauteur. Ouvert :
     on retrouve le panneau plein écran avec le même fond bleu qu'avant. */
  .menu-lateral {
    top: 12px;
    left: 8px;
    height: 44px;
    width: 44px;
    border-radius: 50%;
  }

  .menu-lateral.ouvert {
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    border-radius: 0;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .icone-hamburger {
    width: 20px;
    height: 15px;
  }

  .icone-hamburger span:nth-child(2) {
    top: 6px;
  }

  .icone-hamburger span:nth-child(3) {
    top: 12px;
  }

  .menu-lateral.ouvert .icone-hamburger span:nth-child(1),
  .menu-lateral.ouvert .icone-hamburger span:nth-child(3) {
    top: 6px;
  }
}

/* ==========================================================================
   Bandeau "Contactez le cabinet dentaire" (au-dessus du footer, toutes pages)
   ========================================================================== */

.footer-cta {
  background: var(--bleu-tres-clair);
  padding: 40px 24px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.footer-cta h2 {
  color: var(--bleu-titre);
  font-size: 1.6rem;
  margin: 0;
}

@media (max-width: 640px) {
  .footer-cta {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   Footer commun (rien n'est cliquable dedans)
   ========================================================================== */

.site-footer {
  background: var(--noir-footer);
  color: var(--blanc);
  padding: 56px 24px 32px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  justify-content: space-between;
}

.footer-bloc h3 {
  color: var(--bleu-pastel);
  font-family: var(--font-titres);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-bloc p {
  color: var(--blanc);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.footer-equipe ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-equipe li {
  color: var(--blanc);
  font-size: 0.95rem;
}

.footer-logo img {
  height: 150px;
  width: auto;
}

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    gap: 32px;
  }
}
