/*
  Style sheet for the Olami Montpellier donation platform.
  Palette bordeaux / design propre.
*/

/* ======================= THEME ======================= */
:root{
  --primary-color:#b71c45;
  --primary-dark:#951637;
  --secondary-color:#f7f7f9;
  --text-color:#243044;
  --card-bg:#ffffff;
  --shadow:0 8px 28px rgba(36,48,68,0.07);
  --border-radius:16px;
  --border-soft:#e4e7ee;
  --muted-color:#596579;
  --surface-subtle:#fafafb;
  --focus-color:#751330;
  --match-1: #6D5BFF;
  --match-2: #4B3FF0;
}

*, *::before, *::after { box-sizing: border-box; }

/* ======================= BASE ======================= */
body{
  margin:0;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  background:var(--secondary-color);
  color:var(--text-color);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-wrap:break-word;
}
a{ color:var(--primary-color); text-decoration:none; }

/* ======================= HEADER ======================= */
header{
  background:linear-gradient(90deg,var(--primary-color) 0%,var(--primary-dark) 100%);
  padding:20px; display:flex; justify-content:space-between; align-items:center; color:#fff; box-shadow:var(--shadow);
}
header img.logo{ height:60px; object-fit:contain; }
nav a{ margin-left:15px; color:#fff; font-weight:600; position:relative; }
nav a::after{ content:''; position:absolute; left:0; bottom:-2px; width:0; height:2px; background:#fff; transition:width .3s; }
nav a:hover::after{ width:100%; }

/* ======================= CONTAINER ======================= */
.container{ max-width:1200px; margin:0 auto; padding:20px; }

/* ======================= LISTE CAMPAGNES ======================= */
.campaigns-grid{ display:flex; flex-wrap:wrap; gap:20px; }
.campaign-card{
  background:var(--card-bg); border-radius:var(--border-radius); box-shadow:var(--shadow);
  padding:24px; width:calc(50% - 20px); box-sizing:border-box; display:flex; flex-direction:column; justify-content:space-between;
  transition:transform .2s;
}
.campaign-card:hover{ transform:translateY(-4px); box-shadow:0 8px 20px rgba(0,0,0,.12); }
.campaign-card h3{ margin-top:0; color:var(--primary-color); }

.button{
  display:inline-block; background:var(--primary-color); color:#fff; padding:12px 18px; border-radius:8px; font-weight:600; text-align:center; cursor:pointer;
  transition:background-color .3s ease, transform .2s;
}
.button:hover{ background:var(--primary-dark); transform:translateY(-2px); }

/* ======================= PAGE CAMPAGNE - HEADER ======================= */
.campaign-header{ margin-top:20px; text-align:center; }
#page-heading{
  font-size:40px; font-weight:700; color:#fff; margin:50px auto 20px; padding:20px 30px;
  background:linear-gradient(135deg,#b4003a,#90002c); border-radius:10px; text-transform:uppercase; letter-spacing:1.5px;
  box-shadow:0 4px 8px rgba(0,0,0,.15); width:fit-content; transition:all .3s ease;
}
#page-heading:hover{
  background:#fff; color:transparent; background-image:linear-gradient(135deg,#b4003a,#90002c);
  -webkit-background-clip:text; background-clip:text;
}
.campaign-timer{ margin:10px 0; font-weight:600; font-size:1.1rem; color:var(--primary-color); }

/* Deadline */
.deadline-banner{ display:flex; align-items:center; gap:16px; font-weight:600; color:#1f2937; }
.deadline-text-before,.deadline-text-after{ font-size:18px; }
.deadline-circle{
  --pct:0; --ring-bg:#e5e7eb; --ring-fg:#b71c45;
  width:84px; height:84px; border-radius:50%;
  background:conic-gradient(var(--ring-fg) calc(var(--pct)*1%), var(--ring-bg) 0);
  display:grid; place-items:center; padding:8px;
}
.deadline-circle-inner{ width:100%; height:100%; border-radius:50%; background:#fff; display:grid; place-items:center; }
.deadline-days{ font-size:26px; font-weight:800; line-height:1; color:#111827; }
.deadline-day-unit{ font-size:14px; margin-left:4px; color:#6b7280; }
@media (max-width:640px){
  .deadline-text-before,.deadline-text-after{ font-size:16px; }
  .deadline-circle{ width:70px; height:70px; }
  .deadline-days{ font-size:22px; }
}

/* KPI ring */
.kpi-days-wrap{ display:inline-flex; align-items:center; gap:10px; }
.time-ring{
  --pct:0; --ring-bg:#e5e7eb; --ring-fg:#b71c45;
  width:44px; height:44px; background:conic-gradient(var(--ring-fg) calc(var(--pct)*1%), var(--ring-bg) 0);
  border-radius:50%; padding:6px; display:grid; place-items:center;
}
.time-ring-inner{ width:100%; height:100%; background:#fff; border-radius:50%; display:grid; place-items:center; }
.time-ring-inner [data-days]{ font-size:14px; font-weight:800; color:#111827; }

/* ======================= KPI / OBJECTIFS ======================= */
.goals-container{ margin:20px 0; }
.kpi-goal{ background:#f3f4f6; border-radius:12px; padding:18px 22px; position:relative; margin-bottom:18px; }
.kpi-goal::before,.kpi-goal::after{ content:""; position:absolute; left:14px; right:14px; height:1px; background:#e5e7eb; }
.kpi-goal::before{ top:10px; } .kpi-goal::after{ bottom:54px; }
.kpi-row{ display:grid; grid-template-columns:1fr 2fr 1fr; align-items:center; gap:24px; padding:14px 0 22px 0; }
.kpi-col{ display:flex; flex-direction:column; align-items:center; text-align:center; }
.kpi-col + .kpi-col{ border-left:1px solid #e5e7eb; }
.kpi-percent{ display:none; }
.kpi-title{ font-size:20px; font-weight:700; color:#374151; margin-bottom:6px; }
.kpi-main{ font-size:42px; font-weight:800; color:#1f2937; line-height:1.1; }
.kpi-sub{ margin-top:6px; font-size:18px; color:#4b5563; }
.kpi-donors{ font-size:44px; font-weight:800; color:#1f2937; line-height:1; }
.kpi-donors-label{ margin-top:6px; font-size:18px; color:#4b5563; }
.kpi-progress{ margin-top:18px; width:100%; height:14px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
.kpi-fill{ height:100%; background:#b71c45; width:0%; border-radius:999px; transition:width .5s ease; }
@media (max-width:860px){
  .kpi-row{ grid-template-columns:1fr; gap:12px; }
  .kpi-col + .kpi-col{ border-left:none; }
  .kpi-goal::after{ bottom:60px; }
}

/* ======================= BADGES IMPACT ======================= */
.impact-badges-bar{ display:flex; flex-wrap:wrap; gap:16px; margin:20px 0 30px; justify-content:center; }
.impact-badge{
  background:#fff; border:1px solid #e5e7eb; border-radius:12px; box-shadow:0 6px 16px rgba(17,24,39,.06);
  padding:12px 16px; min-width:110px; max-width:140px; cursor:pointer; text-align:center;
  transition:box-shadow .15s ease, transform .1s ease; display:flex; flex-direction:column; align-items:center;
}
.impact-badge:hover{ box-shadow:0 10px 24px rgba(17,24,39,.12); transform:translateY(-2px); }
.impact-badge-icon{
  width:70px; height:70px; border-radius:50%; background:#f3f4f6; border:2px solid #e5e7eb; overflow:hidden;
  display:flex; align-items:center; justify-content:center; margin-bottom:8px;
}
.impact-badge-icon img{ width:100%; height:100%; object-fit:cover; border-radius:50%; }
.impact-badge-fallback{ font-weight:700; font-size:14px; color:#374151; }
.impact-badge-label{ font-size:13px; font-weight:600; color:#111827; line-height:1.3; text-wrap:balance; text-align:center; }
.impact-badge-amount{ font-size:14px; font-weight:700; color:#b71c45; margin-top:4px; text-align:center; }

/* ======================= GRID PRINCIPALE ======================= */
/* Keep the published markup stable while the opt-in HTML is deployed. */
.campaign-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,420px);
  grid-template-rows:auto auto;
  grid-auto-rows:auto;
  column-gap:24px;
  row-gap:16px;
  margin-bottom:40px;
}
.campaign-grid:not(.campaign-columns) :is(.grid-video,.grid-donbox){ align-self:start; }
/* Independent columns avoid empty rows beneath cards of unequal height.
   The existing nodes move into reading order below 900px in script.js. */
.campaign-grid.campaign-columns{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,420px) !important;
  grid-template-rows:none !important;
  grid-auto-rows:auto;
  align-items:start;
  gap:24px;
  margin-bottom:40px;
}
.campaign-grid.campaign-columns > :is(.campaign-primary,.campaign-secondary){
  display:flex;
  flex-direction:column;
  gap:24px;
  min-width:0;
  align-self:start;
}
.campaign-grid.campaign-columns :is(.grid-video,.grid-donbox,.grid-left-match,.grid-presentation,.grid-donors){
  /* Also neutralize the legacy page-local placement declarations. */
  grid-column:auto !important;
  grid-row:auto !important;
  min-width:0;
  min-height:0;
  margin:0;
  align-self:stretch;
}
.campaign-grid.campaign-columns :is(.tab-card,.donor-card){ height:auto; min-height:0; }
.campaign-grid.campaign-columns .split-row-texts{ min-width:0; }
.campaign-grid.campaign-columns .split-inline-hint{ min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.campaign-grid.campaign-columns [hidden]{ display:none !important; }
@media (max-width:900px){
  .campaign-grid.campaign-columns{ grid-template-columns:minmax(0,1fr) !important; gap:20px; }
  .campaign-grid.campaign-columns > :is(.campaign-primary,.campaign-secondary){ gap:20px; }
}

/* Video */
.video-container{
  width:100%; aspect-ratio:16/9; max-height:440px;
  background:#000; border-radius:16px; overflow:hidden; position:relative;
}
.video-container iframe,.video-container img,.video-container div{
  position:absolute; inset:0; width:100%; height:100%; border:0; object-fit:cover; border-radius:16px;
}

/* ======================= DON BOX ======================= */
#donation-section,.donbox,.don-box{
  background:#fff; border-radius:12px; box-shadow:0 12px 32px rgba(17,24,39,.08); border:1px solid var(--border-soft);
  display:flex; flex-direction:column; gap:16px; padding:20px; box-sizing:border-box;
}
.donbox-header-card{
  display:flex; align-items:flex-start; justify-content:space-between;
  background:linear-gradient(90deg, rgba(183,28,69,.06) 0%, rgba(183,28,69,.015) 100%);
  border:2px solid var(--primary-color); border-radius:12px; padding:12px 16px;
  box-shadow:0 10px 24px rgba(183,28,69,.12); line-height:1.2;
}
.donbox-header-left{ max-width:70%; }
.donbox-main-title{ margin:0; font-size:1.1rem; font-weight:800; color:var(--primary-color); letter-spacing:-.03em; text-transform:uppercase; }
.donbox-subtitle{ margin-top:6px; font-size:.88rem; color:#6b7280; font-weight:500; line-height:1.3; }
.donbox-type-badge{
  background:var(--primary-color); color:#fff; font-size:.8rem; font-weight:700; padding:8px 10px; border-radius:10px; text-transform:uppercase;
  line-height:1.2; box-shadow:0 8px 18px rgba(183,28,69,.35); border:2px solid #fff; white-space:nowrap;
}

.amount-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 16px; }
.amount-chip{
  display:flex; align-items:center; justify-content:center; height:44px; border-radius:10px; background:var(--primary-color); border:1px solid var(--primary-color);
  color:#fff; font-weight:700; font-size:15px; line-height:1; cursor:pointer; box-shadow:0 16px 24px rgba(183,28,69,.2); transition:filter .15s, box-shadow .15s, transform .08s;
}
.amount-chip:hover{ filter:brightness(1.05); transform:translateY(-1px); box-shadow:0 20px 32px rgba(183,28,69,.3); }
.amount-chip.active{ background:#fff; color:var(--primary-color); border:2px solid var(--primary-color); box-shadow:0 0 0 3px rgba(183,28,69,.15); }
@media (max-width:480px){ .amount-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }

.amount-input{
  display:flex; align-items:center; gap:8px; border:1px solid #d1d5db; border-radius:10px; padding:10px 12px; background:#fff; font-size:16px; font-weight:600; color:#111827;
}
.amount-input input[type="number"]{ width:100%; border:none; outline:none; font-size:16px; font-weight:600; color:#111827; background:transparent; }
.amount-input .suffix{ color:#6b7280; font-weight:600; font-size:14px; }

.split-card{ border:1px solid #d1d5db; border-radius:10px; background:#fff; box-shadow:0 4px 10px rgba(0,0,0,.04); padding:12px 14px; display:flex; flex-direction:column; gap:10px; }
.split-row-top{ display:flex; align-items:flex-start; gap:10px; line-height:1.3; }
.split-checkbox{ width:18px; height:18px; border-radius:4px; border:2px solid var(--primary-color); accent-color:var(--primary-color); cursor:pointer; flex-shrink:0; margin-top:2px; }
.split-row-title{ font-size:.9rem; font-weight:700; color:#111827; line-height:1.2; }
.split-row-desc{ font-size:.8rem; color:#6b7280; font-weight:400; line-height:1.3; margin-top:2px; }
.split-row-bottom{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:.8rem; color:#374151; }
.split-row-bottom select{ border:1px solid #d1d5db; border-radius:8px; padding:6px 8px; font-size:.8rem; min-width:90px; outline:none; background:#fff; }
.split-inline-hint{ font-size:.8rem; font-weight:600; color:#374151; }

.btn-primary{
  display:flex; align-items:center; justify-content:center; height:44px; width:100%;
  background:#b71c45; color:#fff; border:none; border-radius:10px; font-weight:700; font-size:16px; line-height:1; cursor:pointer;
  box-shadow:0 8px 20px rgba(183,28,69,.25); transition:filter .15s, transform .08s;
}
.btn-primary:hover{ filter:brightness(1.05); transform:translateY(-1px); }

.donbox-footer{ text-align:center; font-size:13px; color:#6b7280; line-height:1.4; }
.donbox-type-static{ display:block; font-weight:600; color:var(--primary-color); font-size:13px; text-transform:uppercase; letter-spacing:.03em; margin-bottom:4px; }

/* ======================= DONATEURS ======================= */
.donor-card{
  background:#fff; border-radius:12px; box-shadow:0 12px 32px rgba(17,24,39,.08); border:1px solid var(--border-soft);
  display:flex; flex-direction:column; overflow:hidden;
}
.donor-card-header{
  border-bottom:1px solid rgba(0,0,0,.06); background:#fff; padding:16px 20px 12px; display:flex; flex-direction:column; gap:10px;
}
.donor-card-title{ font-weight:700; font-size:1rem; color:#111827; line-height:1.3; }
.donor-search-input{
  width:100%; border:1px solid #d1d5db; border-radius:8px; padding:10px 12px; font-size:.9rem; line-height:1.3; outline:none; background:#fff; color:#111827; box-sizing:border-box;
}
.donor-search-input:focus{ border-color:var(--primary-color); box-shadow:0 0 0 3px rgba(183,28,69,.18); }
.donor-card-body{ max-height:260px; overflow-y:auto; padding:12px 20px 20px; display:flex; flex-direction:column; gap:12px; }
.donor-row{
  display:flex; justify-content:space-between; align-items:flex-start; background:#f9fafb; border:1px solid #e5e7eb; border-radius:10px; padding:10px 12px;
  font-size:.9rem; line-height:1.4; color:#1f2937;
}
.donor-row-left{ display:flex; flex-direction:column; min-width:0; }
.donor-name{ font-weight:600; color:#111827; word-break:break-word; }
.donor-message{ font-size:.8rem; color:#6b7280; margin-top:2px; line-height:1.3; word-break:break-word; white-space:pre-wrap; }
.donor-amount{ font-weight:700; color:var(--primary-color); white-space:nowrap; margin-left:12px; flex-shrink:0; font-size:.9rem; }

/* ======================= TABS PRESENTATION/EQUIPE ======================= */
.tab-card{
  background:#fff; border-radius:12px; box-shadow:0 12px 32px rgba(17,24,39,.08); border:1px solid var(--border-soft);
  display:flex; flex-direction:column; overflow:hidden;
}
.tab-card-header{
  display:flex; flex-wrap:wrap; gap:8px;
  background:linear-gradient(90deg, rgba(183,28,69,.06) 0%, rgba(183,28,69,.015) 100%);
  border-bottom:1px solid rgba(0,0,0,.06); padding:8px 12px;
}
.tab-btn{
  appearance:none; border:1px solid var(--primary-color); background:#fff; color:var(--primary-color);
  font-weight:600; font-size:.9rem; line-height:1.2; border-radius:8px; padding:8px 12px; cursor:pointer;
  box-shadow:0 8px 18px rgba(183,28,69,.15); transition:all .15s ease;
}
.tab-btn:hover{ filter:brightness(1.05); transform:translateY(-1px); box-shadow:0 12px 24px rgba(183,28,69,.25); }
.tab-btn-active{ background:var(--primary-color); color:#fff; border-color:var(--primary-color); box-shadow:0 12px 24px rgba(183,28,69,.4); }
.tab-card-body{ padding:16px 20px; font-size:.95rem; color:#1f2937; line-height:1.5; }
.tab-panel{ display:none; }
.tab-panel-active{ display:block; }
.tab-panel-inner{ white-space:pre-line; color:#2c3e50; font-size:1rem; line-height:1.55; }

/* Equipe */
.teams-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
.team-card.team-pro{
  border:1px solid #e5e7eb; border-radius:12px; background:#fff; box-shadow:0 8px 22px rgba(2,6,23,.06);
  padding:16px; display:flex; flex-direction:column; gap:12px;
}
.team-header{ display:flex; align-items:center; gap:12px; }
.team-avatar{ width:56px; height:56px; border-radius:50%; object-fit:cover; border:2px solid #fff; box-shadow:0 6px 14px rgba(2,6,23,.15); }
.team-avatar.fallback{ display:grid; place-items:center; background:#f3f4f6; color:#374151; font-weight:800; }
.team-title{ margin:0; font-size:1rem; color:#111827; }
.team-goal-line{ font-size:.85rem; color:#6b7280; }
.team-desc{ margin:0; font-size:.92rem; color:#374151; }
.team-stats{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{ display:flex; gap:6px; align-items:baseline; background:#f8fafc; border:1px solid #e5e7eb; border-radius:999px; padding:6px 10px; font-size:.86rem; }
.chip-accent{ background:#fff5f7; border-color:rgba(183,28,69,.25); }
.team-progress{ width:100%; height:10px; background:#f1f5f9; border-radius:999px; overflow:hidden; }
.team-progress-fill{ height:100%; background:linear-gradient(90deg,#b71c45,#e63c74); width:0%; }
.team-progress-legend{ display:flex; justify-content:space-between; font-size:.78rem; color:#6b7280; }
.team-link-btn{ margin-left:auto; background:#fff; border:1px solid #e5e7eb; border-radius:999px; padding:6px 10px; cursor:pointer; font-weight:600; }
.team-btn{ display:inline-block; margin-top:4px; }

/* ======================= MINI-GALERIE / CAROUSEL ======================= */
.carousel-container{ position:relative; max-width:100%; margin:20px 0; padding:8px 0; }
.carousel{
  display:flex; gap:16px; padding:12px 56px; overflow-x:auto; scroll-behavior:smooth; -webkit-overflow-scrolling:touch; align-items:center;
}
.carousel img{
  width:260px; height:170px; object-fit:cover; border-radius:16px; border:2px solid rgba(255,255,255,.8);
  background:#f3f4f6; box-shadow:0 10px 24px rgba(17,24,39,.12); cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease; flex-shrink:0; opacity:.95;
}
.carousel img:hover,.carousel img.active{
  transform:translateY(-6px) scale(1.03);
  box-shadow:0 20px 40px rgba(17,24,39,.18); border-color:rgba(183,28,69,.28); opacity:1;
}
@media (max-width:700px){
  .carousel{ padding:10px 48px; }
  .carousel img{ width:190px; height:125px; border-radius:12px; }
}
@media (max-width:480px){
  .carousel img{ width:150px; height:100px; }
}
.carousel-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  width:52px; height:52px; border-radius:999px; border:none; cursor:pointer;
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(245,247,250,.9));
  box-shadow:0 10px 24px rgba(17,24,39,.18), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter:blur(6px); display:grid; place-items:center;
  transition:transform .12s ease, box-shadow .18s ease, opacity .18s ease; opacity:.96; z-index:30;
}
.carousel-btn:hover{ transform:translateY(-50%) scale(1.06); box-shadow:0 16px 36px rgba(17,24,39,.22); }
.carousel-btn:active{ transform:translateY(-50%) scale(.98); }
.carousel-btn:focus-visible{ outline:3px solid rgba(183,28,69,.35); outline-offset:2px; }
.carousel-prev{ left:8px; } .carousel-next{ right:8px; }
.carousel-btn .arrow{ font-size:22px; line-height:1; color:#0f172a; font-weight:700; user-select:none; }
.carousel-prev .arrow::before{ content:'\2039'; } .carousel-next .arrow::before{ content:'\203A'; }
.carousel-dots{ display:flex; gap:8px; justify-content:center; margin-top:10px; }
.carousel-dots button{
  width:8px; height:8px; border-radius:999px; border:none; background:#e5e7eb; cursor:pointer; transition:transform .12s ease, background .18s ease;
}
.carousel-dots button.active{ background:#b71c45; transform:scale(1.2); }

/* LIGHTBOX */
.gallery-lightbox{
  position:fixed; inset:0; display:none;
  background:rgba(3,6,10,.65); z-index:9999; padding:28px;
}
.gallery-lightbox.open{ display:flex; align-items:center; justify-content:center; }
.gallery-lightbox .lightbox-inner{
  max-width:92%; max-height:92%; border-radius:12px; overflow:hidden; box-shadow:0 30px 80px rgba(2,6,23,.6); background:#000; position:relative;
}
.gallery-lightbox img{ display:block; width:100%; height:100%; object-fit:contain; background:#000; }
.lightbox-close{
  position:absolute; right:8px; top:8px; width:40px; height:40px; border-radius:999px; background:rgba(255,255,255,.92);
  display:grid; place-items:center; cursor:pointer; box-shadow:0 8px 24px rgba(0,0,0,.3); z-index:20;
}
.lightbox-close:after{ content:"\2715"; font-size:18px; color:#111827; line-height:1; }

/* ======================= CONTACT ======================= */
#contact-form{
  max-width:600px; margin:0 auto; background:var(--card-bg); border-radius:var(--border-radius); box-shadow:var(--shadow);
  padding:20px; display:flex; flex-direction:column; gap:12px;
}
#contact-form input,#contact-form textarea{
  width:100%; padding:12px; border:1px solid #ccc; border-radius:8px; font-size:1rem; box-sizing:border-box;
}
#contact-form button{
  padding:14px; font-size:1rem; border:none; border-radius:8px; background:var(--primary-color); color:#fff; cursor:pointer;
  transition:background-color .3s ease, transform .2s;
}
#contact-form button:hover{ background:var(--primary-dark); transform:translateY(-2px); }

/* ======================= ADMIN ======================= */
.admin-container{ max-width:1200px; margin:0 auto; padding:20px; background:#fff; border-radius:12px; box-shadow:0 4px 12px rgba(0,0,0,.1); }
.admin-nav{ display:flex; gap:20px; margin-bottom:20px; }
.admin-nav button{ padding:10px 20px; border:none; border-radius:6px; background:#b71c45; color:#fff; cursor:pointer; transition:background-color .3s; }
.admin-nav button:hover{ background:#951637; }
table{ width:100%; border-collapse:collapse; margin-top:15px; }
th,td{ padding:10px; border-bottom:1px solid #ddd; text-align:left; }
th{ background:#f7f7f7; }
.form-section{ margin-top:20px; padding:15px; background:#f9fafb; border-radius:8px; border:1px solid #e0e0e0; }
.form-section input,.form-section textarea,.form-section select{ width:100%; padding:8px; margin-bottom:10px; border:1px solid #ccc; border-radius:6px; }
.form-section button{ padding:10px 16px; border:none; border-radius:6px; background:#b71c45; color:#fff; cursor:pointer; transition:background-color .3s; }
.form-section button:hover{ background:#951637; }

/* Bouton secondaire */
.btn-secondary{
  display:flex;align-items:center;justify-content:center; height:44px;width:100%;
  background:#fff;color:var(--primary-color); border:2px solid var(--primary-color); border-radius:10px;font-weight:800;font-size:15px;
  cursor:pointer;gap:8px; box-shadow:0 6px 16px rgba(183,28,69,.10);
  transition:transform .08s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-secondary:hover{ transform:translateY(-1px); box-shadow:0 10px 24px rgba(183,28,69,.18); background:linear-gradient(0deg, rgba(183,28,69,.06), rgba(183,28,69,.06)); }
.btn-secondary:active{ transform:translateY(0); }
.split-card.disabled{ opacity:.45; pointer-events:none; filter:grayscale(0.2); }

/* ===== Bandeau "Campagne doublee" (format compact pour colonne gauche) ===== */
.grid-left-match{
  margin:0;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  padding:22px 24px; border-radius:16px;
  background:radial-gradient(120% 140% at 0% 0%, #7B61FF 0%, #5F5BFF 45%, #4B3FF0 100%);
  color:#fff; box-shadow:0 10px 28px rgba(33,28,87,.22), inset 0 1px 0 rgba(255,255,255,.10);
}
.match-left{ flex:1 1 auto; min-width:0; }
.match-right{ flex:0 0 auto; display:flex; align-items:center; justify-content:center; }
.match-pill{
  display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border-radius:999px;
  background:rgba(255,255,255,.14); font-weight:700; text-transform:uppercase; font-size:.85rem;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22);
}
.match-title{ margin:10px 0 4px; font-size:clamp(1.05rem, 0.9rem + .9vw, 1.5rem); font-weight:800; }
.match-title .under{ padding:0 6px; border-radius:8px; background:rgba(255,255,255,.16); box-shadow:inset 0 0 0 1px rgba(255,255,255,.18); }
.match-sub{ margin:0; opacity:.95; font-weight:500; }
.x2-badge{ width:112px; height:112px; filter:drop-shadow(0 8px 18px rgba(0,0,0,.30)); }

/* ====== Contour "Stripe" + badge x2 pour la progression ====== */

/* Contour degrade et leger padding interne */
.goals-outline{
  position: relative;
  padding: 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--match-1), var(--match-2)) border-box;
  box-shadow: 0 10px 24px rgba(33,28,87,.12);
}

/* Reduit les marges internes des blocs KPI pour que tout rentre proprement */
.goals-outline .kpi-goal{ margin: 10px 0; }

/* Badge x2 accroche au bord haut-droit du contour */
.goals-outline::after{
  content: "\00D7" attr(data-match);
  position: absolute;
  top: -18px;
  right: -18px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 28px/1 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: #fff;
  background: radial-gradient(120% 120% at 30% 30%, #8C7CFF 0%, var(--match-1) 50%, var(--match-2) 100%);
  box-shadow: 0 10px 22px rgba(33,28,87,.35);
  outline: 6px solid #fff;
}

/* Petite etiquette "impact" sous le x2 */
.goals-outline::before{
  content: "impact";
  position: absolute;
  top: 28px;
  right: -18px;
  width: 72px;
  text-align: center;
  font: 700 11px/1 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: rgba(255,255,255,.95);
  pointer-events: none;
}

/* ==================== RESPONSIVE ==================== */

/* Petits ecrans : header compact et nav en wrap */
@media (max-width: 768px){
  header { padding: 14px 16px; gap: 10px; flex-wrap: wrap; }
  header img.logo { height: 44px; }
  header nav { width: 100%; display: flex; gap: 12px; flex-wrap: wrap; }
  header nav a { margin: 0; font-size: .95rem; padding: 6px 0; }
}

/* Container respirant sur mobile */
@media (max-width: 768px){
  .container { padding: 14px; }
}

/* Titre de page plus court */
@media (max-width: 640px){
  #page-heading { font-size: 26px; padding: 12px 16px; margin: 28px auto 14px; }
}

/* KPI : lignes en pile + tailles de police adaptees */
@media (max-width: 900px){
  .x2-badge{ width: 96px; height: 96px; }

  .kpi-row{ grid-template-columns: 1fr; gap: 10px; }
  .kpi-col + .kpi-col{ border-left: 0; }
  .kpi-main   { font-size: 32px; }
  .kpi-title  { font-size: 18px; }
  .kpi-sub    { font-size: 16px; }
  .kpi-donors { font-size: 34px; }
}

/* Badges d'impact : carte plus etroite */
@media (max-width: 640px){
  .impact-badge{ min-width: 100px; max-width: 120px; padding: 10px 12px; }
  .impact-badge-icon{ width: 60px; height: 60px; }
  .impact-badge-amount{ font-size: 13px; }
}

/* Video : ratio et bords surs */
@media (max-width: 768px){
  .video-container { max-height: none; aspect-ratio: 16/9; border-radius: 12px; }
  .video-container iframe { border-radius: 12px; }
}

/* DonBox : grilles et champs qui ne debordent pas */
@media (max-width: 768px){
  .donbox, #donation-section, .don-box { padding: 16px; border-radius: 10px; }
  .donbox-header-card { gap: 10px; padding: 10px 12px; }
  .donbox-header-left { max-width: 100%; }
  .donbox-main-title { font-size: 1rem; }
  .donbox-subtitle   { font-size: .85rem; }
  .donbox-type-badge { font-size: .75rem; padding: 6px 8px; }

  .amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .amount-chip { height: 42px; font-size: 14px; }

  .amount-input { padding: 10px; }
  .amount-input input[type="number"] { font-size: 16px; }
  .amount-input .suffix { font-size: 13px; }

  .split-row-top { align-items: center; }
  .split-row-desc { font-size: .78rem; }
  .btn-primary, .btn-secondary { height: 44px; font-size: 15px; }
}

/* Donateurs : pas de debordement, wrap propre */
@media (max-width: 768px){
  .donor-card-body { max-height: 320px; }
  .donor-row{ gap: 8px; padding: 10px; }
  .donor-row-left{ min-width: 0; }
  .donor-name{ font-size: .95rem; word-break: break-word; }
  .donor-message{ font-size: .78rem; }
  .donor-amount{ font-size: .95rem; margin-left: 8px; }
}

/* Tabs presentation/equipes : boutons lisibles */
@media (max-width: 640px){
  .tab-card-header{ gap: 6px; padding: 6px 8px; }
  .tab-btn{ font-size: .85rem; padding: 7px 10px; }
  .tab-card-body{ padding: 14px; font-size: .95rem; }
  .teams-grid{ grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
}

/* Carousel : images plus petites, fleches discretes */
@media (max-width: 700px){
  .carousel{ padding: 10px 40px; gap: 12px; }
  .carousel img{ width: 180px; height: 118px; border-radius: 12px; }
}
@media (max-width: 480px){
  .carousel{ padding: 8px 36px; gap: 10px; }
  .carousel img{ width: 150px; height: 96px; }
  .carousel-btn{ width: 42px; height: 42px; }
}

/* Bandeau x2 : reduit la pastille pour eviter le chevauchement */
@media (max-width: 640px){
  .goals-outline{ padding: 12px; }
  .goals-outline::after{
    right: -14px; top: -14px; width: 58px; height: 58px; font-size: 22px; outline-width: 5px;
  }
  .goals-outline::before{ top: 22px; right: -14px; font-size: 10px; }
}

/* Petits details anti-debordement globaux */
@media (max-width: 768px){
  .kpi-goal, .donor-card, .tab-card, .donbox { box-shadow: 0 8px 18px rgba(0,0,0,.08); }
  .deadline-banner{ gap: 10px; }
  .deadline-days{ font-size: 20px; }
  .deadline-circle{ width: 64px; height: 64px; }
}

/* ======================= FOCUS-VISIBLE ======================= */
.button:focus-visible, .btn-primary:focus-visible, .btn-secondary:focus-visible,
.amount-chip:focus-visible, .tab-btn:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ======================= RESPONSIVE FIXES (2026-05-18) ======================= */
/* Filet de sécurité global anti-débordement */
html, body { overflow-x: hidden; max-width: 100%; }
img, iframe, video, svg { max-width: 100%; height: auto; }
.video-container iframe, .video-container img { height: 100%; }

/* Titre de page : montée progressive (au lieu de saut brusque à 640px) */
#page-heading{
  font-size: clamp(22px, 4.5vw, 40px);
  padding: clamp(12px, 2.5vw, 20px) clamp(16px, 4vw, 30px);
  margin: clamp(20px, 5vw, 50px) auto clamp(12px, 2.5vw, 20px);
  letter-spacing: 1px;
}

/* Grille des campagnes (index.php) : 2 colonnes desktop -> 1 colonne mobile */
@media (max-width: 768px){
  .campaigns-grid{ gap:16px; }
  .campaign-card{ width:100%; padding:20px; }
}

/* Bandeau "x2" : empile et limite la largeur du badge sur mobile */
@media (max-width: 640px){
  .grid-left-match{ flex-direction:column; align-items:flex-start; gap:14px; padding:16px 18px; }
  .match-right{ align-self:center; }
  .x2-badge{ width:80px; height:80px; }
}

/* Tableaux (dashboard donateur, admin) : scroll horizontal au lieu de déborder */
.container table,
.admin-container table{
  display:block;
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  white-space:nowrap;
}
.container table thead, .admin-container table thead{ display:table-header-group; }
.container table tbody, .admin-container table tbody{ display:table-row-group; }
@media (max-width: 600px){
  th, td{ font-size:.85rem; padding:8px; }
}

/* Page de don (donate.php) : marges/padding qui respirent sur mobile */
.donate-container{
  padding: clamp(16px, 4vw, 30px);
  margin: clamp(20px, 4vw, 40px) auto;
}

/* Page de remerciement (success.php) */
.thank-container{ margin: clamp(16px, 4vw, 40px) auto; max-width: min(720px, 100% - 24px); }
.thank-header, .thank-body{ padding: clamp(20px, 4vw, 32px); }
@media (max-width: 480px){
  .thank-header h1{ font-size:1.5rem; }
  .thank-body p{ font-size:1rem; }
  .thank-actions a{ display:block; margin:8px 0; text-align:center; }
}

/* CERFA form : actions qui wrap sur mobile */
.cerfa-box{
  margin: clamp(16px, 4vw, 32px) auto;
  padding: clamp(16px, 4vw, 24px);
  max-width: min(720px, 100% - 24px);
}
.cerfa-actions{ flex-wrap:wrap; }
.cerfa-actions .btn-primary,
.cerfa-actions .btn-secondary{ flex:1 1 auto; min-width:140px; }

/* Formulaires donor_login / donor_register : champs plein largeur sur mobile */
.container form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.container form textarea,
.container form select{
  width:100%;
  box-sizing:border-box;
  padding:12px;
  margin-bottom:12px;
  border:1px solid #ccc;
  border-radius:8px;
  font-size:1rem;
}
@media (max-width: 480px){
  .container form{ max-width:100% !important; }
}

/* Header très étroit : empile logo + nav verticalement */
@media (max-width: 480px){
  header{ flex-direction:column; align-items:flex-start; gap:10px; padding:12px 14px; }
  header nav{ width:100%; flex-wrap:wrap; gap:10px; }
  header img.logo{ height:40px; }
}

/* Titres dans le container : tailles raisonnables sur petit écran */
@media (max-width: 480px){
  .container h1{ font-size:1.5rem; line-height:1.25; }
  .container h2{ font-size:1.15rem; }
  .container p{ font-size:.95rem; }
}

/* Donor row : wrap montant en-dessous si écran très étroit */
@media (max-width: 480px){
  .donor-row{ flex-wrap:wrap; }
  .donor-row-left{ width:100%; }
  .donor-amount{ margin-left:0; margin-top:6px; }
}

/* Badges d'impact : pleine largeur garantie sur mini écrans (évite ligne unique trop large) */
@media (max-width: 380px){
  .impact-badges-bar{ gap:10px; }
  .impact-badge{ min-width:46%; max-width:calc(50% - 5px); }
}

/* Footer compact */
@media (max-width: 480px){
  footer{ padding:14px !important; font-size:.85rem; }
}

/* DonBox header card : passer le badge sous le titre quand vraiment étroit */
@media (max-width: 380px){
  .donbox-header-card{ flex-direction:column; align-items:flex-start; gap:8px; }
  .donbox-header-left{ max-width:100%; }
  .donbox-type-badge{ align-self:flex-start; }
}

/* Carousel : sur écrans très étroits, garantit que les images ne sortent pas */
@media (max-width: 380px){
  .carousel-btn{ width:36px; height:36px; }
  .carousel-prev{ left:4px; } .carousel-next{ right:4px; }
  .carousel{ padding:8px 28px; }
}

/* Composants communs : accueil, collecte, don, compte et administration. */
html { scroll-padding-top:24px; }
body header { min-height:76px; gap:20px; padding:14px max(24px, calc((100vw - 1200px) / 2)); }
body header nav { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; }
body header nav a { margin:0; padding:8px 0; min-height:44px; display:inline-flex; align-items:center; }
body header img.logo { width:auto; height:48px; flex-shrink:0; }
body main { min-width:0; }
body :is(a,button,input,select,textarea,[tabindex]):focus-visible { outline:3px solid var(--focus-color); outline-offset:3px; }
body header :is(a,button):focus-visible { outline-color:#fff; }
button,input,select,textarea { font-family:inherit; }
button { touch-action:manipulation; }
button:disabled { opacity:.6; cursor:wait; transform:none; }
input[type="checkbox"],input[type="radio"] { accent-color:var(--primary-color); }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select { min-height:46px; }
textarea { min-height:140px; resize:vertical; }
label { font-weight:600; }
.skip-link { position:fixed; top:12px; left:12px; z-index:10000; transform:translateY(-160%); padding:12px 18px; border-radius:8px; background:#fff; color:var(--primary-dark); box-shadow:var(--shadow); }
.skip-link:focus { transform:translateY(0); }
.ui-state { margin:0; padding:24px 16px; color:var(--muted-color); text-align:center; }
.form-error { margin:0; padding:12px 14px; border:1px solid #f1b8c7; border-radius:10px; color:#85112d; background:#fff4f7; }
[hidden] { display:none !important; }
.campaign-card { border:1px solid var(--border-soft); border-radius:var(--border-radius); box-shadow:var(--shadow); }
.campaign-card p { color:var(--muted-color); }
.campaign-card .button { margin-top:16px; }
.campaign-grid :is(.donbox,.tab-card,.donor-card) { border:1px solid var(--border-soft); border-radius:var(--border-radius); box-shadow:var(--shadow); }
.campaign-grid .donbox-header-card { border-width:1px; box-shadow:none; background:#fff7f9; }
.campaign-grid .donbox-type-badge { border:0; box-shadow:none; font-size:12px; }
.campaign-grid .amount-chip { background:#fff; color:var(--primary-color); border-color:#e3c4cd; box-shadow:none; height:48px; }
.campaign-grid .amount-chip:is(:hover,.active) { background:var(--primary-color); color:#fff; border-color:var(--primary-color); box-shadow:none; }
.campaign-grid :is(.btn-primary,.btn-secondary) { min-height:48px; height:auto; padding:12px 16px; box-shadow:none; line-height:1.4; }
.campaign-grid .tab-btn { min-height:44px; box-shadow:none; padding:10px 16px; }
.campaign-grid .donor-card-body { max-height:380px; scrollbar-gutter:stable; }
.campaign-grid .donor-row { background:var(--surface-subtle); border-color:var(--border-soft); }
.campaign-grid .donor-message { color:var(--muted-color); }
.campaign-grid .donor-amount { font-variant-numeric:tabular-nums; }
.amount-input:focus-within { border-color:var(--primary-color); outline:3px solid rgba(183,28,69,.15); outline-offset:2px; }
.carousel-dots button { width:24px; height:24px; border:7px solid var(--secondary-color); background:#9aa3b3; }
.carousel-dots button.active { background:var(--primary-color); }
.lightbox-dismiss { position:absolute; top:20px; right:20px; min-height:44px; min-width:88px; border:1px solid #fff; border-radius:10px; padding:10px 16px; color:#182234; background:#fff; font-weight:700; cursor:pointer; }
.cerfa-box .cerfa-lang-floating { position:static; display:flex; justify-content:flex-end; margin-bottom:20px; }
.cerfa-box .cerfa-field input { min-height:46px; }
.cerfa-box .cerfa-hint { color:var(--muted-color); }
.cerfa-box .cerfa-actions { padding-top:16px; border-top:1px solid var(--border-soft); }
.cerfa-box .cerfa-actions :is(.btn-primary,.btn-secondary) { width:auto; min-height:48px; height:auto; padding:12px 20px; line-height:1.4; }
.cerfa-box .anon-row { display:flex; align-items:flex-start; gap:12px; padding:12px 0; font-weight:400; }
.cerfa-box .anon-row input { flex:none; width:20px; height:20px; margin:3px 0 0; }
.auth-wrap .auth-form-pane { background:#fff; }
.auth-wrap .auth-options :is(a,label),.auth-wrap .terms { min-height:44px; }
.auth-wrap .pwd-toggle { min-width:44px; min-height:44px; }
.auth-wrap .field input { min-height:48px; font-size:16px; }
.auth-wrap .pwd-wrap input { padding-right:58px; }
.auth-wrap .auth-submit { min-height:48px; box-shadow:none; }
.admin-container .admin-nav { flex-wrap:wrap; gap:8px; }
.admin-container :is(.admin-nav button,.form-section button) { min-height:44px; border-radius:8px; }
.admin-container .form-section { border-color:var(--border-soft); background:var(--surface-subtle); border-radius:12px; }
.home-hero { max-width:900px; padding:clamp(48px,8vw,96px) 0 clamp(40px,6vw,72px); }
.home-hero .section-eyebrow { color:var(--primary-color); font-size:12px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.home-hero h1 { max-width:820px; margin:16px 0 24px; color:#202b3c; font-size:clamp(32px,5vw,60px); line-height:1.12; letter-spacing:-.04em; }
.home-lead { max-width:720px; margin:0; color:var(--muted-color); font-size:clamp(17px,2vw,20px); line-height:1.7; }
.home-actions { display:flex; flex-wrap:wrap; align-items:center; gap:16px 28px; margin-top:32px; }
.home-actions .button { min-height:48px; padding:14px 24px; box-shadow:none; }
.home-secondary { display:inline-flex; min-height:44px; align-items:center; font-weight:700; text-decoration:underline; text-underline-offset:4px; }
.home-section { margin:0 0 64px; scroll-margin-top:28px; }
.home-section-heading { margin-bottom:24px; }
.home-section-heading h2 { font-size:clamp(24px,3vw,32px); line-height:1.2; letter-spacing:-.025em; margin:0 0 10px; }
.home-section-heading p { color:var(--muted-color); margin:0; }
.home-page .campaigns-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.home-page .campaign-card { width:auto; padding:28px; }
.home-page .campaign-card h3 { color:#243044; font-size:22px; line-height:1.3; }
.home-page .campaign-card-description { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:4; overflow:hidden; margin:0 0 16px; }
.home-page .campaign-card-date { font-size:14px; margin:auto 0 0; }
.home-about { padding:clamp(24px,5vw,48px); border:1px solid var(--border-soft); border-radius:20px; background:#fff; box-shadow:var(--shadow); }
.home-about h2 { margin:0 0 16px; color:#243044; font-size:clamp(24px,3vw,32px); }
.home-about p { max-width:860px; color:var(--muted-color); }
.site-footer { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px 24px; padding:28px max(20px,calc((100vw - 1160px) / 2)); color:#fff; background:#781431; }
.site-footer p { margin:0; }
.site-footer a { color:#fff; text-decoration:underline; }
.donate-container { max-width:600px; margin:40px auto; padding:clamp(24px,5vw,40px); border:1px solid var(--border-soft); border-radius:20px; background:#fff; box-shadow:var(--shadow); }
.donate-container h1 { margin:0 0 16px; color:#243044; font-size:clamp(24px,4vw,32px); text-align:center; line-height:1.3; }
.donate-container .donation-summary { text-align:center; color:var(--muted-color); margin:0 0 28px; }
.donate-container .donate-note { color:var(--muted-color); font-size:14px; margin:0 0 24px; }
.donate-container form label { display:block; margin-bottom:8px; }
.donate-container .donation-back { display:block; margin-top:20px; text-align:center; }
.cancel-page .status-card { max-width:680px; margin:48px auto; padding:clamp(24px,5vw,48px); border:1px solid var(--border-soft); border-radius:20px; background:#fff; box-shadow:var(--shadow); text-align:center; }
.cancel-page .status-card h1 { color:#243044; margin:0 0 16px; }
.cancel-page .status-card p { color:var(--muted-color); }
.cancel-page .status-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:16px; margin-top:28px; }
.admin-container .form-section input:is([type="checkbox"],[type="radio"]) { width:20px; height:20px; padding:0; margin:0 8px 0 0; }
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}
@media (max-width:640px) {
  body header { min-height:76px; padding:14px 16px; gap:10px; }
  body header nav { gap:8px 16px; }
  body header img.logo { height:44px; }
  .campaign-grid .donbox-header-card { gap:12px; }
  .campaign-grid .donbox-header-left { min-width:0; }
  .campaign-grid .donbox-type-badge { white-space:normal; max-width:120px; }
  .kpi-main { font-size:clamp(26px,7vw,36px); }
  .goals-outline::after { right:0; top:-18px; }
  .goals-outline::before { right:0; }
  .auth-wrap .auth-form-pane { padding:32px 20px 48px; }
  .cerfa-box .cerfa-actions { flex-direction:column-reverse; }
  .cerfa-box .cerfa-actions :is(.btn-primary,.btn-secondary) { width:100%; }
  .home-page .campaigns-grid { grid-template-columns:1fr; }
  .home-page .campaign-card { padding:24px; }
  .home-actions .button { width:100%; }
  .home-section { margin-bottom:44px; }
  .site-footer { align-items:flex-start; flex-direction:column; }
}
@media (max-width:480px) {
  body header { flex-direction:row; align-items:center; gap:14px; }
  body header nav { flex:1; width:auto; gap:4px 12px; min-width:0; }
  body header nav a { font-size:14px; }
}

/* Accessible labels keep their text available without occupying field layout. */
.visually-hidden {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

/* Retouches limitées après restauration du design précédent. */
.home-page .home-hero { padding:48px 0 40px; }
.home-page .campaigns-grid-single { grid-template-columns:minmax(0,1fr); max-width:760px; }
.campaign-donate-link { display:inline-flex; min-height:44px; align-items:center; margin-top:12px; font-weight:600; text-decoration:underline; text-underline-offset:4px; }
.campaign-page .kpi-days-wrap { gap:12px; }
.campaign-page .time-ring { width:64px; height:64px; flex:0 0 64px; padding:5px; }
.campaign-page .time-ring-inner .deadline-days { display:flex; align-items:baseline; justify-content:center; gap:3px; line-height:1; }
.campaign-page .time-ring-inner [data-days] { font-size:18px; font-variant-numeric:tabular-nums; }
.campaign-page .time-ring-inner .deadline-day-unit { font-size:12px; margin:0; }
.donbox-frequency { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; padding:5px; border:1px solid var(--border-soft); border-radius:12px; background:var(--surface-subtle); }
.donbox-frequency button { min-width:0; min-height:46px; padding:10px 8px; border:0; border-radius:8px; background:transparent; color:var(--muted-color); font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.donbox-frequency button[aria-pressed="true"] { background:var(--primary-color); color:#fff; box-shadow:0 2px 6px rgba(149,22,55,.14); }
.donbox-frequency button:focus-visible { outline:2px solid var(--focus-color); outline-offset:2px; }
.donbox-frequency button[aria-pressed="true"]:focus-visible { outline-color:var(--primary-dark); }
.amount-input-label { margin:0 0 -8px; font-size:14px; color:var(--muted-color); }
.campaign-page .donbox-main-title { margin:0; font-size:21px; line-height:1.25; }
#donbox-personal-preview { padding:16px; border:1px solid #ebd5dc; border-radius:12px; background:#fcf7f9; color:var(--muted-color); line-height:1.6; font-size:14px; }
#donbox-personal-preview:empty { display:none; }
.donbox-preview-main { margin:0; color:var(--text-color); font-weight:600; font-size:15px; }
.donbox-preview-detail { margin:8px 0 0; font-size:13px; }
@media (max-width:860px) {
  .campaign-page .kpi-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
  .campaign-page .kpi-col:nth-child(2) { grid-column:1 / -1; grid-row:1; }
  .campaign-page .kpi-col:nth-child(1) { grid-column:1; grid-row:2; }
  .campaign-page .kpi-col:nth-child(3) { grid-column:2; grid-row:2; }
}
@media (max-width:640px) { .home-page .home-hero { padding:32px 0; } }
