/* ============ Zipetto — identité ============
   Navy   #0A2A33  fond sombre
   Teal   #0B7A8C  primaire
   Sea    #0FA394  secondaire
   Mint   #17C3A6  accent
   Ice    #EAF5F3  fond clair
   Ink    #16323A  texte
============================================ */
:root {
  --navy: #0A2A33;
  --navy2: #103A45;
  --teal: #0B7A8C;
  --sea: #0FA394;
  --mint: #17C3A6;
  --ice: #EAF5F3;
  --card: #F4FAF9;
  --ink: #16323A;
  --mute: #5E7880;
  --line: #D8ECE8;
  --coral: #E4572E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  background: var(--navy);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.logo { width: 34px; height: 34px; }
.logo.small { width: 22px; height: 22px; vertical-align: -5px; margin-right: 4px; }
.brand-name { font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: 0.3px; }
.site-nav { display: flex; gap: 1.2rem; margin-left: auto; }
.site-nav a { color: #BFE0DB; text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.site-nav a:hover { color: var(--mint); }
.local-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--mint); color: var(--navy);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.5px;
  padding: 0.3rem 0.7rem; border-radius: 99px; white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--navy);
  color: #fff;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 5vw, 4rem) clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  background-image: radial-gradient(circle at 85% 15%, rgba(11,122,140,.45), transparent 40%),
                    radial-gradient(circle at 10% 90%, rgba(15,163,148,.3), transparent 45%);
}
.hero h1 { font-size: clamp(1.6rem, 4.2vw, 2.7rem); font-weight: 800; line-height: 1.25; max-width: 900px; margin: 0 auto; }
.hero .accent { color: var(--mint); }
.hero-sub { max-width: 640px; margin: 1.2rem auto 0; color: #C9E2DD; font-size: clamp(0.95rem, 1.6vw, 1.1rem); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1.6rem; }
.hero-badges span {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: #E5F3F0; padding: 0.35rem 0.85rem; border-radius: 99px; font-size: 0.85rem; font-weight: 600;
}

/* ---------- Tools grid ---------- */
.tools-section { padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 5vw, 4rem); max-width: 1200px; margin: 0 auto; }
.tools-section h2, .why-section h2, .faq-section h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 1.4rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.tool-card {
  display: flex; flex-direction: column; gap: 0.5rem; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.2rem 1.2rem 1.1rem; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  font: inherit; color: inherit;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(10,42,51,0.10); border-color: var(--sea); }
.tool-card .tc-icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--teal); color: #fff; flex-shrink: 0;
}
.tool-card:nth-child(even) .tc-icon { background: var(--sea); }
.tool-card h3 { font-size: 1.02rem; font-weight: 700; }
.tool-card p { font-size: 0.86rem; color: var(--mute); }

/* ---------- Why ---------- */
.why-section { background: var(--ice); padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 5vw, 4rem); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; max-width: 1200px; margin: 0 auto; }
.why-section h2 { max-width: 1200px; margin-left: auto; margin-right: auto; }
.why-grid article { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem; }
.why-grid h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.why-grid p { font-size: 0.92rem; color: var(--mute); }
.why-grid strong { color: var(--teal); }

/* ---------- FAQ ---------- */
.faq-section { padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 5vw, 4rem); max-width: 860px; margin: 0 auto; }
.faq-section details { border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1.1rem; margin-bottom: 0.7rem; background: var(--card); }
.faq-section summary { font-weight: 700; cursor: pointer; }
.faq-section details p { margin-top: 0.6rem; color: var(--mute); font-size: 0.94rem; }

/* ---------- Tool view ---------- */
.hidden { display: none !important; }
#view-tool { max-width: 860px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2rem) 3rem; }
.back-btn {
  background: none; border: none; color: var(--teal); font-weight: 700; font-size: 0.95rem;
  cursor: pointer; padding: 0.4rem 0; margin-bottom: 0.6rem; font-family: inherit;
}
.back-btn:hover { text-decoration: underline; }
.tool-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.2rem, 3vw, 2rem); box-shadow: 0 6px 24px rgba(10,42,51,0.06); }
.tool-head h2 { font-size: 1.45rem; font-weight: 800; }
.tool-head p { color: var(--mute); font-size: 0.95rem; margin-top: 0.25rem; }

.dropzone {
  margin-top: 1.2rem; border: 2px dashed var(--sea); border-radius: 14px;
  background: var(--card); color: var(--teal);
  padding: 2.2rem 1rem; text-align: center; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.dropzone:hover, .dropzone.dragover { background: #E2F4F0; border-color: var(--mint); }
.dropzone p { color: var(--ink); margin-top: 0.6rem; }
.dropzone .dz-hint { color: var(--mute); font-size: 0.84rem; margin-top: 0.2rem; }

.tool-options { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.1rem; }
.opt { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.86rem; font-weight: 700; color: var(--ink); }
.opt select, .opt input[type="range"] { font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 150px; }
.opt .range-row { display: flex; align-items: center; gap: 0.6rem; }
.opt output { font-weight: 800; color: var(--teal); min-width: 42px; }

.primary-btn {
  margin-top: 1.2rem; width: 100%;
  background: var(--teal); color: #fff; border: none; border-radius: 12px;
  font-size: 1.05rem; font-weight: 800; font-family: inherit;
  padding: 0.85rem; cursor: pointer; transition: background .12s ease;
}
.primary-btn:hover { background: #0A6B7B; }
.primary-btn:disabled { background: #9DBFC6; cursor: default; }

.secondary-btn {
  background: var(--navy); color: #fff; border: none; border-radius: 10px;
  font-size: 0.92rem; font-weight: 700; font-family: inherit;
  padding: 0.6rem 1.1rem; cursor: pointer;
}
.secondary-btn:hover { background: var(--navy2); }

/* ---------- Results ---------- */
.results { margin-top: 1.2rem; display: flex; flex-direction: column; gap: 0.55rem; }
.result-row {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  padding: 0.65rem 0.9rem; font-size: 0.9rem;
}
.result-row .r-name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-row .r-meta { color: var(--mute); white-space: nowrap; }
.result-row .r-saving { color: var(--sea); font-weight: 800; white-space: nowrap; }
.result-row .r-status { color: var(--mute); font-style: italic; }
.result-row .r-error { color: var(--coral); font-weight: 600; }
.result-row a.dl {
  background: var(--sea); color: #fff; text-decoration: none; font-weight: 700;
  padding: 0.4rem 0.9rem; border-radius: 8px; font-size: 0.85rem; white-space: nowrap;
}
.result-row a.dl:hover { background: var(--mint); color: var(--navy); }
.results-footer { margin-top: 0.9rem; text-align: right; }
.tool-privacy { text-align: center; color: var(--mute); font-size: 0.85rem; margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy); color: #BFE0DB;
  display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between; align-items: center;
  padding: 1.3rem clamp(1rem, 4vw, 3rem); font-size: 0.88rem; margin-top: 2rem;
}
.site-footer strong { color: #fff; }
.footer-links a { color: #BFE0DB; }

@media (max-width: 640px) {
  .site-nav { display: none; }
  .local-badge { margin-left: auto; }
}

/* ---------- Options avancées & progression ---------- */
.opt .num { font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; width: 90px; }
.opt .unit { min-width: 64px !important; }
.opt .unit-label { font-weight: 800; color: var(--mute); }
.opt-check { flex-direction: row !important; align-items: center; gap: 0.45rem !important; font-weight: 700; }
.opt-check input { width: 17px; height: 17px; accent-color: var(--teal); }
.r-bar { flex: 0 0 130px; height: 8px; background: #DCEBE8; border-radius: 99px; overflow: hidden; }
.r-bar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--mint)); border-radius: 99px; transition: width .25s ease; }
.total-line { font-weight: 800; color: var(--sea); margin-right: 1rem; }
.results-footer { display: flex; align-items: center; justify-content: flex-end; }
.results-footer.hidden { display: none; }


/* ---------- SEO pages & internal links ---------- */
.popular-section {
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 5vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}
.popular-section h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 1.1rem; }
.popular-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.popular-links a {
  display: block; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); text-decoration: none; font-weight: 700;
}
.popular-links a:hover { border-color: var(--sea); color: var(--teal); }
.route-intro, .tool-seo-content, .legal-page {
  max-width: 980px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 5vw, 4rem);
}
.route-intro { background: #fff; }
.route-intro .eyebrow { color: var(--teal); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; margin-bottom: .4rem; }
.route-intro h1, .tool-seo-content h2, .legal-page h1 { font-size: clamp(1.65rem, 4vw, 2.4rem); line-height: 1.2; margin-bottom: .85rem; color: var(--navy); }
.route-intro p, .tool-seo-content p, .legal-page p { color: var(--mute); margin-bottom: 1rem; }
.route-intro ol { margin: 1rem 0 1.25rem 1.4rem; color: var(--ink); }
.route-intro li { margin-bottom: .35rem; }
.route-faq { display: grid; gap: .6rem; margin-top: 1rem; }
.tool-seo-content { border-top: 1px solid var(--line); }
.legal-page h2 { margin-top: 1.6rem; margin-bottom: .5rem; color: var(--navy); }
.legal-page { min-height: 55vh; }
.ad-note { font-size: .85rem; color: var(--mute); text-align: center; }
