/*
Theme Name: KOS-BISCA
Theme URI: https://kos-bisca.fr
Author: Cabinet KOS-BISCA
Description: Thème sur mesure pour le cabinet de kinésithérapie, ostéopathie et rééducation sportive KOS-BISCA à Biscarrosse. Palette teal/vert/navy, typographies Manrope + Source Sans 3.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kos-bisca
*/

/* ==========================================================================
   TOKENS — repris du système de design KOS (couleurs, typo, espacement)
   ========================================================================== */
:root {
  /* Couleurs — palette brute */
  --navy-900: #1a222f;
  --navy-800: #222d3f;
  --navy-700: #2f3c52;
  --navy-600: #4a5875;
  --teal-700: #1f7c85;
  --teal-600: #247d9b;
  --teal-500: #2db8bb;
  --teal-400: #4fcbce;
  --teal-100: #e3f6f6;
  --green-600: #8fb93e;
  --green-500: #aecc52;
  --green-300: #cfe38f;
  --green-100: #f0f7dd;
  --white: #ffffff;
  --gray-050: #f6f7f9;
  --gray-100: #eef0f3;
  --gray-200: #e1e4e9;
  --gray-300: #c7cdd6;
  --gray-400: #9aa3b2;
  --gray-500: #6b7484;
  --gray-600: #4d5566;
  --red-500: #e0554b;
  --amber-500: #e2a13a;

  /* Couleurs — alias sémantiques */
  --bg-app: var(--gray-050);
  --bg-surface: var(--white);
  --bg-surface-sunken: var(--gray-100);
  --bg-inverse: var(--navy-800);
  --text-primary: var(--navy-800);
  --text-secondary: var(--gray-500);
  --text-muted: var(--gray-400);
  --text-inverse: var(--white);
  --text-accent: var(--teal-600);
  --border-default: var(--gray-200);
  --border-strong: var(--gray-300);
  --brand-primary: var(--teal-500);
  --brand-primary-hover: var(--teal-600);
  --brand-primary-active: var(--teal-700);
  --brand-secondary: var(--green-500);
  --brand-secondary-hover: var(--green-600);
  --gradient-brand: linear-gradient(135deg, var(--green-500) 0%, var(--teal-500) 55%, var(--teal-600) 100%);

  /* Typo */
  --font-display: "Manrope", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;

  --text-display-xl: 56px;
  --text-display-l: 40px;
  --text-display-m: 32px;
  --text-h1: 28px;
  --text-h2: 22px;
  --text-h3: 18px;
  --text-body-l: 17px;
  --text-body: 15px;
  --text-body-s: 13px;
  --text-caption: 12px;

  --leading-tight: 1.1;
  --leading-heading: 1.25;
  --leading-body: 1.55;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 700;
  --weight-bold: 800;

  --tracking-tight: -0.01em;
  --tracking-label: 0.04em;

  /* Espacement */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 72px;
  --space-11: 96px;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 18px;
  --radius-pill: 999px;

  --shadow-s: 0 1px 2px rgba(26, 34, 47, 0.06);
  --shadow-m: 0 4px 12px rgba(26, 34, 47, 0.08);
  --shadow-l: 0 12px 32px rgba(26, 34, 47, 0.12);

  --ease-out: cubic-bezier(0, 0, .2, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;

  --container-max: 1200px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body-l);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--text-accent); text-decoration: none; }
a:hover { color: var(--teal-700); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: var(--weight-bold); line-height: var(--leading-heading); margin: 0; letter-spacing: var(--tracking-tight); }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
.kos-container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.kos-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kos-skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy-800); color: #fff; padding: 12px 20px; z-index: 100; border-radius: 0 0 8px 0; }
.kos-skip-link:focus { left: 0; }

/* ==========================================================================
   BOUTONS
   ========================================================================== */
.kos-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: var(--radius-m);
  font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: var(--text-body);
  border: 1px solid transparent; text-decoration: none; white-space: nowrap;
  transition: background-color var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.kos-btn:hover { text-decoration: none; }
.kos-btn--sm { height: 40px; padding: 0 18px; font-size: var(--text-body-s); }
.kos-btn--primary { background: var(--brand-primary); color: #fff; }
.kos-btn--primary:hover { background: var(--brand-primary-hover); color: #fff; }
.kos-btn--primary:active { background: var(--brand-primary-active); }
.kos-btn--secondary { background: var(--green-500); color: var(--navy-800); }
.kos-btn--secondary:hover { background: var(--green-600); color: var(--navy-800); }
.kos-btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--text-primary); }
.kos-btn--ghost:hover { background: var(--gray-100); color: var(--text-primary); }
.kos-btn--on-dark { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.28); color: #fff; }
.kos-btn--on-dark:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.kos-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 248, 249, 0.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-default);
}
.kos-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap: 16px; }
.kos-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.kos-brand:hover { text-decoration: none; }
.kos-brand-mark {
  width: 38px; height: 38px; border-radius: var(--radius-m);
  background: linear-gradient(135deg, var(--teal-500), var(--green-500));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kos-brand-mark span { font-family: var(--font-display); font-weight: var(--weight-bold); color: #fff; font-size: 15px; }
.kos-brand-name { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 18px; letter-spacing: 0.5px; color: var(--text-primary); line-height: 1.1; }
.kos-brand-tagline { font-size: 11px; letter-spacing: 1.5px; color: var(--teal-600); font-weight: var(--weight-semibold); }
.kos-nav { display: flex; align-items: center; gap: 28px; }
.kos-nav a { font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: 15px; color: var(--text-primary); }
.kos-nav a:hover { color: var(--teal-600); text-decoration: none; }

/* Menu déroulant (pages autres que l'accueil, quand un menu WordPress
   existe avec des sous-pages) : replié par défaut, ouvert au survol / focus. */
.kos-nav--dropdown { gap: 4px; }
.kos-nav--dropdown > li { list-style: none; margin: 0; }
.kos-nav--dropdown > li > a { display: inline-flex; align-items: center; padding: 8px 10px; border-radius: var(--radius-s); }
.kos-nav--dropdown > li > a:hover { background: var(--gray-100); }
.kos-nav--dropdown .menu-item-has-children > a::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px);
}
.kos-nav--dropdown .sub-menu { list-style: none; margin: 0; padding: 0; }
@media (min-width: 861px) {
  .kos-nav--dropdown > li { position: relative; }
  .kos-nav--dropdown .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 240px; z-index: 60;
    background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-m); box-shadow: var(--shadow-m);
    padding: 6px; display: flex; flex-direction: column; gap: 2px;
    opacity: 0; visibility: hidden; transform: translateY(4px);
    transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out), visibility var(--duration-base);
  }
  .kos-nav--dropdown > li:hover > .sub-menu,
  .kos-nav--dropdown > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
  .kos-nav--dropdown .sub-menu a { display: block; padding: 9px 12px; border-radius: var(--radius-s); font-size: 14px; white-space: nowrap; }
  .kos-nav--dropdown .sub-menu a:hover { background: var(--gray-100); }
}
@media (max-width: 860px) {
  .kos-nav--dropdown .sub-menu { padding-left: 16px; margin: 2px 0 6px; display: flex; flex-direction: column; gap: 2px; }
  .kos-nav--dropdown .sub-menu a { padding: 8px 0; }
  .kos-nav--dropdown .menu-item-has-children > a::after { transform: rotate(135deg) translate(-1px,-1px); }
}
.kos-header-actions { display: flex; align-items: center; gap: 10px; }
.kos-nav-toggle { display: none; background: none; border: none; padding: 8px; color: var(--text-primary); }

/* ==========================================================================
   HERO
   ========================================================================== */
.kos-hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.kos-hero-glow {
  position: absolute; top: -120px; right: -140px; width: 420px; height: 420px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(45,184,187,0.35), rgba(174,204,82,0.35));
  filter: blur(40px); pointer-events: none; z-index: 0;
}
.kos-hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.kos-badge {
  display: inline-flex; align-items: center; height: 28px; padding: 0 14px; border-radius: var(--radius-pill);
  background: var(--teal-100); color: var(--teal-700); font-size: var(--text-body-s); font-weight: var(--weight-semibold);
}
.kos-hero-title { font-size: var(--text-display-xl); line-height: var(--leading-tight); margin: 20px 0; }
.kos-hero-lede { font-size: 19px; line-height: 1.6; color: var(--text-secondary); max-width: 520px; margin: 0 0 32px; }
.kos-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.kos-hero-stats { display: flex; gap: 36px; margin-top: 48px; flex-wrap: wrap; }
.kos-hero-stat-num { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 28px; color: var(--teal-600); }
.kos-hero-stat-label { font-size: var(--text-body-s); color: var(--text-secondary); }
.kos-hero-media { position: relative; }
.kos-hero-photo {
  border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-m); border: 1px solid var(--border-default);
  width: 100%; height: 460px; background: var(--gradient-brand);
}
.kos-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.kos-hero-callout {
  position: absolute; bottom: -22px; left: -22px; background: #fff; border: 1px solid var(--border-default);
  border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow-s); display: flex; align-items: center; gap: 10px; max-width: 260px;
}
.kos-hero-callout-dot { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--teal-500), var(--green-500)); flex-shrink: 0; }
.kos-hero-callout-title { font-weight: var(--weight-semibold); font-size: 13px; }
.kos-hero-callout-sub { font-size: 12px; color: var(--text-secondary); }

/* ==========================================================================
   SECTIONS génériques
   ========================================================================== */
.kos-section { padding: 80px 0; }
.kos-section--surface { background: #fff; border-top: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default); }
.kos-section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 48px; gap: 24px; flex-wrap: wrap; }
.kos-eyebrow { font-size: var(--text-body-s); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-label); color: var(--teal-600); text-transform: uppercase; margin-bottom: 10px; }
.kos-section-title { font-size: var(--text-display-m); margin: 0 0 14px; max-width: 640px; }
.kos-section-lede { font-size: var(--text-body-l); color: var(--text-secondary); line-height: 1.6; margin: 0; max-width: 640px; }

/* ==========================================================================
   SPÉCIALITÉS (carrousel)
   ========================================================================== */
.kos-carousel-controls { display: flex; gap: 10px; }
.kos-carousel-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-default); background: #fff;
  display: flex; align-items: center; justify-content: center; color: var(--text-primary);
}
.kos-carousel-btn:hover { background: var(--gray-100); }
.kos-carousel-btn:disabled { opacity: 0.4; cursor: default; }
.kos-carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr);
  gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 4px 16px; margin: 0 -4px;
}
.kos-carousel-track::-webkit-scrollbar { height: 6px; }
.kos-carousel-track::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.kos-card {
  scroll-snap-align: start; background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-l);
  padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-s);
  transition: box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
  color: inherit; text-decoration: none;
}
a.kos-card:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); color: inherit; text-decoration: none; }
div.kos-card:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }
.kos-card-icon { width: 44px; height: 44px; border-radius: var(--radius-m); display: flex; align-items: center; justify-content: center; }
.kos-card-icon--teal { background: color-mix(in oklch, var(--teal-500) 15%, white); color: var(--teal-600); }
.kos-card-icon--green { background: color-mix(in oklch, var(--green-500) 20%, white); color: var(--green-600); }
.kos-card-title { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-h3); }
.kos-card-desc { font-size: var(--text-body); color: var(--text-secondary); line-height: 1.55; }

/* ==========================================================================
   APPROCHE
   ========================================================================== */
.kos-approche-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.kos-approche-photo { border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--border-default); box-shadow: var(--shadow-s); width: 100%; height: 380px; background: var(--gray-100); }
.kos-approche-photo img { width: 100%; height: 100%; object-fit: cover; }
.kos-steps { display: flex; flex-direction: column; gap: 20px; }
.kos-step { display: flex; gap: 16px; }
.kos-step-num {
  min-width: 32px; height: 32px; border-radius: 50%; background: var(--teal-500); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 14px; flex-shrink: 0;
}
.kos-step-title { font-weight: var(--weight-semibold); margin-bottom: 4px; }
.kos-step-desc { font-size: var(--text-body); color: var(--text-secondary); line-height: 1.55; }

/* ==========================================================================
   ÉQUIPE
   ========================================================================== */
.kos-team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.kos-team-card { border: 1px solid var(--border-default); border-radius: var(--radius-l); overflow: hidden; background: #fff; box-shadow: var(--shadow-s); display: block; color: inherit; text-decoration: none; transition: box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out); }
a.kos-team-card:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); color: inherit; text-decoration: none; }
.kos-team-photo { width: 100%; height: 220px; background: var(--gradient-brand); }
.kos-team-photo img { width: 100%; height: 100%; object-fit: cover; }
.kos-team-body { padding: 20px; }
.kos-team-name { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-h3); }
.kos-team-role { font-size: var(--text-body); color: var(--teal-600); font-weight: var(--weight-medium); margin: 4px 0 10px; }
.kos-team-bio { font-size: var(--text-body); color: var(--text-secondary); line-height: 1.5; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.kos-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.kos-contact-cta {
  padding: 36px; background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); color: #fff;
  border-radius: var(--radius-l); display: flex; flex-direction: column; justify-content: center;
}
.kos-contact-cta-title { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 26px; margin-bottom: 14px; }
.kos-contact-cta-text { font-size: var(--text-body); line-height: 1.6; color: rgba(255,255,255,0.82); margin: 0 0 24px; }
.kos-contact-info { display: flex; flex-direction: column; gap: 20px; }
.kos-contact-row { display: flex; gap: 14px; align-items: flex-start; }
.kos-contact-row-icon { color: var(--teal-600); margin-top: 2px; flex-shrink: 0; }
.kos-contact-row-label { font-weight: var(--weight-semibold); margin-bottom: 2px; }
.kos-contact-row-value { color: var(--text-secondary); font-size: var(--text-body); }
.kos-contact-map { border-radius: 14px; overflow: hidden; border: 1px solid var(--border-default); height: 220px; background: var(--gray-100); }
.kos-contact-map iframe, .kos-contact-map img { width: 100%; height: 100%; border: 0; object-fit: cover; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.kos-footer { background: var(--navy-800); color: rgba(255,255,255,0.85); padding: 48px 0 28px; }
.kos-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.kos-footer-brand { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 18px; color: #fff; }
.kos-footer-tagline { font-size: 12px; letter-spacing: 1.5px; color: var(--green-500); font-weight: var(--weight-semibold); margin: 4px 0 14px; }
.kos-footer-desc { font-size: var(--text-body); line-height: 1.6; color: rgba(255,255,255,0.6); max-width: 320px; }
.kos-footer-heading { font-weight: var(--weight-semibold); color: #fff; margin-bottom: 12px; font-size: var(--text-body); }
.kos-footer-links { display: flex; flex-direction: column; gap: 8px; font-size: var(--text-body); }
.kos-footer-links a { color: rgba(255,255,255,0.65); }
.kos-footer-links a:hover { color: #fff; }
.kos-footer-bottom { max-width: var(--container-max); margin: 32px auto 0; padding: 20px 24px 0; border-top: 1px solid rgba(255,255,255,0.12); font-size: var(--text-caption); color: rgba(255,255,255,0.45); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px) {
  .kos-hero-grid, .kos-approche-grid, .kos-contact-grid { grid-template-columns: 1fr !important; }
  .kos-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kos-footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .kos-nav, .kos-header-actions .kos-btn { display: none; }
  .kos-nav-toggle { display: inline-flex; }
  .kos-hero-title { font-size: 38px !important; }
  body.kos-nav-open .kos-nav {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 16px 24px 20px;
    border-bottom: 1px solid var(--border-default); box-shadow: var(--shadow-m);
  }
  body.kos-nav-open .kos-nav a { padding: 10px 0; width: 100%; }
}
@media (max-width: 640px) {
  .kos-team-grid { grid-template-columns: 1fr; }
  .kos-hero-callout { position: static; margin-top: 16px; }
  .kos-hero-photo { height: 320px; }
}
