/* ==========================================================================
   EdelMark — styles
   ========================================================================== */

:root {
  --fond:   #F3F4F2;
  --encre:  #14212B;
  --acier:  #5B6770;
  --ligne:  #D5D9DB;
  --signal: #F2B705;

  /* police du système : rien à télécharger, aucune requête externe.
     San Francisco sur Mac/iPhone, Segoe UI sur Windows, Roboto sur Android. */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1120px;

  /* surfaces façon iOS : arrondis, verre dépoli */
  --r-l: 28px;
  --r-m: 20px;
  --verre: rgba(255, 255, 255, .62);
  --verre-bord: rgba(255, 255, 255, .8);
  --flou: saturate(180%) blur(20px);
  --ombre: 0 1px 2px rgba(20, 33, 43, .04), 0 12px 40px -12px rgba(20, 33, 43, .18);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 0;
  box-shadow: 0 0 0 5px var(--encre);
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 244, 242, .72);
  -webkit-backdrop-filter: var(--flou);
  backdrop-filter: var(--flou);
  border-bottom: 1px solid rgba(20, 33, 43, .08);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
}
.brand {
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.header-link {
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
}
.header-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(48px, 8vw, 104px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero h1 {
  font-size: clamp(2.6rem, 1.2rem + 5.2vw, 5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 13em;
  text-wrap: balance;
}
.lead {
  margin-top: 28px;
  max-width: 62ch;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--encre);
}
.actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font: 500 1rem/1.2 var(--font);
  text-decoration: none;
  transition: background-color .15s ease;
}
.btn:focus-visible { border-radius: 999px; }
.btn-primary {
  background: var(--encre);
  color: var(--fond);
  text-decoration: underline 2px transparent;
  text-underline-offset: 6px;
  transition: text-decoration-color .15s ease;
}
.btn-primary:hover { text-decoration-color: var(--signal); }
.btn-text { background: rgba(20, 33, 43, .06); }
.btn-text:hover { background: rgba(20, 33, 43, .1); }

/* ==========================================================================
   Comparateur
   ========================================================================== */

.compare-section { padding-bottom: clamp(72px, 10vw, 128px); }

.cmp { margin: 0; }

.cmp-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 600;
  overflow: hidden;
  border-radius: var(--r-l);
  border: 1px solid var(--ligne);
  background: #fff;
  box-shadow: var(--ombre);
  touch-action: pan-y;
  isolation: isolate;
}

/* pastilles « Avant » / « Après » en verre dépoli, posées sur la scène */
.cmp-tag {
  position: absolute;
  bottom: 14px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--encre);
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: var(--flou);
  backdrop-filter: var(--flou);
  border: 1px solid var(--verre-bord);
  box-shadow: 0 2px 10px rgba(20, 33, 43, .12);
  pointer-events: none;
}
.cmp-tag-before { left: 14px; }
.cmp-tag-after  { right: 14px; }

.cmp-stage {
  position: absolute;
  top: 0; left: 0;
  width: 1000px;
  height: 600px;
  transform-origin: 0 0;
  /* scale posé par main.js ; repli sans JS : */
  transform: scale(var(--scale, 1));
}

.layer {
  position: absolute;
  inset: 0;
}
.layer-after { clip-path: inset(0 0 0 var(--pos)); }

.cmp-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-y;
}
.cmp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 100vh; }
.cmp-range::-moz-range-thumb { width: 48px; height: 100vh; border: 0; }

.cmp-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--signal);
  z-index: 2;
  pointer-events: none;
}
.cmp-knob {
  position: absolute;
  top: 50%; left: 50%;
  width: 48px; height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: var(--flou);
  backdrop-filter: var(--flou);
  border: 2px solid var(--signal);
  color: var(--encre);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(20, 33, 43, .22), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.cmp-range:focus-visible ~ .cmp-handle .cmp-knob {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--encre), 0 0 0 9px var(--encre);
}


/* ---------- Maquette AVANT : Windows 7 ---------- */

.w7 {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #F0F0F0;
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
  font-size: 11px;
  color: #000;
  border: 1px solid #6D8DB8;
}
.w7-title {
  height: 30px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 0 8px;
  background: linear-gradient(to bottom, #DCE8F7 0%, #C3D6EF 45%, #A9C3E6 50%, #BCD2EE 100%);
  border-bottom: 1px solid #8DA8CC;
  font-size: 12px;
  color: #1E1E1E;
}
.w7-title-icon {
  width: 16px; height: 16px;
  background: linear-gradient(135deg, #7BA05B, #3F6B2A);
  border: 1px solid #2F5020;
}
.w7-title-text { flex: 1; text-shadow: 0 0 6px #fff; }
.w7-ctrls { display: flex; align-self: flex-start; }
.w7-ctrl {
  display: grid;
  place-items: center;
  width: 28px; height: 19px;
  font-size: 10px;
  color: #2A3A52;
  background: linear-gradient(#EEF3FA, #C9D7EA);
  border: 1px solid #7A93B8;
  border-top: 0;
  margin-left: -1px;
}
.w7-ctrls .w7-close {
  width: 46px;
  color: #fff;
  font-weight: bold;
  background: linear-gradient(#E8A093, #C94B36 50%, #B83A25 51%, #D56A50);
  border-color: #8A2B1C;
}
.w7-menu {
  flex: none;
  display: flex;
  gap: 2px;
  padding: 2px 4px;
  background: #F0F0F0;
  border-bottom: 1px solid #D4D0C8;
}
.w7-menu span { padding: 2px 7px; }

.w7-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  background: #ECE9D8;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #A0A0A0;
}
.w7-tool {
  position: relative;
  width: 24px; height: 22px;
  background: #D4D0C8;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: inset -1px -1px 0 #A0A0A0;
}
.w7-tool::after {
  content: "";
  position: absolute;
  inset: 5px 6px;
  background: #8A8A8A;
}
.w7-tool.t1::after { background: #F2F2F2; border: 1px solid #707070; inset: 4px 7px; }
.w7-tool.t2::after { background: #C8A43A; inset: 6px 5px 5px; }
.w7-tool.t3::after { background: #3E6FB0; inset: 5px 6px; }
.w7-tool.t4::after { background: none; border: 2px solid #6B6B6B; border-radius: 50%; inset: 4px 6px 6px; }
.w7-tool.t5::after { background: #707070; inset: 9px 4px; }
.w7-tool.t6::after { background: #B03A2E; inset: 6px 7px; }
.w7-tool.t7::after { background: #4E8A3C; inset: 5px 8px; }
.w7-tool.t8::after { background: #707070; inset: 6px 9px; }
.w7-sep { width: 2px; height: 22px; border-left: 1px solid #A0A0A0; border-right: 1px solid #fff; margin: 0 3px; }

.w7-grid {
  flex: 1;
  margin: 4px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  box-shadow: inset 1px 1px 0 #404040;
  overflow: hidden;
  /* grille de cellules vides sous les données */
  background-image:
    linear-gradient(#E4E4E4 1px, transparent 1px),
    linear-gradient(90deg, #E4E4E4 1px, transparent 1px);
  background-size: 100% 20px, 100% 100%;
}
.w7-grid table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  background: #fff;
}
.w7-grid th {
  height: 20px;
  padding: 0 5px;
  text-align: left;
  font-weight: normal;
  background: #D4D0C8;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  white-space: nowrap;
}
.w7-grid th:nth-child(1) { width: 96px; }
.w7-grid th:nth-child(2) { width: 280px; }
.w7-grid th:nth-child(3) { width: 60px; }
.w7-grid th:nth-child(4) { width: 80px; }
.w7-grid td {
  height: 20px;
  padding: 0 5px;
  border-right: 1px solid #D8D8D8;
  border-bottom: 1px solid #D8D8D8;
  white-space: nowrap;
  overflow: hidden;
}
.w7-grid tbody tr:nth-child(even) td { background: #EDEDED; }
.w7-grid tbody tr:nth-child(3) td { background: #316AC5; color: #fff; }
.w7-grid td.n { text-align: right; }

.w7-status {
  flex: none;
  display: flex;
  height: 22px;
  padding: 2px;
  gap: 2px;
  background: #F0F0F0;
  border-top: 1px solid #A0A0A0;
}
.w7-status span {
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
}
.w7-status span:first-child { width: 90px; }
.w7-status span:nth-child(2) { flex: 1; }

/* voile « Ne répond pas » */
.w7-hang {
  position: absolute;
  inset: 30px 0 0;
  background: rgba(255, 255, 255, .35);
}

.w7-dialog {
  position: absolute;
  left: 318px;
  top: 214px;
  width: 360px;
  background: #F0F0F0;
  border: 1px solid #5A7EAE;
  box-shadow: 4px 6px 18px rgba(0, 0, 0, .35);
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif;
  font-size: 12px;
  color: #000;
}
.w7-dialog-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 26px;
  padding-left: 8px;
  background: linear-gradient(to bottom, #DCE8F7 0%, #C3D6EF 45%, #A9C3E6 50%, #BCD2EE 100%);
  border-bottom: 1px solid #8DA8CC;
}
.w7-dialog-title .w7-close {
  align-self: flex-start;
  width: 40px; height: 18px;
  color: #fff;
  font-weight: bold;
  background: linear-gradient(#E8A093, #C94B36 50%, #B83A25 51%, #D56A50);
  border: 1px solid #8A2B1C;
  border-top: 0;
}
.w7-dialog-body {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 22px 18px 20px;
  background: #fff;
}
.w7-dialog-body p { line-height: 1.5; }
.w7-err-icon {
  flex: none;
  position: relative;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F4735F, #C8191A 60%, #9C0E0F);
  border: 1px solid #7A0B0B;
}
.w7-err-icon::before, .w7-err-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 3px;
  margin: -1.5px 0 0 -8px;
  background: #fff;
  border-radius: 1px;
  transform: rotate(45deg);
}
.w7-err-icon::after { transform: rotate(-45deg); }
.w7-dialog-foot {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  border-top: 1px solid #DFDFDF;
}
.w7-btn {
  display: grid;
  place-items: center;
  width: 76px; height: 23px;
  background: linear-gradient(#F6F6F6, #DDDDDD);
  border: 1px solid #3C7FB1;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #BDE0F7;
}

/* ---------- Maquette APRÈS : application moderne ---------- */

.app {
  position: absolute;
  inset: 0;
  display: flex;
  background: #fff;
  font-family: var(--font);
  font-size: 13px;
  color: var(--encre);
}
.app-side {
  flex: none;
  width: 176px;
  padding: 22px 0;
  border-right: 1px solid var(--ligne);
  background: #FAFBFA;
}
.app-brand {
  padding: 0 20px 22px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.app-nav { display: flex; flex-direction: column; }
.app-nav { padding: 0 10px; gap: 2px; }
.app-nav span {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--acier);
}
.app-nav .is-active {
  color: var(--encre);
  font-weight: 500;
  background: #E9ECEA;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 20px 32px;
}
.app-top { display: flex; justify-content: flex-end; }
.app-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 340px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--ligne);
  border-radius: 10px;
  background: #F6F7F6;
  color: var(--acier);
}
.app-search-text { color: var(--encre); }
.app-search-ph { position: absolute; left: 34px; }
.app-search-text:not(:empty) ~ .app-search-ph { display: none; }
.app-caret {
  display: none;
  width: 1px; height: 16px;
  margin-left: -7px;
  background: var(--encre);
}
.app-search.is-typing { border-color: var(--encre); }
.app-search.is-typing .app-caret { display: block; }
.app-search.is-typing .app-search-ph { display: none; }

.app-kpis {
  display: flex;
  gap: 40px;
  padding: 18px 0 16px;
  color: var(--acier);
}
.app-kpis b { color: var(--encre); font-weight: 600; font-size: 15px; margin-right: 2px; }

.app-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.app-table th {
  height: 32px;
  padding: 0 10px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--acier);
  border-bottom: 1px solid var(--ligne);
}
.app-table th:nth-child(1) { width: 100px; }
.app-table th:nth-child(2) { width: 214px; }
.app-table th:nth-child(3) { width: 56px; }
.app-table th:nth-child(4) { width: 78px; }
.app-table th:nth-child(5) { width: 104px; }
.app-table td {
  height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid #ECEEEF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-table td:first-child { color: var(--acier); font-variant-numeric: tabular-nums; }
.app-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.app-table td:nth-child(4), .app-table td:nth-child(5) { color: var(--acier); }
.app-table tr[hidden] { display: none; }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.pill.ok  { background: #E2F0E4; color: #1D5A2C; }
.pill.low { background: #FBEFCF; color: #704600; }
.pill.out { background: #F8E0DD; color: #8C2820; }

/* ==========================================================================
   Méthode
   ========================================================================== */

/* ==========================================================================
   Sécurité
   ========================================================================== */

.security { padding-bottom: clamp(72px, 10vw, 128px); }
.security-panel {
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-l);
  background: var(--encre);
  color: var(--fond);
  /* contour « alerte » : jaune signalisation */
  border: 2px solid var(--signal);
  box-shadow: 0 0 0 6px rgba(242, 183, 5, .18);
}
.security h2 {
  font-size: clamp(1.7rem, 1.1rem + 2vw, 2.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.security h2 { max-width: 22ch; }
.security-intro p { margin-top: 18px; color: #C3CBD1; max-width: 60ch; font-size: 1.1rem; }

/* ==========================================================================
   Méthode
   ========================================================================== */

.method {
  padding-bottom: clamp(72px, 10vw, 128px);
}
.method h2, .contact h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: var(--r-l);
  background: var(--verre);
  border: 1px solid var(--verre-bord);
  box-shadow: var(--ombre);
  overflow: hidden;
}
.steps li { padding: 32px 32px 36px; }
.steps li + li { border-left: 1px solid var(--ligne); }
.step-n {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--encre);
  color: var(--fond);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 22px;
}
.steps h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
}
.steps p { color: var(--acier); max-width: 36ch; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact { padding-bottom: clamp(72px, 10vw, 128px); }
.contact-panel {
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--r-l);
  background: #fff;
  border: 1px solid var(--verre-bord);
  box-shadow: var(--ombre);
}
.contact-panel > p { margin-top: 18px; max-width: 52ch; font-size: 1.15rem; }
.contact .btn { margin-top: 32px; }
.contact .contact-alt {
  margin-top: 20px;
  font-size: 1rem;
  color: var(--acier);
  white-space: pre-wrap;
}
.contact-alt a { color: var(--encre); text-underline-offset: 3px; }

/* ==========================================================================
   Pied de page
   ========================================================================== */

.site-footer {
  padding-top: 28px;
  padding-bottom: 40px;
  border-top: 1px solid var(--ligne);
  font-size: 0.92rem;
  color: var(--acier);
}
.footer-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
}
.footer-brand { color: var(--encre); font-weight: 600; }
.footer-line a { color: var(--acier); text-underline-offset: 3px; }
.footer-note { margin-top: 10px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { padding: 24px 22px 26px; }
  .steps li + li { border-left: 0; border-top: 1px solid var(--ligne); }
  .step-n { margin-bottom: 14px; }
}

@media (max-width: 480px) {
  .lead, .contact-panel > p { font-size: 1.05rem; }
  .cmp-frame { border-radius: var(--r-m); }
  .cmp-knob { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
  .cmp-tag { bottom: 8px; padding: 3px 9px; font-size: 0.72rem; }
  .cmp-tag-before { left: 8px; }
  .cmp-tag-after  { right: 8px; }
  .btn { width: 100%; justify-content: center; }
}
