/*
Theme Name: MSpharma Pro
Theme URI: https://mspharma.fr/
Author: MSpharma
Description: Thème MSpharma
Version: 2.2.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: mspharma-pro
*/

:root{
  --msp-green:#2E7D32;
  --msp-red:#C62828;
  --ink:#0b1220;
  --muted:#5b6b84;
  --line:rgba(11,18,32,.10);
  --soft:rgba(11,18,32,.06);
  --radius:18px;
  --shadow: 0 18px 50px rgba(2,6,23,.10);
  --shadow-soft: 0 12px 32px rgba(2,6,23,.08);
  --max: 1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial;
  color:var(--ink);
  background:
    radial-gradient(980px 560px at 14% 8%, rgba(46,125,50,.16), transparent 60%),
    radial-gradient(980px 560px at 88% 14%, rgba(198,40,40,.13), transparent 60%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

a{color:inherit}
img{max-width:100%;height:auto}
.container{max-width:var(--max);margin:0 auto;padding:26px 16px}
.section{padding:26px 0}
.card{
  background:rgba(255,255,255,.92);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  padding:22px;
}
.card.tight{padding:16px}
.muted{color:var(--muted)}
hr{border:0;border-top:1px solid var(--line);margin:18px 0}
code{background:rgba(11,18,32,.06);padding:2px 6px;border-radius:8px}
h1,h2,h3{letter-spacing:-.35px}
h1{font-size:46px;line-height:1.05;margin:0}
h2{font-size:30px;margin:0 0 10px}
h3{font-size:16px;margin:0 0 6px}
p{line-height:1.75;margin:0 0 12px}

.pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:7px 11px;border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.80);
  color:var(--muted);font-weight:900;font-size:12px;
}
.dot{width:8px;height:8px;border-radius:999px;background:var(--msp-green)}
.dot.red{background:var(--msp-red)}

/* Header */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(255,255,255,.68);
  backdrop-filter:saturate(170%) blur(12px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:var(--max);margin:0 auto;
  padding:12px 16px;
  display:flex;align-items:center;justify-content:space-between;gap:14px;
}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.brand-mark{
  width:42px;height:42px;border-radius:14px;
  display:grid;place-items:center;
  background:rgba(46,125,50,.08);
  border:1px solid rgba(46,125,50,.18);
}
.brand-name{font-weight:900;font-size:18px}
.brand-name .g{color:var(--msp-green)}
.brand-name .r{color:var(--msp-red)}

.nav{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.nav ul{margin:0;padding:0;list-style:none;display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.nav li{margin:0}
.nav a{color:var(--muted);text-decoration:none;font-weight:900}
.nav a:hover{color:var(--ink)}
.nav .cta{margin-left:2px}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 14px;border-radius:14px;
  border:1px solid transparent;
  text-decoration:none;font-weight:950;
}
.btn.primary{
  color:#fff;
  background:linear-gradient(135deg, rgba(46,125,50,1), rgba(46,125,50,.86));
  box-shadow: 0 12px 22px rgba(46,125,50,.18);
}
.btn.primary:hover{filter:brightness(1.03)}
.btn.secondary{
  color:#fff;
  background:linear-gradient(135deg, rgba(198,40,40,1), rgba(198,40,40,.86));
  box-shadow: 0 12px 22px rgba(198,40,40,.16);
}
.btn.secondary:hover{filter:brightness(1.03)}
.btn.ghost{
  background:rgba(255,255,255,.82);
  border-color:var(--line);
}

/* Badge annuaire : Membre actif du réseau */
.msp-badge-active{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(46,125,50,.22);
  background:rgba(46,125,50,.08);
  color:var(--msp-green);
  font-weight:950;
  font-size:12px;
  white-space:nowrap;
}

/* Layout helpers */
.grid{display:grid;gap:14px}
@media(min-width:980px){
  .grid.cols-2{grid-template-columns:repeat(2,1fr)}
  .grid.cols-3{grid-template-columns:repeat(3,1fr)}
  .grid.cols-4{grid-template-columns:repeat(4,1fr)}
}
.feature{
  padding:16px;border-radius:16px;border:1px solid var(--line);
  background:rgba(255,255,255,.90);
}
.icon{
  width:34px;height:34px;border-radius:14px;
  display:grid;place-items:center;
  background:rgba(11,18,32,.04);
  border:1px solid var(--line);
  margin-bottom:10px;
}
.callout{
  padding:14px 16px;border-radius:16px;border:1px solid rgba(46,125,50,.22);
  background:rgba(46,125,50,.06)
}
.callout.red{border-color:rgba(198,40,40,.22);background:rgba(198,40,40,.05)}
.callout b{font-weight:950}

/* Steps */
.steps{counter-reset:step}
.step{
  position:relative;
  padding:16px;border-radius:16px;border:1px solid var(--line);
  background:#fff;
}
.step:before{
  counter-increment:step;content:counter(step);
  position:absolute;top:12px;right:12px;
  width:30px;height:30px;border-radius:999px;
  display:grid;place-items:center;
  background:rgba(46,125,50,.10);
  border:1px solid rgba(46,125,50,.22);
  color:var(--msp-green);
  font-weight:950;
}
.step p{margin:0;color:var(--muted);line-height:1.55}

/* Forms */
input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.94);
  outline:none;
}
input:focus, select:focus, textarea:focus{
  box-shadow:0 0 0 4px rgba(46,125,50,.12);
  border-color:rgba(46,125,50,.40);
}
button, input[type="submit"]{
  cursor:pointer;
  border-radius:14px;
  border:0;
  padding:12px 14px;
  font-weight:950;
}

/* Tables */
table{width:100%;border-collapse:collapse}
th,td{padding:10px 8px;border-bottom:1px solid var(--soft);text-align:left}
th{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.06em}

/* Content */
.content-area{padding:14px 0 34px}
.entry-title{margin:0 0 10px}
.entry-content{line-height:1.8;color:#0b1220}
.entry-content p{margin:0 0 12px}

/* Footer */
.site-footer{border-top:1px solid var(--line);background:rgba(255,255,255,.70)}
.footer-inner{
  max-width:var(--max);margin:0 auto;padding:20px 16px;color:var(--muted);
  display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap
}
.footer-links{display:flex;gap:12px;flex-wrap:wrap}
.footer-links a{color:var(--muted);text-decoration:none;font-weight:900}
.footer-links a:hover{color:var(--ink)}

/* Hero block */
.hero-block{
  padding:26px;border-radius:22px;border:1px solid var(--line);
  background:
    radial-gradient(700px 360px at 18% 8%, rgba(46,125,50,.16), transparent 60%),
    radial-gradient(700px 360px at 86% 16%, rgba(198,40,40,.13), transparent 60%),
    rgba(255,255,255,.92);
  box-shadow:var(--shadow-soft);
}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.stats{display:grid;gap:10px;margin-top:14px}
@media(min-width:980px){.stats{grid-template-columns:repeat(3,1fr)}}
.stat{
  padding:14px;border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.85);
}
.stat b{font-size:22px;letter-spacing:-.4px}
.stat span{display:block;color:var(--muted);margin-top:4px}

/* Espace pharmacies : bloc connexion */
.msp-espace-login{
  background:rgba(255,255,255,.92);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
}
.msp-espace-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.msp-espace-actions{display:flex;gap:10px;flex-wrap:wrap}
.msp-espace-status{margin-top:12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.msp-alert{padding:10px 12px;border-radius:14px;border:1px solid var(--line);background:rgba(255,255,255,.85);margin-bottom:12px}
.msp-alert-info{border-color:rgba(46,125,50,.22);background:rgba(46,125,50,.05)}

.msp-badge-inactive{
  display:inline-flex;align-items:center;
  padding:3px 8px;border-radius:999px;
  border:1px solid rgba(198,40,40,.22);
  background:rgba(198,40,40,.06);
  color:var(--msp-red);
  font-weight:950;font-size:12px;white-space:nowrap;
}

#msp-loginform p{margin:0 0 10px}
#msp-loginform label{display:block;margin:0 0 6px;color:var(--muted);font-weight:950;font-size:13px}
#msp-loginform input[type="text"],
#msp-loginform input[type="password"]{width:100%}
#msp-loginform input[type="submit"]{
  width:auto;
  color:#fff;
  background:linear-gradient(135deg, rgba(46,125,50,1), rgba(46,125,50,.86));
  box-shadow: 0 12px 22px rgba(46,125,50,.18);
}

.msp-login-links{margin-top:10px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:var(--muted);font-weight:900;font-size:13px}
.msp-login-links a{color:var(--muted);text-decoration:underline}
.msp-login-links a:hover{color:var(--ink)}
.msp-login-links .dot-sep{opacity:.65}
