/* =====================================================================
   SOS Médecins Capbreton — feuille de style commune à toutes les pages
   Polices hébergées sur le site (aucun appel à un service tiers).
   ===================================================================== */

@font-face{font-family:"Montserrat";font-style:normal;font-weight:600;font-display:swap;src:url("../fonts/montserrat-latin-600-normal.woff2") format("woff2")}
@font-face{font-family:"Montserrat";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/montserrat-latin-700-normal.woff2") format("woff2")}
@font-face{font-family:"Barlow";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/barlow-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Barlow";font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/barlow-latin-500-normal.woff2") format("woff2")}
@font-face{font-family:"Barlow";font-style:normal;font-weight:600;font-display:swap;src:url("../fonts/barlow-latin-600-normal.woff2") format("woff2")}

:root{
  --blue:#2A1EAF;        /* bleu SOS Médecins */
  --blue-dark:#1E1585;
  --lav:#E8EBFF;         /* lavande */
  --olive:#7B7554;       /* olive */
  --olive-dark:#625D42;
  --bg:#F6F5F1;          /* fond chaud */
  --card:#FFFFFF;
  --ink:#161B2E;
  --muted:#4B5163;
  --line:#E3E1DA;
  --radius:14px;
  --shadow:0 1px 2px rgba(22,27,46,.05),0 8px 24px rgba(22,27,46,.06);
  --head:"Montserrat",Arial,sans-serif;
  --body:"Barlow","Segoe UI",Arial,sans-serif;
  --gut:clamp(1rem,3.5vw,1.75rem);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:1.0625rem;line-height:1.6;-webkit-font-smoothing:antialiased}
img{max-width:100%;display:block}
a{color:var(--blue)}
:focus-visible{outline:3px solid var(--blue);outline-offset:3px;border-radius:4px}
h1,h2,h3{font-family:var(--head);margin:0;line-height:1.15;color:var(--ink)}
h1{font-weight:700;font-size:clamp(2.1rem,4.6vw,3.1rem);letter-spacing:-.01em}
h2{font-weight:700;font-size:clamp(1.45rem,2.4vw,1.75rem);color:var(--blue);margin-bottom:1rem}
h3{font-weight:600;font-size:1.08rem;margin-bottom:.55rem}
p{margin:0 0 1rem}
p:last-child{margin-bottom:0}
strong{font-weight:600}
.muted{color:var(--muted)}
.wrap{max-width:1240px;margin:0 auto;padding:0 var(--gut)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- boutons inclinés ---------- */
.btn{--btn-bg:var(--blue);--btn-fg:#fff;position:relative;z-index:0;display:inline-flex;align-items:center;gap:.6rem;
  padding:.78rem 1.45rem;color:var(--btn-fg);font-family:var(--body);font-weight:600;font-size:1rem;line-height:1.2;
  text-decoration:none;white-space:nowrap;border:0;background:none;cursor:pointer}
.btn::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--btn-bg);border-radius:9px;transform:skewX(-14deg);transition:background-color .2s ease,transform .2s ease}
.btn:hover::before{background:var(--btn-hover,var(--blue-dark))}
.btn:active::before{transform:skewX(-14deg) translateY(1px)}
.btn svg{width:1.15em;height:1.15em;flex:0 0 auto;transition:transform .2s ease}
.btn:hover svg.arrow{transform:translateX(3px)}
.btn-olive{--btn-bg:var(--olive);--btn-hover:var(--olive-dark)}
.btn-light{--btn-bg:#fff;--btn-fg:var(--blue);--btn-hover:#F1F2FF}
.btn-line{--btn-bg:transparent;--btn-fg:var(--ink);--btn-hover:#fff}
.btn-line::before{box-shadow:inset 0 0 0 1.5px var(--line)}
.btn-line:hover::before{box-shadow:inset 0 0 0 1.5px var(--ink)}
.btn-white-line{--btn-bg:transparent;--btn-fg:#fff;--btn-hover:rgba(255,255,255,.12)}
.btn-white-line::before{box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.65)}
.btn-sm{padding:.6rem 1.15rem;font-size:.95rem}

/* ---------- barre du haut ---------- */
.topbar{font-size:.9rem;color:var(--muted)}
.topbar .wrap{display:flex;justify-content:space-between;gap:1rem;padding-top:.6rem;padding-bottom:.6rem}
.topbar strong{color:var(--ink)}
.topbar a{color:var(--ink);font-weight:600}

/* ---------- en-tête ---------- */
.site-head{position:sticky;top:0;z-index:40;padding:.5rem 0}
.site-head .bar{display:flex;align-items:center;gap:1.25rem;background:#fff;border-radius:var(--radius);padding:.75rem .9rem .75rem 1.25rem;box-shadow:var(--shadow);transition:box-shadow .25s ease}
.site-head.scrolled .bar{box-shadow:0 6px 24px rgba(22,27,46,.12)}
.brand{flex:0 0 auto;display:block}
.brand img{height:48px;width:auto;max-width:none}
.site-nav{margin-left:auto}
.site-nav ul{display:flex;gap:1.6rem;list-style:none;margin:0;padding:0}
.site-nav a{font-family:var(--head);font-weight:600;font-size:.92rem;color:var(--ink);text-decoration:none;padding:.35rem 0;border-bottom:2px solid transparent;transition:color .2s ease,border-color .2s ease;white-space:nowrap}
.site-nav a:hover,.site-nav a[aria-current="page"]{color:var(--blue);border-color:var(--blue)}
.head-actions{display:flex;align-items:center;gap:1.1rem;padding-left:1.25rem;border-left:1px solid var(--line)}
.head-phone{display:none;align-items:center;gap:.4rem;font-weight:600;color:var(--ink);text-decoration:none;white-space:nowrap}
.head-phone svg{width:1.05em;height:1.05em;color:var(--olive)}
.menu-toggle{display:none;align-items:center;gap:.55rem;margin-left:auto;background:none;border:0;font:600 .95rem var(--head);color:var(--ink);cursor:pointer;padding:.4rem}
.menu-toggle span.bars{display:inline-grid;gap:4px}
.menu-toggle span.bars i{display:block;width:20px;height:2px;background:var(--ink);border-radius:2px}

/* ---------- grille d'accueil (bento) ---------- */
.home{padding:1rem 0 3.5rem}
.bento{display:grid;grid-template-columns:1.12fr 1fr;gap:1.25rem;align-items:stretch}
.bento-left{display:flex;flex-direction:column}
.bento-left .hero-tile{flex:1}
.bento-right{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem}
.tile{position:relative;overflow:hidden;background:var(--card);border-radius:var(--radius);padding:1.6rem;box-shadow:var(--shadow);display:flex;flex-direction:column}
.tile h2{font-size:1.4rem;margin-bottom:.9rem}
.tile p{font-size:1rem}
.tile .tile-cta{margin-top:auto;padding-top:1.2rem}
.tile-wide{grid-column:1/-1}
.tile-lav{background:var(--lav)}
.tile-olive{background:var(--olive);color:#fff}
.tile-olive h2,.tile-olive h3{color:#fff}
.tile-blue{background:var(--blue);color:#fff}
.tile-blue h2{color:#fff}
.tile h2.olive{color:var(--olive)}
.tile .deco{position:absolute;right:-12px;top:-12px;width:92px;height:92px;opacity:.09;color:currentColor;pointer-events:none;z-index:0}
.tile > *:not(.deco){position:relative;z-index:1}
.tile-lav .deco{color:var(--blue)}

.hero-tile{position:relative;min-height:400px;border-radius:var(--radius);overflow:hidden;display:flex;align-items:flex-end;padding:2.25rem;box-shadow:var(--shadow);
  background:var(--blue)}
.hero-tile::after{content:"";position:absolute;inset:0;z-index:0;background:url("../images/hero.jpg") center/cover no-repeat;animation:zoomout 18s ease-out both}
.hero-tile::before{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(22,27,46,0) 25%,rgba(22,27,46,.55) 100%)}
.hero-body{position:relative;z-index:2;min-width:0;max-width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:1.4rem}
.hero-tile h1{position:relative;z-index:2;color:#fff;margin:0;max-width:100%}
.hero-cta{display:none;box-shadow:none;animation:rise .7s .15s cubic-bezier(.22,.8,.3,1) both}
.hero-cta::before{box-shadow:0 8px 22px rgba(10,8,60,.35)}
.hero-tile h1 span{display:block;color:#fff}
.hero-tile h1 .accent{color:#C9CEFF}
.intro p{font-size:1.06rem;max-width:58ch}

.hours{list-style:none;margin:0 0 .25rem;padding:0;font-size:.98rem}
.hours li{padding:.55rem 0;border-bottom:1px solid rgba(42,30,175,.14)}
.hours li:first-child{padding-top:0}
.hours li:last-child{border-bottom:0}
.hours b{display:block;font-weight:600;color:var(--ink)}
.hours .when{display:block;color:var(--blue);font-weight:600}
.hours .where{display:block;color:var(--muted);font-size:.93rem}



.tile-inline{flex-direction:row;align-items:center;justify-content:space-between;gap:1.25rem;flex-wrap:wrap}
.tile-inline > div:first-child{flex:1 1 260px}
.tile-inline h2{margin-bottom:.3rem}
.tile-inline p{margin:0}
.tile-inline .tile-cta{margin-top:0;padding-top:0}
/* zone de couverture : liste fixe */
.communes{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.45rem}
.communes li{background:rgba(255,255,255,.14);border-radius:999px;padding:.3rem .8rem;font-size:.95rem;font-weight:500}
/* préparer votre appel : trois colonnes */
.prep{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}
.prep h3{font-size:1rem;padding-bottom:.55rem;margin-bottom:.6rem;border-bottom:1px solid rgba(255,255,255,.3)}
.prep ul{margin:0;padding-left:1.1rem;font-size:.97rem}
.prep li{margin-bottom:.35rem}
@media (max-width:620px){.prep{grid-template-columns:1fr}}

/* ---------- sections ---------- */
section{padding:3.5rem 0}
.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.75rem}
.sec-head h2{font-size:clamp(1.6rem,2.8vw,2.05rem);color:var(--ink);margin:0}
.sec-head p{margin:.5rem 0 0;color:var(--muted)}
.divider{border:0;border-top:1px solid var(--line);margin:0}

/* ---------- actualités : accueil ---------- */
.news{list-style:none;margin:0;padding:0;display:grid;gap:1.5rem}
.news time{display:block;color:var(--muted);font-size:.9rem;margin-bottom:.3rem}
.news h3{margin-bottom:.45rem}
.news-home{grid-template-columns:repeat(3,1fr)}
.news-home li{position:relative;display:flex;flex-direction:column;background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;padding:0 1.4rem 1.4rem;transition:transform .25s ease,box-shadow .25s ease}
.news-home li::before{content:"";display:block;height:150px;margin:0 -1.4rem 1.6rem;background:var(--blue) url("../images/hero.jpg") center/cover}
.news-home li:nth-child(3n+2)::before{background-image:url("../images/foret.jpg")}
.news-home li:nth-child(3n)::before{background-image:url("../images/capbreton.jpg")}
.news-home li::after{content:"";position:absolute;left:1.15rem;top:126px;width:46px;height:46px;border-radius:50%;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A1EAF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h13v14H6a2 2 0 0 1-2-2V5z'/%3E%3Cpath d='M17 9h3v8a2 2 0 0 1-2 2'/%3E%3Cpath d='M7 9h7M7 12h7M7 15h4'/%3E%3C/svg%3E") center/22px no-repeat}
.news-home li:has(.news-img)::before{display:none}
.news-home .news-img{display:block;width:calc(100% + 2.8rem);max-width:none;height:150px;object-fit:cover;margin:0 -1.4rem 1.6rem}
.news-home li:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(22,27,46,.12)}
.news-home p{flex:1;font-size:1rem}
.news-home a{font-weight:600;color:var(--ink);text-decoration:none;margin-top:.6rem;align-self:flex-start;border-bottom:2px solid var(--blue)}

/* ---------- actualités : page ---------- */
.news-page{gap:1.5rem;max-width:860px}
.news-page > li{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:1.75rem 1.9rem;border-left:5px solid var(--blue);scroll-margin-top:120px}
.news-page li li{background:none;box-shadow:none;padding:0;border:0;margin-bottom:.35rem}
.news-page ul{margin:.25rem 0 1rem;padding-left:1.2rem}
.news-page h3{font-size:1.25rem;color:var(--blue)}
.news-page .alerte{background:var(--lav);border-left:4px solid var(--blue);padding:.85rem 1.1rem;border-radius:8px}

/* ---------- association ---------- */
.assoc{display:grid;grid-template-columns:1.1fr .9fr;gap:1.25rem;align-items:stretch}
.assoc-photo{border-radius:var(--radius);overflow:hidden;min-height:260px;background:url("../images/capbreton.jpg") center/cover;box-shadow:var(--shadow)}
.assoc .tile p{max-width:62ch}

/* ---------- pages intérieures ---------- */
.pagehead{padding:1rem 0 0}
.pagecard{position:relative;overflow:hidden;background:var(--blue);color:#fff;border-radius:var(--radius);padding:clamp(2rem,5vw,3.25rem);box-shadow:var(--shadow)}
.pagecard h1{color:#fff;max-width:20ch}
.pagecard .lede{color:#D8DBFF;font-size:1.12rem;max-width:56ch;margin:1rem 0 0}
.pagecard .actions{display:flex;flex-wrap:wrap;gap:1rem;margin-top:1.75rem}
.pagecard .deco{position:absolute;right:-30px;bottom:-40px;width:260px;height:260px;opacity:.09;color:#fff}
.facts{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;margin-top:1.25rem}
.facts div{background:#fff;border-radius:var(--radius);padding:1.2rem 1.4rem;box-shadow:var(--shadow)}
.facts dt{color:var(--muted);font-size:.92rem}
.facts dd{margin:.15rem 0 0;font-family:var(--head);font-weight:700;font-size:1.15rem;color:var(--blue)}
.cols{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem}
.cols3{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem}
.cols3 ul,.cols ul{margin:0;padding-left:1.15rem}
.cols3 li,.cols li{margin-bottom:.4rem}
.step-num{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:var(--lav);color:var(--blue);font-family:var(--head);font-weight:700;margin-bottom:.8rem}

/* politique de confidentialité */
.policy{max-width:820px;background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:clamp(1.5rem,4vw,2.75rem)}
.policy h2{font-size:1.4rem;margin:2.5rem 0 1rem}
.policy h2:first-child{margin-top:0}
.policy h3{font-size:1.1rem;color:var(--blue);margin:1.75rem 0 .6rem}
.policy ul{padding-left:1.2rem;margin:0 0 1rem}
.policy li{margin-bottom:.55rem}
.policy .note{background:var(--lav);border-left:4px solid var(--blue);padding:1rem 1.25rem;border-radius:8px;margin:1.5rem 0}
.policy .toc{background:var(--bg);border-radius:10px;padding:1.25rem 1.5rem;margin-bottom:2.25rem}
.policy .toc ol{margin:.5rem 0 0;padding-left:1.2rem}
.tablewrap{overflow-x:auto;margin:1rem 0 1.5rem;border:1px solid var(--line);border-radius:10px}
.policy table{border-collapse:collapse;width:100%;min-width:620px;font-size:.96rem}
.policy th,.policy td{text-align:left;vertical-align:top;padding:.75rem .9rem;border-bottom:1px solid var(--line)}
.policy th{background:var(--lav);color:var(--blue);font-family:var(--head);font-weight:600;font-size:.9rem}
.policy tr:last-child td{border-bottom:0}
.policy .updated{color:var(--muted);font-size:.95rem;margin-top:2rem}

/* ---------- pied de page ---------- */
.site-foot{border-top:1px solid var(--line);padding:2.5rem 0 1.5rem;margin-top:1rem}
.foot-top{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;flex-wrap:wrap;padding-bottom:2rem;border-bottom:1px solid var(--line)}
.foot-top img{height:44px;width:auto;max-width:none}
.foot-top .btns{display:flex;gap:1.1rem;flex-wrap:wrap}
.foot-mid{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr;gap:2rem;padding:2rem 0}
.foot-mid h3{font-size:.95rem;margin-bottom:.7rem}
.foot-nav{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:.55rem 1.5rem}
.foot-nav a{font-family:var(--head);font-weight:600;font-size:.9rem;color:var(--ink);text-decoration:none}
.foot-nav a:hover{color:var(--blue)}
.site-foot address{font-style:normal;font-size:.97rem;color:var(--muted)}
.site-foot address strong{color:var(--ink)}
.foot-small{font-size:.88rem;color:var(--muted)}
.foot-small a{color:var(--ink);font-weight:600}
.legal{margin-top:.5rem;scroll-margin-top:110px}
.legal summary{cursor:pointer;font-weight:600;color:var(--ink);font-size:.95rem}
.legal .body{margin-top:1rem;font-size:.92rem;line-height:1.6;color:var(--muted);background:#fff;border-radius:10px;padding:1.25rem 1.5rem;max-width:90ch}
.legal .body p{margin-bottom:.7rem}
.legal .body strong{color:var(--ink)}
.todo{background:#FFE9A8;color:#4A3A00;padding:0 .3rem;border-radius:2px}

/* ---------- barre d'actions mobile ---------- */
@media (max-width:860px){
  .assoc,.cols,.cols3,.facts{grid-template-columns:1fr}
}
@media (max-width:620px){
  .head-actions{display:none}
}
.callbar{display:none}

/* ---------- apparition au défilement ---------- */
.reveal{opacity:0;transform:translateY(22px)}
.reveal.in{opacity:1;transform:none;transition:opacity .65s ease,transform .65s cubic-bezier(.22,.8,.3,1)}
.hero-tile h1,.pagecard h1,.pagecard .lede{animation:rise .7s cubic-bezier(.22,.8,.3,1) both}
.pagecard .lede{animation-delay:.08s}
@keyframes rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes zoomout{from{transform:scale(1.12)}to{transform:scale(1)}}

/* ---------- adaptations ---------- */
@media (max-width:1100px){
  .site-nav ul{gap:1.1rem}
  .brand img{height:42px}
}
@media (max-width:980px){
  .bento{grid-template-columns:1fr}
  .news-home{grid-template-columns:1fr 1fr}
  .foot-mid{grid-template-columns:1fr 1fr}
}
@media (max-width:1240px){
  .menu-toggle{display:inline-flex}
  .site-nav{position:absolute;left:var(--gut);right:var(--gut);top:calc(100% - .25rem);background:#fff;border-radius:var(--radius);box-shadow:0 14px 30px rgba(22,27,46,.16);padding:.75rem 1.25rem;display:none}
  .site-nav.open{display:block}
  .site-nav ul{flex-direction:column;gap:0}
  .site-nav li a{display:block;padding:.8rem 0;border-bottom:1px solid var(--line)}
  .site-nav li:last-child a{border-bottom:0}
}
@media (max-width:620px){
  .brand img{height:40px}
  body{font-size:1rem}
  .topbar .wrap{justify-content:center;text-align:center}
  .topbar .hide-sm{display:none}
  .bento-right{grid-template-columns:1fr}
  .hero-tile{min-height:0;aspect-ratio:auto;padding:5.5rem 1.4rem 1.5rem}
  .hero-body{gap:1.1rem;width:100%}
  .hero-cta{display:inline-flex;width:calc(100% - .6rem);margin-left:.3rem;justify-content:center;white-space:normal;text-align:center}
  .news-home{grid-template-columns:1fr}
  .foot-mid{grid-template-columns:1fr}
  .foot-nav{grid-template-columns:1fr 1fr}
  section{padding:2.5rem 0}
  .callbar{display:grid;grid-template-columns:1.35fr 1fr;position:fixed;left:0;right:0;bottom:0;z-index:50;box-shadow:0 -4px 16px rgba(22,27,46,.14)}
  .callbar a{display:flex;align-items:center;justify-content:center;gap:.45rem;padding:.95rem .5rem;color:#fff;font-weight:600;text-decoration:none;font-size:1rem}
  .callbar a:first-child{background:var(--blue)}
  .callbar a:last-child{background:var(--olive)}
  .callbar svg{width:1.1em;height:1.1em}
  body{padding-bottom:3.5rem}
}
@media (prefers-reduced-motion:reduce){
  .reveal,.reveal.in{opacity:1;transform:none;transition:none}
  .hero-tile::after,.hero-tile h1,.hero-cta,.pagecard h1,.pagecard .lede{animation:none}
  .news-home li:hover{transform:none}
}
@media print{
  .topbar,.site-head,.callbar,.site-foot .foot-top,.foot-mid{display:none}
  body{background:#fff}
}
