/* ======================================================================
   STYLE.GLOBAL — Base, palette, utilitaires
   ====================================================================== */

/* Palette (modifiable) */
:root{
  --brand:#ff4f81;        /* Rose accueil & actions */
  --brand-strong:#e03e70; /* Hover rose */
  --ink:#1f2937;          /* Gris foncé texte (newsletter) */
  --muted:#6b7280;        /* Gris moyen */
  --line:#e5e7eb;         /* Gris clair bordures */
  --pro:#3b82f6;          /* Bleu "pro" (newsletter/boutons) */
  --pro-weak:#eef5ff;     /* Bleu très clair (cartes KPIs) */
  --warning-bg:#fffbe7;   /* Jaune pâle (boîte indice) */
  --warning-border:#f2e5a2;
  --bg-grad-start:#ffe4ec; /* Fond accueil dégradé */
  --bg-grad-end:#f0f7ff;
}

/* Reset minimal & accessibilité */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
img,video{ max-width:100%; height:auto; display:block; }
a{ color:inherit; }
button{ font:inherit; }
:focus-visible{ outline: 2px solid var(--pro); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce){
  *{ animation:none!important; transition:none!important; }
}

/* Typo globale par défaut (accueil/blog) */
body{
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-grad-start), var(--bg-grad-end));
  color:#444;
}

/* Boutons génériques */
.btn, .btn-secondary, .logout-btn, .btn-link, .btn-hint{
  display:inline-block;
  padding:10px 14px;
  border-radius:8px;
  text-decoration:none;
  cursor:pointer;
  border:1px solid transparent;
  transition:transform .06s ease, background .2s ease, filter .2s ease;
  will-change: transform;
}
.btn:active, .btn-secondary:active, .logout-btn:active, .btn-link:active, .btn-hint:active{
  transform: translateY(1px);
}

/* ======================================================================
   1) ACCUEIL (index.html)
   ====================================================================== */

.welcome-container{
  text-align:center;
  background:#fff;
  padding:30px;
  border-radius:15px;
  box-shadow:0 6px 20px rgba(0,0,0,.1);
  max-width:700px;
  margin:40px auto;
}
.banner{
  width:100%;
  border-radius:10px;
  margin-bottom:20px;
}
h1{
  color:var(--brand);
  margin: 0 0 10px;
  line-height:1.2;
}
p{ margin:0 0 12px; }

.login-box{ margin-top:15px; }
input[type="password"]{
  padding:10px;
  border-radius:5px;
  border:1px solid #ccc;
  width:60%;
  max-width:360px;
  margin-right:8px;
}

button{
  background:var(--brand);
  color:#fff;
  border:none;
}
button:hover{ background:var(--brand-strong); }

.btn-hint{
  margin-left:8px;
  border:1px solid #ddd;
  background:#f7f7fb;
  color:#333;
}
.btn-hint:hover{ background:#efeff6; }

.hint-box{
  margin-top:12px;
  background:var(--warning-bg);
  border:1px solid var(--warning-border);
  color:#5b4e17;
  padding:10px 12px;
  border-radius:8px;
  display:none;
}

.emoji-img{
  width:24px; height:24px; vertical-align:middle;
}

/* ======================================================================
   2) BLOG (blog.html) — galerie, vidéo, navigation
   ====================================================================== */

.container{
  max-width:900px;
  margin:30px auto;
  background:#fff;
  padding:24px;
  border-radius:12px;
  box-shadow:0 6px 20px rgba(0,0,0,.08);
  text-align:center;
}

.gallery{
  display:flex;
  justify-content:center;
  gap:15px;
  flex-wrap:wrap;
  margin:20px 0;
}
.gallery img{
  width:150px;
  border-radius:10px;
  box-shadow:0 4px 10px rgba(0,0,0,.1);
  transition: transform .2s ease;
}
.gallery img:hover{ transform: scale(1.05); }

.video{
  width:300px;          /* ← ajuste ici (ex: 240 / 360 / 480) */
  border-radius:10px;
  margin:20px auto;
  box-shadow:0 4px 15px rgba(0,0,0,.15);
}

#video-lock{ margin:20px 0; }
#video-lock input{
  padding:8px; width:80px; text-align:center;
  font-size:1.1rem; margin-right:10px; border:1px solid #ccc; border-radius:6px;
}
#video-lock button{
  padding:8px 15px; background:var(--brand); color:#fff;
  border:none; border-radius:6px; cursor:pointer;
}
#video-lock button:hover{ background:var(--brand-strong); }

.links{ margin:20px 0; }
.btn-link{
  background:var(--pro);
  color:#fff;
}
.btn-link:hover{ background:#2563eb; }

.logout{ margin-top:20px; }
.logout-btn{
  background:var(--brand);
  color:#fff;
  padding:10px 20px;
  border-radius:8px;
}
.logout-btn:hover{ background:var(--brand-strong); }

/* ======================================================================
   3) NEWSLETTER (newsletter.html) — style “pro”
   ====================================================================== */

/* Typo & fond plus neutres à l’intérieur du rapport */
.report{
  --report-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans";
  font-family: var(--report-font);
  color:var(--ink);
  background:#fff;
  max-width:980px;
  margin:32px auto;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 6px 24px rgba(0,0,0,.06);
  padding:28px 28px 20px;
}

.report-header{
  display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-bottom:12px;
}
.brand{ display:flex; gap:12px; align-items:center; }
.brand-logo{
  width:36px; height:36px; object-fit:contain;
  border-radius:6px; border:1px solid var(--line); background:#fff;
}
.brand-meta h1{ font-size:1.35rem; margin:0; }
.subtitle{ margin:2px 0 0; color:var(--muted); font-size:.9rem; }
.header-actions{ display:flex; gap:8px; }

.btn{ background:var(--pro); color:#fff; }
.btn:hover{ filter:brightness(.95); }
.btn-secondary{
  background:#f3f4f6; color:var(--ink); border-color:#e5e7eb;
}
.btn-secondary:hover{ background:#e9ecef; }

.toc{
  border:1px solid var(--line); border-radius:12px;
  padding:12px 14px; background:#fafafa; margin:8px 0 18px;
}
.toc strong{
  display:block; margin-bottom:6px; color:var(--muted);
  text-transform:uppercase; letter-spacing:.06em; font-size:.8rem;
}
.toc ol{ margin:0 0 0 18px; padding:0; }
.toc a{ color:var(--pro); text-decoration:none; }
.toc a:hover{ text-decoration:underline; }

.section{ margin:18px 0 20px; }
.section h2{
  font-size:1.15rem; margin:0 0 10px;
  padding-bottom:6px; border-bottom:1px solid var(--line);
}

/* KPIs */
.kpis{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:12px;
}
.kpi{
  border:1px solid var(--line); border-radius:12px; padding:12px;
  background:var(--pro-weak);
}
.kpi-title{ color:var(--muted); font-size:.9rem; }
.kpi-value{ font-size:1.6rem; font-weight:700; margin:6px 0 2px; }
.kpi-foot{ color:var(--muted); font-size:.85rem; }

/* Points (texte + 2–3 photos) */
.point{
  border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:12px;
}
.point-head h3{ margin:0 0 4px; font-size:1.05rem; }
.point-meta{ color:var(--muted); margin:0 0 10px; font-size:.9rem; }
.point-body{
  display:grid; grid-template-columns: 1.1fr 1.4fr; gap:14px;
}
@media (max-width:820px){ .point-body{ grid-template-columns: 1fr; } }
.bullets{ margin:0 0 0 18px; }
.bullets li{ margin:6px 0; }

.point-gallery{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap:10px;
}
.point-gallery figure{
  margin:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#fff;
}
.point-gallery img{
  width:100%; height:140px; object-fit:cover; display:block;
}
.point-gallery figcaption{
  font-size:.85rem; color:var(--muted); padding:6px 8px; text-align:center;
}

/* Risques */
.risk-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:12px; }
.risk{ border:1px solid var(--line); border-radius:12px; padding:12px; background:#fff; }
.risk-title{ font-weight:600; margin-bottom:4px; }
.risk-level{
  display:inline-block; padding:2px 8px; border-radius:999px; font-size:.8rem; margin:4px 0 8px; border:1px solid var(--line);
}
.risk-level.low{ background:#eff6ff; color:#1e40af; }   /* bleu pâle */
.risk-level.med{ background:#fff7ed; color:#9a3412; }   /* orange pâle */
.risk-plan{ color:var(--muted); }

.report-footer{
  display:flex; gap:8px; justify-content:flex-end; margin-top:10px;
}

/* Impression (PDF propre) */
@media print{
  body{ background:#fff !important; }
  .report{
    box-shadow:none; border:none; margin:0; border-radius:0; padding:0;
  }
  .header-actions{ display:none !important; }
}
