/* ============================================================
   SARGAWATT – Page /sargajet/sargamap
   Extends styles.css + sargasses.css
   Localisation & prévision des échouages de sargasses
   ============================================================ */

/* ---------- Hero video : afficher tout le cadre (pas de crop) ---------- */
/* La vidéo de démo est en 16:9 ; on cale le conteneur sur ce ratio et on
   passe en object-fit:contain pour voir l'image entière au lieu de la rogner. */
.page-hero-visual .ph {
  min-height: 0;
  aspect-ratio: 16 / 9;
  background-color: #07232b;
}
.page-hero-visual .ph-img {
  object-fit: contain;
}
.page-hero-visual .sources { margin-top: 10px; }

/* ---------- Hero note (reused look) ---------- */
.hero-note {
  margin-top: 18px;
  font-size: 13px; color: var(--gray); line-height: 1.55;
  max-width: 540px;
  display: flex; gap: 8px; align-items: flex-start;
}
.hero-note svg { flex: none; width: 15px; height: 15px; color: var(--teal); margin-top: 1px; }

/* ============================================================
   DONNÉES OPÉRATIONNELLES – sober editorial table
   ============================================================ */
.opdata { background: var(--surface); border-block: 1px solid var(--line); }
.opdata-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 4vw, 60px); align-items: start;
}
.opdata-intro .lead {
  font-size: clamp(16.5px, 1.5vw, 19px); color: var(--ink-soft);
  line-height: 1.6; margin-top: 18px;
}
.opdata-intro .zones-note {
  margin-top: 22px; font-family: var(--font-display); font-weight: 600;
  font-size: 17px; color: var(--teal-800); line-height: 1.45;
}
.spec-table { margin-top: 4px; }
.spec-table dl { margin: 0; }
.spec-table .row {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 18px;
  padding: 16px 0; border-top: 1px solid var(--line-2);
}
.spec-table .row:last-child { border-bottom: 1px solid var(--line-2); }
.spec-table dt {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal-700); align-self: center;
}
.spec-table dd {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(16px, 1.5vw, 18px); color: var(--ink); align-self: center;
}
@media (max-width: 860px) {
  .opdata-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ============================================================
   3-UP CARD GRID (problème)
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sargamap-problem .section-head {
  max-width: none;
}
.sargamap-problem .problem-copy {
  /* Les deux paragraphes respirent sur toute la largeur disponible. */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin-top: 18px;
}
.sargamap-problem .problem-copy p {
  margin-top: 0;
  max-width: none;
}

/* ============================================================
   STYLISED MAP – BEFORE / AFTER COMPARISON
   ============================================================ */
.precision { background: var(--surface); border-block: 1px solid var(--line); }
.map-compare {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: clamp(16px, 2.4vw, 28px); align-items: stretch;
  margin-top: clamp(30px, 4vw, 46px);
}
.map-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: clamp(18px, 2vw, 24px);
  display: flex; flex-direction: column;
}
.map-card.after { border-color: var(--teal); background: linear-gradient(180deg, var(--teal-tint-2), var(--surface)); }
.map-tag {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.map-card.before .map-tag { background: var(--gray-300); color: var(--ink); }
.map-card.after .map-tag { background: var(--teal); color: #fff; }
.map-card h3 { font-size: clamp(17px, 1.7vw, 20px); font-family: var(--font-display); font-weight: 600; margin-bottom: 4px; }
.map-res { font-size: 13px; font-weight: 700; color: var(--teal-700); margin-bottom: 16px; letter-spacing: 0.01em; }
.map-card.before .map-res { color: var(--gray); }

.map-points { margin-top: 18px; display: flex; flex-direction: column; gap: 9px; }
.map-points li { display: flex; gap: 9px; font-size: 14px; color: var(--ink); line-height: 1.4; }
.map-points li svg { flex: none; width: 17px; height: 17px; margin-top: 1px; }
.map-card.before .map-points li svg { color: var(--gray); }
.map-card.after .map-points li svg { color: var(--teal); }

.map-arrow {
  display: grid; place-items: center; align-self: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--teal-700);
  box-shadow: var(--shadow-sm);
}
.map-arrow svg { width: 22px; height: 22px; }

/* ---------- The stylised map stage ---------- */
.map-stage {
  position: relative; aspect-ratio: 4 / 3; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 110% at 78% -10%, var(--teal) 0%, var(--teal-700) 52%, var(--teal-900) 100%);
  isolation: isolate;
}
.map-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-coast { fill: rgba(205,189,154,0.92); }
.map-coast-edge { fill: none; stroke: rgba(255,255,255,0.5); stroke-width: 1.2; }

.map-grid line { stroke: #ffffff; stroke-opacity: 0.16; stroke-width: 0.8; }
.map-grid.coarse line { stroke-opacity: 0.26; stroke-width: 1; }

/* Risk zone */
.risk-fuzzy { fill: #ffd27a; opacity: 0.5; filter: blur(7px); }
.risk-precise { fill: #ffce6a; opacity: 0.92; }
.risk-cell { fill: rgba(255,206,106,0.18); stroke: #ffce6a; stroke-width: 1.4; }
.risk-ping { fill: none; stroke: #fff; stroke-width: 1.4; opacity: 0.9; }

/* Drifting sargasse nappes */
.nappe { fill: #2f6b52; opacity: 0.62; }
.nappe.lite { fill: #3c8568; opacity: 0.5; }
@keyframes drift-a { 0% { transform: translate(0,0); } 50% { transform: translate(9px,-5px); } 100% { transform: translate(0,0); } }
@keyframes drift-b { 0% { transform: translate(0,0); } 50% { transform: translate(-7px,6px); } 100% { transform: translate(0,0); } }
.nappe.d1 { animation: drift-a 9s ease-in-out infinite; }
.nappe.d2 { animation: drift-b 11s ease-in-out infinite; }
.nappe.d3 { animation: drift-a 13s ease-in-out infinite; }

/* Gentle ping on the precise risk marker */
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.85; } 70% { transform: scale(1.5); opacity: 0; } 100% { transform: scale(1.5); opacity: 0; } }
.risk-ping { transform-box: fill-box; transform-origin: center; animation: ping 3.4s ease-out infinite; }

.map-chip {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(7,61,64,0.42); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff; font-weight: 700; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.map-chip svg { position: static; width: 12px; height: 12px; inset: auto; }

@media (prefers-reduced-motion: reduce) {
  .nappe.d1, .nappe.d2, .nappe.d3, .risk-ping { animation: none; }
}

/* ============================================================
   3-STEP SCHEMA (localiser / prioriser / collecter)
   reuses .steps from sargasses.css, forced to 3 columns
   ============================================================ */
.steps.steps-3 { grid-template-columns: repeat(3, 1fr); max-width: 980px; margin-inline: auto; }
.step .step-ico {
  display: inline-grid; place-items: center; margin-top: 14px;
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--teal-tint); color: var(--teal-700);
}
.step .step-ico svg { width: 21px; height: 21px; }
.schema-cta { margin-top: clamp(34px, 4vw, 48px); display: flex; gap: 14px; flex-wrap: wrap; }

/* ============================================================
   ACCESS SECTION
   ============================================================ */
.access { background: var(--bg); }
.access-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px); align-items: center;
}
.access-text .lead { font-size: clamp(16.5px, 1.5vw, 19px); color: var(--ink-soft); line-height: 1.6; margin-top: 18px; }
.access-visual .ph { min-height: 320px; }

/* ============================================================
   COMMERCIAL OFFER – 2 cards
   ============================================================ */
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: clamp(26px, 3.5vw, 42px); }
.offer-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3vw, 36px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.offer-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.offer-card.featured { border-color: var(--teal); background: linear-gradient(180deg, var(--teal-tint-2), var(--surface)); }
.offer-ico {
  width: 50px; height: 50px; border-radius: 13px;
  background: var(--teal-tint); color: var(--teal-700);
  display: grid; place-items: center; margin-bottom: 18px;
}
.offer-ico svg { width: 25px; height: 25px; }
.offer-tag {
  font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 8px;
}
.offer-card.featured .offer-tag { color: var(--teal-700); }
.offer-card h3 { font-size: clamp(20px, 2.2vw, 26px); }
.offer-card p { margin-top: 14px; font-size: 15.5px; color: var(--ink-soft); line-height: 1.55; flex: 1; }
.offer-card .btn { margin-top: 26px; align-self: flex-start; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .map-compare { grid-template-columns: 1fr; }
  .map-arrow { transform: rotate(90deg); margin: 2px auto; }
  .steps.steps-3 { grid-template-columns: 1fr; gap: 22px; }
  .steps.steps-3::before { display: none; }
  .access-grid { grid-template-columns: 1fr; gap: 30px; }
  .access-visual { order: -1; }
}
@media (max-width: 760px) {
  .grid-3 { grid-template-columns: 1fr; }
  .sargamap-problem .problem-copy { grid-template-columns: 1fr; gap: 14px; }
  .card-grid-4.benefit-cards { grid-template-columns: 1fr 1fr; }
  .offer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .card-grid-4.benefit-cards { grid-template-columns: 1fr; }
}
