/* ═══════════════════════════════════════════════
   EcoFactures — Feuille de style principale
   DDV IT-Solutions 2026
═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size:18px; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px; color: #1a2340; background: #fff; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

:root {
  --navy:  #1a2340;
  --teal:  #2ec4b6;
  --teal2: #26a69a;
  --green: #3ab54a;
  --light: #e8f7f5;
  --light2:#f0faf9;
  --muted: #5a6a8a;
  --red:   #e74c3c;
  --amber: #f39c12;
  --border:#d0e0dd;
}

/* ── TOPBAR ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 2rem; height: auto;
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.topbar-logo { display: flex; align-items: center; cursor: pointer; }
.topbar-logo img { height: 80px; width: auto; display: block; margin: 0;}
.topbar-logo .logo-fallback {
  font-size: 20px; font-weight: 700; color: var(--navy); letter-spacing: -0.5px;
}
.topbar-logo .logo-fallback em { color: var(--teal); font-style: normal; }

/* ── NAVBAR ── */
.navbar {
  background: var(--navy);
  display: flex; justify-content: center; gap: 8px; padding: 12px 2rem;
  position: sticky;
  top: 0;
  z-index: 99;
}
.nav-btn {
  background: transparent; border: 1.5px solid var(--teal);
  color: #fff; border-radius: 6px; padding: 7px 22px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .18s, color .18s; font-family: inherit;
  text-decoration: none; display: inline-block;
}
.nav-btn:hover, .nav-btn.active { background: var(--teal); color: var(--navy); }

/* ── HERO ── */
.hero {
  background: var(--light); text-align: center;
  padding: 3.5rem 2rem 2.5rem;
  border-bottom: 1px solid #cce8e4;
}
.hero h1 { font-size: 2rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; line-height: 1.3; }
.hero h1 .accent { color: var(--green); display: block; }
.hero p { font-size: 1rem; color: var(--muted); max-width: 580px; margin: 0 auto; line-height: 1.65; }

/* ── FORM SECTION ── */
.form-section { max-width: 680px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }
.form-section h2 {
  text-align: center; font-size: 20px; font-weight: 700; color: var(--teal);
  margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.form-sub { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 1.5rem; }
.form-sub strong { color: var(--navy); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field label .req { color: var(--red); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: 7px;
  padding: 11px 14px; font-size: 14px; font-family: inherit;
  color: var(--navy); background: #fff; outline: none;
  transition: border-color .18s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal); box-shadow: 0 0 0 3px #2ec4b618;
}
.field textarea { resize: vertical; min-height: 90px; }
.field.error input, .field.error select { border-color: var(--red); }
.field .err-msg { font-size: 11px; color: var(--red); margin-top: 3px; display: none; }
.field.error .err-msg { display: block; }

/* Row 2 cols */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── DROPZONE ── */
.dropzone {
  border: 2px dashed var(--teal); border-radius: 8px;
  padding: 20px 16px; text-align: center; cursor: pointer;
  background: var(--light2); font-size: 14px; font-weight: 500;
  color: #1a7a72; transition: background .18s; margin-bottom: 12px;
  position: relative;
}
.dropzone:hover, .dropzone.over { background: #cdeee9; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone-ico { font-size: 24px; margin-bottom: 6px; }
.dropzone-sub { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* ── FILE LIST ── */
.file-list { margin-bottom: 10px; }
.file-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--light); border-radius: 7px; padding: 8px 11px;
  margin-bottom: 6px; font-size: 12px;
}
.file-ext { background: var(--navy); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 3px; flex-shrink: 0; }
.file-name { flex: 1; color: var(--navy); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); flex-shrink: 0; }
.file-enc { font-size: 10px; background: #2ec4b622; color: #1a7a72; padding: 2px 7px; border-radius: 4px; flex-shrink: 0; }
.file-del { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; margin-left: auto; flex-shrink: 0; padding: 0 2px; }
.file-del:hover { color: var(--red); }

/* ── NOTES ── */
.note {
  display: flex; align-items: flex-start; gap: 9px;
  border-radius: 7px; padding: 10px 13px; font-size: 12px; margin-bottom: 10px;
}
.note-sec { background: var(--light); border: 1px solid #9fdfd9; color: #1a5c56; }
.note-del { background: #fff8ed; border: 1px solid #f5d08a; color: #7a5000; }
.note-ico { flex-shrink: 0; font-size: 15px; margin-top: 1px; }

/* ── RGPD ── */
.rgpd-row {
  display: flex; align-items: flex-start; gap: 9px;
  margin-bottom: 14px; font-size: 12px; color: var(--muted);
}
.rgpd-row input[type=checkbox] { margin-top: 3px; accent-color: var(--teal); flex-shrink: 0; }
.rgpd-row a { color: var(--teal); text-decoration: underline; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 8px; padding: 12px 24px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .18s, transform .1s; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-navy { background: var(--navy); color: #fff; width: 100%; }
.btn-navy:hover { background: #253060; }
.btn-teal { background: var(--teal); color: var(--navy); }
.btn-teal:hover { background: var(--teal2); }
.btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--light); }

/* ── SUCCESS BOX ── */
.success-box { text-align: center; padding: 2.5rem 1rem; display: none; }
.success-box.show { display: block; }
.success-ico { width: 64px; height: 64px; background: var(--light); border-radius: 50%; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.success-box h3 { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.success-box p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 6px; }
.success-ref { font-weight: 700; color: var(--navy); font-size: 14px; }
.success-note { font-size: 11px; color: #aaa; margin-bottom: 1.5rem; }

/* ── FLASH MESSAGES ── */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 1rem; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.flash-success { background: var(--light); border: 1px solid #9fdfd9; color: #0a6b63; }
.flash-error { background: #FCEBEB; border: 1px solid #f5a9a9; color: #a32d2d; }

/* ── MISSION PAGE ── */
.mission-hero { background: var(--light); text-align: center; padding: 2.5rem 2rem; border-bottom: 1px solid #cce8e4; }
.mission-hero .mico { font-size: 52px; margin-bottom: 10px; }
.mission-hero h1 { font-size: 26px; font-weight: 700; color: var(--navy); }
.mission-body { max-width: 860px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }
.mission-intro { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 2.5rem; line-height: 1.7; }
.mission-intro strong { color: var(--navy); }
.mission-block { margin-bottom: 2.5rem; }
.mission-block h2 { font-size: 18px; font-weight: 700; color: var(--teal); margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.mission-block p { font-size: 14px; color: var(--muted); margin-bottom: 8px; line-height: 1.65; }
.mission-list { list-style: none; padding: 0; }
.mission-list li { font-size: 14px; color: var(--muted); padding: 4px 0 4px 20px; position: relative; }
.mission-list li::before { content: ''; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.mission-cta { background: var(--teal); color: var(--navy); border-radius: 8px; padding: 14px 20px; font-size: 13px; font-weight: 700; text-align: center; }

/* ── CONTACT PAGE ── */
.page-wrap { background: var(--light); min-height: calc(100vh - 110px); display: flex; align-items: flex-start; justify-content: center; padding: 3rem 1.5rem; }
.contact-card { background: #fff; border-radius: 12px; border: 1px solid var(--border); padding: 2.5rem; width: 100%; max-width: 520px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--navy); text-align: center; margin-bottom: 8px; }
.page-sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 1.75rem; line-height: 1.55; }

/* ── MENTIONS PAGE ── */
.mentions-wrap { background: var(--light); min-height: calc(100vh - 110px); padding: 3rem 1.5rem; }
.mentions-body { max-width: 880px; margin: 0 auto; }
.mentions-section { margin-bottom: 2rem; }
.mentions-section:last-child { margin-bottom: 0; }
.mentions-section h2 { font-size: 15px; font-weight: 700; color: var(--teal); margin-bottom: 8px; }
.mentions-section p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.mentions-section p + p { margin-top: 6px; }
.mentions-section a { color: var(--teal); text-decoration: underline; }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ── FOOTER ── */
.footer { background: var(--navy); color: #8a9bbf; text-align: center; padding: 16px 2rem; font-size: 12px; }
.footer a { color: #8a9bbf; text-decoration: underline; margin: 0 6px; }
.footer a:hover { color: var(--teal); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .topbar { padding: 0 1rem; }
  .navbar { flex-wrap: wrap; gap: 6px; padding: 8px 1rem; }
  .nav-btn { padding: 6px 14px; font-size: 12px; }
  .hero h1 { font-size: 22px; }
  .row-2 { grid-template-columns: 1fr; }
  .form-section { padding: 1.5rem 1rem 2rem; }
}
