:root{
  --navy:#2C4D6E; --navy-dark:#1B3550; --navy-darker:#14293F;
  --ink:#0F1E2E; --ink-2:#24364A; --muted:#51627A; --muted-2:#6B7A8F;
  --ground:#F5F7FA; --line:#E3E8EF; --line-2:#EEF2F6; --soft:#F1F4F8;
  --green-bg:#E3F5EF; --green-fg:#136B53;
  --blue-bg:#E6EEF7; --blue-fg:#24425F;
  --grey-bg:#F1F2F4; --grey-fg:#4A5565;
  --orange-bg:#FFF1E6; --orange-fg:#8A4B0F;
  --wrap:1360px; --pad:clamp(20px,4vw,48px);
  --r-card:20px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--ground);color:var(--ink);font-family:"Open Sans",-apple-system,"Segoe UI",Roboto,Arial,sans-serif;-webkit-font-smoothing:antialiased;line-height:1.5}
a{color:var(--navy)} a:hover{color:var(--navy-dark)}
img{display:block}
button{font:inherit}
.wrap{max-width:var(--wrap);margin:0 auto;padding-left:var(--pad);padding-right:var(--pad)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:3px solid #7FB3E0;outline-offset:2px;border-radius:6px}

/* En-tête */
.top{background:var(--navy)}
.top .wrap{display:flex;flex-wrap:wrap;align-items:center;gap:16px 32px;padding-top:18px;padding-bottom:18px}
.top .brand img{height:44px;width:auto}
.nav{display:flex;flex-wrap:wrap;gap:8px 28px;font-size:15px;font-weight:500;flex:1 1 auto}
.nav a{color:#E6EEF6;text-decoration:none} .nav a:hover,.nav a[aria-current]{color:#fff}
.partners{display:flex;align-items:center;gap:24px}
.partners img.aphp{height:28px;width:auto} .partners img.upc{height:34px;width:auto}

/* Recherche */
.search{display:flex;align-items:center;gap:12px;background:#fff;border-radius:999px;padding:8px 8px 8px 24px;box-shadow:0 18px 40px rgba(10,25,45,.25);width:100%}
.search svg{flex:none}
.search input{flex:1 1 auto;min-width:0;border:0;background:transparent;font:inherit;font-size:18px;color:var(--ink);height:48px}
.search input:focus{outline:none}
.search:focus-within{box-shadow:0 0 0 4px rgba(127,179,224,.55),0 18px 40px rgba(10,25,45,.25)}
.btn{display:inline-flex;align-items:center;justify-content:center;height:52px;padding:0 28px;border:0;border-radius:999px;background:var(--navy-dark);color:#fff;font-weight:600;font-size:16px;cursor:pointer;text-decoration:none;transition:background .2s}
.btn:hover{background:var(--navy-darker);color:#fff}

/* Accueil */
.hero{background:var(--navy);color:#fff}
.hero .wrap{display:flex;flex-direction:column;align-items:center;text-align:center;gap:24px;padding-top:clamp(56px,8vw,112px);padding-bottom:clamp(64px,8vw,120px)}
.eyebrow{margin:0;font-size:14px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:#9FC9E8}
.hero h1{margin:0;font-size:clamp(40px,5.6vw,72px);line-height:1.04;font-weight:800;letter-spacing:-.01em;max-width:900px}
.hero p.lead{margin:0;font-size:clamp(17px,1.6vw,21px);color:#D6E2EE;max-width:720px}
.hero form{width:100%;max-width:760px;margin-top:16px}
.chips{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;max-width:760px}
.chips span{font-size:14px;color:#B9CCDD;align-self:center;margin-right:4px}
.chip{padding:8px 16px;border-radius:999px;background:rgba(255,255,255,.12);color:#fff;font-size:14px;font-weight:500;text-decoration:none;transition:background .2s}
.chip:hover{background:rgba(255,255,255,.22);color:#fff}
.stats{background:#fff;border-bottom:1px solid var(--line)}
.stats .wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:24px;padding-top:36px;padding-bottom:36px}
.stat b{display:block;font-size:clamp(30px,3vw,40px);font-weight:800;letter-spacing:-.005em;color:var(--navy);line-height:1.15}
.stat span{font-size:15px;color:var(--muted)}
.about .wrap{display:flex;flex-direction:column;gap:36px;padding-top:clamp(48px,6vw,88px);padding-bottom:clamp(48px,6vw,88px)}
.h2{margin:0;font-size:clamp(28px,3vw,40px);font-weight:700;letter-spacing:-.005em}
.grid3{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px}
.tile{background:#fff;border:1px solid var(--line);border-radius:var(--r-card);padding:32px;display:flex;flex-direction:column;gap:14px;transition:transform .25s,box-shadow .25s}
.tile:hover{transform:translateY(-3px);box-shadow:0 14px 34px rgba(27,53,80,.10)}
.tile .ic{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center}
.tile h3{margin:0;font-size:20px;font-weight:700;letter-spacing:-.01em}
.tile p{margin:0;font-size:16px;line-height:1.6;color:#3A4A5E}
.more{font-weight:600;text-decoration:none;align-self:flex-start}

/* Résultats */
.band{background:var(--navy);padding:8px 0 28px}
.band form{max-width:880px}
.band .search{padding:6px 6px 6px 22px;box-shadow:0 12px 30px rgba(10,25,45,.22)}
.band .search input{font-size:17px;height:44px}
.band .btn{height:48px;padding:0 24px;font-size:15px}
.results .wrap{display:flex;flex-direction:column;gap:24px;padding-top:40px;padding-bottom:80px}
.rhead{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px}
.rhead h1{margin:0;font-size:clamp(28px,3vw,40px);font-weight:800;letter-spacing:-.01em}
.rhead p{margin:6px 0 0;font-size:15px;color:var(--muted)}
.tools{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.seg{display:inline-flex;background:#E8EDF3;border-radius:12px;padding:4px;gap:4px}
.seg button{height:36px;padding:0 16px;border:0;border-radius:9px;font-size:14px;font-weight:600;cursor:pointer;background:transparent;color:var(--ink)}
.seg button[aria-pressed="true"]{background:#fff;box-shadow:0 1px 3px rgba(15,30,46,.12)}
.select{height:44px;border:1px solid #D5DEE8;border-radius:12px;padding:0 36px 0 14px;font:inherit;font-size:14px;font-weight:500;color:var(--ink);background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2351627A' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;appearance:none;cursor:pointer;width:280px;max-width:100%;text-overflow:ellipsis}
.pills{display:flex;flex-wrap:wrap;gap:10px}
.pill{height:40px;padding:0 16px;border-radius:999px;border:1px solid #D5DEE8;background:#fff;color:var(--blue-fg);font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:background .2s,color .2s,border-color .2s}
.pill:hover{border-color:var(--navy)}
.pill[aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:#fff}
.pill small{font-size:14px;font-weight:500;opacity:.75}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,400px),1fr));gap:20px}
.card{position:relative;background:#fff;border:1px solid var(--line);border-radius:var(--r-card);padding:26px 28px;display:flex;flex-direction:column;gap:14px;transition:transform .25s,box-shadow .25s,border-color .25s}
.card:hover{transform:translateY(-3px);box-shadow:0 16px 36px rgba(27,53,80,.10);border-color:#C9D6E4}
.tags{display:flex;flex-wrap:wrap;gap:8px}
.tag{padding:4px 10px;border-radius:999px;font-size:12.5px;font-weight:500;background:var(--soft);color:#3A4A5E;display:inline-flex;align-items:center;gap:5px}
.tag.st{font-weight:600}
.st-pub{background:var(--green-bg);color:var(--green-fg)}
.st-lan{background:var(--blue-bg);color:var(--blue-fg)}
.st-con{background:var(--grey-bg);color:var(--grey-fg)}
.st-pas{background:var(--orange-bg);color:var(--orange-fg)}
.card h2{margin:0;font-size:19px;line-height:1.35;font-weight:700;letter-spacing:-.01em}
.card h2 a{color:var(--ink);text-decoration:none;background:linear-gradient(var(--navy),var(--navy)) no-repeat 0 100%/0 2px;transition:background-size .3s,color .2s}
.card h2 a::after{content:"";position:absolute;inset:0;border-radius:var(--r-card)}
.card:hover h2 a,.card h2 a:focus-visible{color:var(--navy);background-size:100% 2px}
.card p{margin:0;font-size:15px;line-height:1.6;color:#3A4A5E;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.meta{margin-top:auto;padding-top:14px;border-top:1px solid var(--line-2);display:flex;flex-direction:column;gap:6px;font-size:13.5px;color:var(--muted)}
.meta .who{display:flex;gap:8px;align-items:flex-start}
.meta .who svg{flex:none;margin-top:2px}
.meta .row{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.meta .mono{font-size:12.5px;color:var(--muted-2)}
.empty{background:#fff;border:1px solid var(--line);border-radius:var(--r-card);padding:48px;text-align:center;color:var(--muted)}

/* Fiche */
.fhead{background:#fff;border-bottom:1px solid var(--line)}
.fhead .wrap{display:flex;flex-direction:column;gap:18px;padding-top:32px;padding-bottom:44px}
.crumb{display:flex;flex-wrap:wrap;gap:8px;font-size:14px;color:var(--muted)}
.crumb a{color:var(--muted);text-decoration:none} .crumb a:hover{color:var(--navy)}
.fhead h1{margin:0;font-size:clamp(32px,4.2vw,56px);line-height:1.08;font-weight:800;letter-spacing:-.01em;max-width:1000px}
.fhead .by{margin:0;font-size:17px;color:var(--muted)}
.fbody .wrap{display:flex;flex-wrap:wrap;align-items:flex-start;gap:28px;padding-top:40px;padding-bottom:80px}
.fmain{flex:999 1 560px;min-width:0;display:flex;flex-direction:column;gap:24px}
.faside{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:16px}
.facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.fact{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px 24px;display:flex;flex-direction:column;gap:6px}
.label{font-size:12.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-2)}
.fact b{font-size:17px;font-weight:600}
.fact .mono{font-size:15px;white-space:nowrap}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--r-card);padding:28px;display:flex;flex-direction:column;gap:20px}
.panel h2{margin:0;font-size:20px;font-weight:700;letter-spacing:-.01em}
.timeline{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px}
.timeline li{display:flex;flex-direction:column;gap:8px}
.timeline .bar{display:flex;align-items:center;gap:10px}
.timeline .dot{width:14px;height:14px;border-radius:50%;background:var(--navy);flex:none}
.timeline .line{height:2px;background:var(--navy);flex:1 1 auto}
.timeline li:last-child .line{display:none}
.timeline li.done .dot{background:#1F8A6E}
.timeline span{font-size:14px;color:var(--muted)}
.timeline b{font-size:17px;font-weight:600}
.abstract{margin:0;font-size:17px;line-height:1.7;color:var(--ink-2);max-width:820px}
.docs{background:#fff;border:1px solid var(--line);border-radius:var(--r-card);padding:10px;display:flex;flex-direction:column}
.docs h2{margin:0;padding:16px 16px 8px}
.doc{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:14px;text-decoration:none;color:var(--ink);transition:background .2s}
.doc:hover{background:var(--soft);color:var(--ink)}
.doc .ic{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:none}
.doc .tx{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-width:0}
.doc .tx b{font-size:16px;font-weight:600}
.doc .tx small{font-size:13.5px;color:var(--muted-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.back{font-size:15px;font-weight:600;text-decoration:none;padding:6px 4px}
.note{font-size:13.5px;color:var(--muted-2);margin:0}

/* Pied de page */
.foot{background:var(--navy-dark);color:#D6E2EE;margin-top:auto}
.foot .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:24px;padding-top:40px;padding-bottom:40px}
.foot .logos{display:flex;flex-wrap:wrap;align-items:center;gap:28px}
.foot .logos .c{height:36px;width:auto} .foot .logos .a{height:24px;width:auto} .foot .logos .u{height:30px;width:auto}
.foot nav{display:flex;flex-wrap:wrap;gap:8px 28px;font-size:14px}
.foot a{color:#D6E2EE;text-decoration:none} .foot a:hover{color:#fff}

.page{min-height:100vh;display:flex;flex-direction:column}
[hidden]{display:none!important}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}html{scroll-behavior:auto}}
@media (max-width:600px){
  .search{padding-left:16px}
  .btn{padding:0 18px}
  .partners{width:100%}
}

/* Ajouts version PHP */
.skip{position:absolute;left:-9999px;top:8px;background:#fff;color:var(--ink);padding:10px 16px;border-radius:10px;z-index:10}
.skip:focus{left:12px}
.content{flex:1 0 auto}
.chip-all{background:transparent;border:1px solid rgba(255,255,255,.35)}
.tools-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}
.band .select{height:44px;border-color:transparent}
.btn-light{background:#fff;color:var(--navy-dark);height:44px}
.seg a{display:inline-flex;align-items:center;height:36px;padding:0 16px;border-radius:9px;font-size:14px;font-weight:600;color:var(--ink);text-decoration:none}
.seg a[aria-current]{background:#fff;box-shadow:0 1px 3px rgba(15,30,46,.12)}
.pill{text-decoration:none}
.pill[aria-current]{background:var(--navy);border-color:var(--navy);color:#fff}
.pill[aria-current]:hover{color:#fff}
a.tag{text-decoration:none} a.tag:hover{background:#E4EAF1;color:var(--ink)}
.flead{margin:0;font-size:clamp(17px,1.5vw,20px);line-height:1.55;color:var(--ink-2);max-width:900px}
.panel-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.abstract{margin:0 0 14px}
.abstract:last-child{margin-bottom:0}
.timeline li.pending .dot{background:#fff;border:2px solid #A9B6C6}
.timeline li.pending b{color:var(--muted)}
.ic-blue{background:var(--blue-bg)} .ic-green{background:var(--green-bg)} .ic-orange{background:var(--orange-bg)} .ic-grey{background:var(--grey-bg)}
.doc-off{cursor:default}
.doc-off:hover{background:transparent}
.docs .note{padding:8px 16px 16px}
.empty h1{margin-bottom:12px}
.empty p{margin:0}
.empty-wrap{padding-top:48px;padding-bottom:80px}
.fact b.mono{font-size:15px;white-space:nowrap}

/* Titres en Raleway (comme compare.aphp.fr), texte courant en Open Sans */
h1,h2,h3,.stat b,.btn{font-family:Raleway,"Open Sans",Arial,sans-serif}
.stats .wrap{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}

/* Fiche : bloc d'informations resserré façon PubMed */
.pm{display:flex;flex-direction:column;gap:6px;max-width:1000px}
.pm p{margin:0}
.pm-inv{font-size:17px;font-weight:600;color:var(--navy)}
.pm-org{font-size:15px;color:var(--muted)}
.pm-ids{display:flex;flex-wrap:wrap;align-items:center;gap:4px 20px;font-size:14.5px;color:var(--ink-2)}
.pm-ids .mono{font-size:14px}
.pm-ids .tag{padding:2px 9px;font-size:12.5px}
.pm-ids:last-child{color:var(--muted)}
.fhead .wrap{gap:14px}

/* Résultats : onglets Études / Cohortes */
.tabs{display:flex;gap:28px;border-bottom:1px solid var(--line)}
.tabs a{display:inline-flex;align-items:center;gap:8px;padding:10px 2px 12px;margin-bottom:-1px;font-family:Raleway,"Open Sans",Arial,sans-serif;font-size:18px;font-weight:700;color:var(--muted);text-decoration:none;border-bottom:3px solid transparent}
.tabs a:hover{color:var(--ink)}
.tabs a[aria-current]{color:var(--navy);border-bottom-color:var(--navy)}
.tabs small{font-family:"Open Sans",Arial,sans-serif;font-size:13px;font-weight:600;background:var(--soft);color:var(--muted);border-radius:999px;padding:2px 8px}
.tabs a[aria-current] small{background:var(--blue-bg);color:var(--navy)}

/* Fiche : le titre prend toute la largeur, taille réduite pour tenir sur 2-3 lignes */
.fhead h1{max-width:none;font-size:clamp(26px,2.6vw,38px);line-height:1.2;text-wrap:pretty}
.pm{max-width:none}

/* Pied de page : liens seuls, centrés (logos retirés, déjà dans l'en-tête) */
.foot .wrap{justify-content:center}

/* Mentions légales : texte long dans un seul panneau, largeur de lecture confortable */
.legal{display:block;gap:0}
.legal h2{font-size:20px;margin:28px 0 10px}
.legal h2:first-child{margin-top:0}
.legal p{margin:0 0 12px;font-size:16px;line-height:1.7;color:var(--ink-2)}
.legal a{word-break:break-word}
