/* =============================================================================
   common.css — Robin Hétroy Ostéopathe
   Variables · Reset · Typographie · Header · Footer · Utilitaires
   ============================================================================= */

/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
  /* Couleurs principales */
  --color-primary:      #2E86C1;
  --color-deep:         #1B4F72;
  --color-sky:          #5DADE2;
  --color-foam:         #D6EAF8;
  --color-foam-light:   #EBF5FB;

  /* Couleurs sable */
  --color-sand-warm:    #E8D5B0;
  --color-sand-gold:    #C9A96E;
  --color-sand-light:   #F5F0E8;

  /* Couleurs neutres */
  --color-granite:      #2C3E50;
  --color-slate:        #566573;
  --color-mist:         #ABB2B9;
  --color-white:        #FFFFFF;

  /* Texte */
  --text-primary:       var(--color-granite);
  --text-secondary:     var(--color-slate);
  --text-muted:         var(--color-mist);
  --text-on-dark:       var(--color-white);
  --text-on-primary:    var(--color-white);

  /* Fonds */
  --bg-page:            var(--color-sand-light);
  --bg-white:           var(--color-white);
  --bg-section-alt:     var(--color-sand-warm);
  --bg-foam:            var(--color-foam-light);

  /* Bordures */
  --border-color:       #DDE4EA;
  --border-color-dark:  #B0BEC5;
  --border-radius:      8px;
  --border-radius-lg:   12px;

  /* Typographie */
  --font-title:         'Merriweather', Georgia, serif;
  --font-body:          'Inter', Arial, sans-serif;
  --font-size-base:     16px;
  --line-height-base:   1.7;

  /* Espacements */
  --space-xs:    0.25rem;
  --space-sm:    0.5rem;
  --space-md:    1rem;
  --space-lg:    1.5rem;
  --space-xl:    2rem;
  --space-2xl:   3rem;
  --space-3xl:   4rem;

  /* Conteneur */
  --container-max:  1140px;
  --container-pad:  1.25rem;

  /* Header */
  --header-height:  88px;

  /* Transitions */
  --transition:     0.2s ease;

  /* Ombres */
  --shadow-sm:   0 1px 4px rgba(27,79,114,0.08);
  --shadow-md:   0 4px 16px rgba(27,79,114,0.12);
  --shadow-lg:   0 8px 32px rgba(27,79,114,0.16);
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: var(--line-height-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-deep); }

ul, ol { list-style: none; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ─── Typographie ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--color-deep);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* ─── Conteneur ──────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ─── Boutons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.65rem 1.5rem;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-sand-gold);
  color: var(--color-deep);
  border-color: var(--color-sand-gold);
}
.btn-primary:hover {
  background: #b8954f;
  border-color: #b8954f;
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-deep);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-doctolib {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-doctolib:hover {
  background: var(--color-deep);
  border-color: var(--color-deep);
  color: var(--color-white);
}

/* ─── Section header (titre de section) ──────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.section-header h2 { margin-bottom: var(--space-sm); }
.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 0;
}

/* ─── Sections ───────────────────────────────────────────────────────────────── */
.section { padding-block: var(--space-3xl); }
.section-alt { background: var(--bg-section-alt); }
.section-white { background: var(--bg-white); }
.section-primary { background: var(--color-primary); color: var(--text-on-dark); }
.section-deep { background: var(--color-deep); color: var(--text-on-dark); }
.section-foam { background: var(--bg-foam); }

/* ─── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-primary { background: var(--color-foam); color: var(--color-deep); }
.badge-gold    { background: var(--color-sand-warm); color: #7D6B50; }
.badge-urgent  { background: #FDECEA; color: #C0392B; }

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--border-radius);
  background: var(--color-foam-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
  font-size: 1.5rem;
}

/* ─── HEADER ─────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  height: var(--header-height);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo img {
  height: 52px;
  width: auto;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 10px;
  padding: 3px 8px;
}

/* Nav principale */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  color: rgba(255,255,255,0.88);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: var(--border-radius);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
  text-align: center;
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
  background: rgba(255,255,255,0.15);
}

/* CTA RDV dans la nav */
.nav-cta {
  margin-left: var(--space-sm);
  padding: 0.45rem 1.1rem;
  background: var(--color-sand-gold);
  color: var(--color-deep);
  border-radius: var(--border-radius);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.nav-cta:hover {
  background: #b8954f;
  color: var(--color-white);
}

/* Sélecteur de langue */
.lang-switcher {
  position: relative;
  margin-left: var(--space-md);
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: rgba(255,255,255,0.88);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.3rem 0.5rem;
  border-radius: var(--border-radius);
  transition: background var(--transition);
  background: none;
  border: none;
  user-select: none;
}
.lang-current:hover { background: rgba(255,255,255,0.15); color: var(--color-white); }
.lang-current img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  min-width: 120px;
  z-index: 200;
  overflow: hidden;
}
.lang-switcher.open .lang-dropdown { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background var(--transition);
}
.lang-option img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.lang-option:hover { background: var(--color-foam-light); color: var(--color-deep); }
.lang-option.active { font-weight: 600; color: var(--color-primary); }

/* Burger menu mobile */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Bandeaux d'alerte (fermeture, urgence) */
.site-notice {
  background: #FDF3E3;
  border-bottom: 2px solid var(--color-sand-gold);
  padding: 0.6rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-granite);
}
.site-notice strong { color: #7D6B50; }

/* ─── FOOTER ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-deep);
  color: rgba(255,255,255,0.80);
  padding-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-col-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-md);
  letter-spacing: 0.03em;
}

.footer-logo { height: 70px; width: auto; margin-bottom: var(--space-md); }

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: var(--space-md);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
  color: rgba(255,255,255,0.80);
}
.footer-contact-item i { color: var(--color-sky); margin-top: 2px; flex-shrink: 0; }

.footer-nav-link {
  display: block;
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  padding: 0.2rem 0;
  transition: color var(--transition);
  text-decoration: none;
}
.footer-nav-link:hover { color: var(--color-white); }

.footer-horaire-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  padding: 0.18rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-horaire-row:last-child { border-bottom: none; }
.footer-horaire-row .jour { color: rgba(255,255,255,0.65); }
.footer-horaire-row .heure { color: var(--color-white); font-weight: 500; }
.footer-horaire-row .ferme { color: var(--color-mist); font-style: italic; }

.footer-rdv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-md);
  padding: 0.55rem 1.1rem;
  background: var(--color-sand-gold);
  color: var(--color-deep);
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition);
}
.footer-rdv-btn:hover { background: #b8954f; color: var(--color-white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-block: var(--space-lg);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.50);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.footer-bottom-links a {
  color: rgba(255,255,255,0.50);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-bottom-links a:hover { color: rgba(255,255,255,0.85); }

.footer-kinethix {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}
.footer-kinethix a {
  color: rgba(255,255,255,0.50);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-kinethix a:hover { color: rgba(255,255,255,0.85); }

.footer-rpps {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

/* ─── Cookie banner ──────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--color-granite);
  color: rgba(255,255,255,0.88);
  padding: var(--space-md) 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
}
.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  flex-wrap: wrap;
}
.cookie-text { font-size: 0.88rem; line-height: 1.5; margin: 0; }
.cookie-btn {
  flex-shrink: 0;
  padding: 0.45rem 1.2rem;
  background: var(--color-sand-gold);
  color: var(--color-deep);
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.cookie-btn:hover { background: #b8954f; color: var(--color-white); }

/* ─── Utilitaires ────────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-xl { margin-bottom: var(--space-xl); }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }

  .burger { display: flex; }

  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-deep);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md);
    gap: var(--space-xs);
    box-shadow: var(--shadow-lg);
  }
  .header-nav.open { display: flex; }

  .nav-link { padding: 0.65rem var(--space-md); font-size: 1rem; }
  .nav-cta { margin-left: 0; margin-top: var(--space-sm); text-align: center; padding: 0.7rem; }
  .lang-switcher { margin-left: 0; margin-top: var(--space-sm); }
  .lang-current { justify-content: center; }
  .lang-dropdown { left: 0; right: auto; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom-links { justify-content: center; }

  .cookie-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .section { padding-block: var(--space-2xl); }
  .btn { font-size: 0.9rem; padding: 0.6rem 1.1rem; }
}
