/* ============================================================
   DMS — Drone Multi Services · Design system
   Palette : anthracite profond + turquoise Caraïbe + sable clair
   ============================================================ */
:root {
  --bg: #f7f9fa;
  --bg-alt: #ffffff;
  --dark: #0e1b24;
  --dark-2: #14283a;
  --accent: #00b4c5;
  --accent-2: #ffb347;
  --text: #20313e;
  --text-soft: #5d7282;
  --line: #e2e9ed;
  --radius: 14px;
  --shadow: 0 6px 30px rgba(14, 27, 36, .08);
  --shadow-lg: 0 14px 50px rgba(14, 27, 36, .16);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; color: var(--dark); }
.container { width: min(1140px, 92%); margin: 0 auto; }
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head .kicker { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 8px 0 12px; }
.section-head p { color: var(--text-soft); }

/* ---------- Boutons ---------- */
.btn { display: inline-block; padding: 13px 28px; border-radius: 999px; font-weight: 700;
  border: 2px solid transparent; cursor: pointer; transition: .2s; font-size: .95rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #00929f; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-2); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .85rem; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 60; background: rgba(14,27,36,.92);
  backdrop-filter: blur(10px); color: #fff;
}
header.site .bar { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: #fff; letter-spacing: .02em; }
.logo .mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #006d8f);
  display: grid; place-items: center; font-size: 1.05rem; color: #fff; }
.logo small { display: block; font-size: .62rem; font-weight: 500; color: #9fb6c5; letter-spacing: .14em; text-transform: uppercase; }
nav.main { display: flex; gap: 26px; align-items: center; }
nav.main a { color: #d7e3ea; font-weight: 600; font-size: .92rem; }
nav.main a:hover, nav.main a.active { color: var(--accent); }
nav.main .btn { margin-left: 6px; }
#nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.7rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { background:
    radial-gradient(900px 420px at 80% -10%, rgba(0,180,197,.35), transparent 60%),
    linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 60%, #0d3b4a 100%);
  color: #fff; padding: 110px 0 96px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.3rem); max-width: 760px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.lead { color: #b9cad6; font-size: 1.15rem; max-width: 620px; margin: 18px 0 32px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .badges { margin-top: 44px; display: flex; gap: 26px; flex-wrap: wrap; color: #9fb6c5; font-size: .85rem; }
.hero .badges b { color: #fff; }

/* ---------- Cards pôles / services ---------- */
.grid { display: grid; gap: 26px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .icon { font-size: 2rem; width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(0,180,197,.14), rgba(0,180,197,.04)); margin-bottom: 18px; }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--text-soft); font-size: .95rem; }
.card ul { margin: 14px 0 0 18px; color: var(--text-soft); font-size: .92rem; }
.card .price { margin-top: 16px; font-weight: 800; color: var(--dark); }
.card .price span { color: var(--accent); font-size: 1.25rem; }
.card .btn { margin-top: 18px; }

/* ---------- Portfolio ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.filters button { padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-weight: 600; font-size: .88rem; color: var(--text-soft); cursor: pointer; transition: .15s; }
.filters button.active, .filters button:hover { background: var(--dark); border-color: var(--dark); color: #fff; }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pf-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; cursor: pointer; }
.pf-item .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.92);
  font-weight: 700; text-align: center; padding: 14px; font-size: 1rem; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.pf-item .tag { position: absolute; top: 12px; left: 12px; background: rgba(14,27,36,.78); color: #fff;
  padding: 4px 12px; font-size: .72rem; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase; }
.pf-item:hover .ph { transform: scale(1.04); transition: .3s; }

/* placeholders dégradés (à remplacer par de vraies photos) */
.g1 { background: linear-gradient(135deg,#0c4a6e,#06b6d4); } .g2 { background: linear-gradient(135deg,#134e4a,#34d399); }
.g3 { background: linear-gradient(135deg,#7c2d12,#fb923c); } .g4 { background: linear-gradient(135deg,#1e1b4b,#818cf8); }
.g5 { background: linear-gradient(135deg,#831843,#f472b6); } .g6 { background: linear-gradient(135deg,#14283a,#64748b); }
.g7 { background: linear-gradient(135deg,#0a3d62,#60a5fa); } .g8 { background: linear-gradient(135deg,#3f6212,#a3e635); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(10,18,24,.92); z-index: 100; display: none;
  place-items: center; padding: 4vw; }
.lightbox.open { display: grid; }
.lightbox .frame { width: min(880px, 94vw); aspect-ratio: 16/10; border-radius: var(--radius); position: relative; overflow: hidden; }
.lightbox .frame .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.3rem; font-weight: 700; }
.lightbox .close { position: absolute; top: 22px; right: 30px; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer; }
.lightbox figcaption { color: #b9cad6; text-align: center; margin-top: 14px; }

/* ---------- Boutique ---------- */
.product { display: flex; flex-direction: column; }
.product .visual { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.product .visual .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.9); font-weight: 700; padding: 12px; text-align: center; }
.product .visual::after { content: "© DMS — aperçu"; position: absolute; inset: 0; display: grid; place-items: center;
  color: rgba(255,255,255,.4); font-size: 1.5rem; font-weight: 800; transform: rotate(-22deg); pointer-events: none; letter-spacing: .1em; }
.product select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; font-family: inherit;
  font-size: .92rem; color: var(--text); background: #fff; margin: 12px 0; }
.product .row { display: flex; justify-content: space-between; align-items: center; }
.product .prix { font-size: 1.35rem; font-weight: 800; color: var(--dark); }
.licences-info { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; margin-bottom: 44px; }
.licences-info h3 { margin-bottom: 10px; }
.licences-info ul { margin-left: 20px; color: var(--text-soft); font-size: .94rem; }

/* ---------- Témoignages ---------- */
.quote { background: var(--bg-alt); border-left: 4px solid var(--accent); padding: 24px 26px; border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow); }
.quote p { font-style: italic; color: var(--text); }
.quote footer { margin-top: 14px; font-weight: 700; color: var(--dark); font-size: .9rem; }

/* ---------- Formulaire ---------- */
form.devis { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px; box-shadow: var(--shadow); display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
form.devis .full { grid-column: 1 / -1; }
form.devis label { font-weight: 700; font-size: .86rem; color: var(--dark); display: block; margin-bottom: 6px; }
form.devis input, form.devis select, form.devis textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 9px; font-family: inherit; font-size: .95rem; color: var(--text); background: #fff; }
form.devis input:focus, form.devis select:focus, form.devis textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
form.devis textarea { min-height: 130px; resize: vertical; }
#devis-status { grid-column: 1 / -1; font-weight: 600; display: none; padding: 14px; border-radius: 9px; }
#devis-status.ok { display: block; background: #e7f8f0; color: #0a7a4b; }
#devis-status.err { display: block; background: #fdeeee; color: #b03030; }

/* ---------- Bandeau CTA ---------- */
.cta-band { background: linear-gradient(120deg, var(--dark), #0d3b4a); border-radius: var(--radius);
  color: #fff; padding: 54px; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: #b9cad6; margin-bottom: 26px; }

/* ---------- Footer ---------- */
footer.site { background: var(--dark); color: #9fb6c5; padding: 56px 0 28px; margin-top: 40px; font-size: .92rem; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 38px; }
footer.site h4 { color: #fff; margin-bottom: 14px; font-size: 1rem; }
footer.site a { color: #9fb6c5; display: block; margin-bottom: 8px; }
footer.site a:hover { color: var(--accent); }
footer.site .legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; text-align: center; font-size: .8rem; }

/* ---------- Widget DEMS ---------- */
#dems-fab { position: fixed; bottom: 26px; right: 26px; z-index: 90; width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #006d8f); color: #fff; border: 0; font-size: 1.7rem; cursor: pointer;
  box-shadow: var(--shadow-lg); transition: .2s; }
#dems-fab:hover { transform: scale(1.08); }
#dems-panel { position: fixed; bottom: 102px; right: 26px; z-index: 90; width: min(360px, calc(100vw - 40px));
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); display: none; overflow: hidden; }
#dems-panel.open { display: block; }
#dems-panel .head { background: var(--dark); color: #fff; padding: 18px 20px; }
#dems-panel .head b { display: block; }
#dems-panel .head span { font-size: .8rem; color: #9fb6c5; }
#dems-panel .body { padding: 20px; }
#dems-panel .body p { font-size: .9rem; color: var(--text-soft); margin-bottom: 16px; }
#dems-panel .tg { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
#dems-chat { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
#dems-msgs { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
#dems-msgs .m { padding: 9px 13px; border-radius: 12px; font-size: .88rem; max-width: 85%; }
#dems-msgs .user { background: var(--accent); color: #fff; align-self: flex-end; }
#dems-msgs .bot { background: #eef3f6; color: var(--text); align-self: flex-start; }
#dems-form { display: flex; gap: 8px; }
#dems-form input { flex: 1; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .88rem; }
#dems-form button { border: 0; background: var(--dark); color: #fff; border-radius: 999px; padding: 0 18px; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  #nav-toggle { display: block; }
  nav.main { position: fixed; inset: 70px 0 auto 0; background: var(--dark); flex-direction: column;
    padding: 26px; display: none; }
  nav.main.open { display: flex; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .pf-grid { grid-template-columns: 1fr; }
  form.devis { grid-template-columns: 1fr; padding: 26px; }
  footer.site .cols { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}
