/* =========================================
   D.C Web — styles.css (clean full file)
   Système de design : variables, grilles, cartes
   ========================================= */

/* --------- Variables & Reset --------- */
:root{
  --bg: #ffffff;
  --bg-alt: #f9f9f9;
  --bg-accent: #0e1726;
  --text: #2c3e50;
  --muted: #6b7280;
  --primary: #F39C12;
  --primary-700: #d88401;
  --border: #e5e7eb;
  --shadow: 0 6px 22px rgba(0,0,0,.08);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --container: 1200px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; scroll-behavior:smooth; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  line-height:1.6;
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }
ul,ol{ margin:0; padding-left:1.2rem; }
h1,h2,h3,h4{ margin:0 0 .5rem 0; line-height:1.25; }

/* Focus visible accessible */
:focus-visible{ outline:3px solid var(--primary); outline-offset:2px; }

/* Containers & Sections */
.container{ max-width:var(--container); margin:0 auto; padding:0 20px; }
.section{ padding:72px 0; }
.section-muted{ background:var(--bg-alt); }
.section-accent{ background:linear-gradient(180deg,#0e1726 0%,#142033 100%); color:#fff; }
.section-header{ text-align:center; margin-bottom:32px; }
.section-header p{ color:var(--muted); }
.section-accent .section-header p{ color:#d1d5db; }

/* Skip link */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto;
  background:#fff; color:#000; padding:10px 14px; border-radius:8px; box-shadow:var(--shadow);
}

/* --------- Header & Nav --------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:#e0dfdf; box-shadow:0 2px 12px rgba(0,0,0,.06);
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; min-height:72px; }
.logo{ display:flex; align-items:center; gap:12px; }
.logo .imglogo{ height:110px; width:auto; }
.brand{ font-weight:700; letter-spacing:.3px; }

.main-nav ul{ display:flex; align-items:center; gap:10px; list-style:none; margin:0; padding:0; }
.main-nav a{
  display:inline-block; padding:10px 14px; border-radius:8px;
  color:#2C3E50; transition:background .2s ease, color .2s ease;
}
.main-nav a:hover{ background:var(--primary); color:#333; text-decoration:none; }
.main-nav a.is-active{ background:#1118270e; }
.main-nav a[aria-current="page"]{ font-weight:600; }

.hamburger{
  display:none; flex-direction:column; gap:5px; cursor:pointer; background:transparent; border:0;
}
.hamburger span{ width:26px; height:3px; background:#111827; border-radius:2px; display:block; }

/* Menu mobile */
#nav-menu{ display:flex; }
#nav-menu.is-open{
  position:absolute; left:0; right:0; top:100%;
  background:#e0dfdf; padding:12px 16px;
  display:flex; flex-direction:column; gap:6px; border-bottom:1px solid #00000010;
}

/* --------- HERO --------- */
.hero{
  position:relative; color:#fff;
  background:url('./image/pexels-fox-1595385.jpg') center/cover no-repeat;
}
.hero::before{ content:""; position:absolute; inset:0; background:rgba(0,0,0,.45); }
.hero-inner{
  position:relative; z-index:1;
  display:grid; grid-template-columns:1.1fr .9fr; gap:32px; align-items:center;
  min-height:520px;
}
.hero-content p{ color:#e5e7eb; max-width:60ch; }
.hero-ctas{ display:flex; gap:12px; margin-top:14px; }
.hero-media img{ border-radius:var(--radius-lg); box-shadow:var(--shadow); }

/* --------- Cards & Grids --------- */
.cards{ display:grid; gap:20px; }
.grid-2{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.grid-3{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.grid-4{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }

.card{
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:18px;
}
.section-accent .card{ background:#0f1a2b; border-color:#ffffff1a; color:#e5e7eb; }
.media-duo{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:10px 0 8px; }
.split{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* Listes stylées */
.list-check{ list-style:none; padding:0; margin:10px 0 0 0; }
.list-check li{ position:relative; padding-left:26px; margin:8px 0; color:var(--text); }
.section-accent .list-check li{ color:#dbe3f1; }
.list-check li::before{
  content:"✓"; position:absolute; left:0; top:0; color:var(--primary); font-weight:700;
}
.list-columns{ columns:2; gap:24px; list-style:disc; padding-left:1.1rem; color:#1f2937; }
.section-accent .list-columns{ color:#e5e7eb; }

/* Pricing simple */
.pricing{ list-style:none; padding:0; margin:0 0 8px 0; }
.pricing li{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; border:1px dashed #94a3b822; border-radius:10px; margin-bottom:8px; background:#fff;
}
.section-accent .pricing li{ background:#0f1a2b; border-color:#e5e7eb33; }

/* Steps */
.steps{ counter-reset:step; list-style:none; padding:0; margin:0; }
.steps li{ position:relative; padding-left:36px; margin:10px 0; color:#111827; }
.section-accent .steps li{ color:#dbe3f1; }
.steps li::before{
  counter-increment:step; content:counter(step);
  position:absolute; left:0; top:0; width:26px; height:26px; border-radius:50%;
  display:grid; place-items:center; background:var(--primary); color:#111827; font-weight:700;
}

/* Notes */
.note{ color:var(--muted); font-size:.95rem; margin-top:8px; }
.section-accent .note{ color:#cbd5e1; }

/* --------- Flyers: galerie & specs --------- */
.flyers-gallery{ margin-top:24px; }
.gallery{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.gallery img{ border-radius:12px; box-shadow:var(--shadow); }

.flyers-specs{ margin-top:20px; }
.flyers-specs .list-check li{ color:#fff; }

/* --------- Portfolio --------- */
.portfolio{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.portfolio-item{
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow); overflow:hidden; transition:transform .2s ease, box-shadow .2s ease;
}
.portfolio-item:hover{ transform:translateY(-4px); box-shadow:0 10px 26px rgba(0,0,0,.12); }
.portfolio-item img{ width:100%; height:auto; border-bottom:1px solid var(--border); }
.portfolio-content{ padding:16px; }
.portfolio-content p{ color:var(--muted); }
.portfolio-content .btn-ghost{ margin-top:6px; }

/* --------- Formulaires --------- */
.form{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.form-group{ display:flex; flex-direction:column; gap:6px; }
.form-wide{ grid-column:1 / -1; }
label{ font-weight:600; }
input, textarea, select{
  width:100%; padding:12px 12px; border:1px solid var(--border); border-radius:10px;
  background:#fff; color:var(--text); font-size:1rem;
}
input:focus, textarea:focus, select:focus{ border-color:var(--primary); outline:none; }
textarea{ min-height:120px; resize:vertical; }
.form-actions{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.form-note{ color:var(--muted); font-size:.95rem; margin:0; }
.hp{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

/* --------- Consent RGPD (CSS-only tick, SVG neutralisé) --------- */
/* Carte autour du bloc */
.consent-card{
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:14px 16px;
}

/* Ligne principale (checkbox + texte) */
.consent{ display:flex; align-items:flex-start; gap:12px; cursor:pointer; user-select:none; }

/* Vrai input caché (accessible clavier/lecteurs d’écran) */
.consent input[type="checkbox"]{
  position:absolute;
  inline-size:1px; block-size:1px;
  margin:-1px; padding:0; border:0; clip:rect(0 0 0 0);
  overflow:hidden; white-space:nowrap;
}

/* Case visuelle */
.consent .box{
  inline-size:22px; block-size:22px; flex:0 0 22px;
  border-radius:6px; border:2px solid var(--border); background:#fff;
  display:grid; place-items:center;
  transition:border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .06s ease;
  position:relative; overflow:hidden;
}

/* Neutralise tout SVG éventuel dans la case (évite l'icône géante) */
.consent .box svg{ display:none !important; width:14px; height:14px; }

/* Tick CSS */
.consent .box::after{
  content:""; width:8px; height:14px;
  border:3px solid #1f2937; border-top:0; border-left:0;
  transform:scale(0) rotate(45deg); transform-origin:bottom left;
  transition:transform .15s ease;
}

/* Focus au clavier */
.consent input[type="checkbox"]:focus-visible + .box{
  box-shadow:0 0 0 3px #fff, 0 0 0 5px var(--primary);
}

/* Survol */
.consent:hover .box{ border-color:#c7cbd3; }

/* État coché */
.consent input[type="checkbox"]:checked + .box{
  background:linear-gradient(180deg,#ffd899,#ffbe55); border-color:var(--primary);
}
.consent input[type="checkbox"]:checked + .box::after{ transform:scale(1) rotate(45deg); }

/* Texte */
.consent-text{ color:var(--text); }
.consent-text a{ color:var(--primary); text-decoration:underline; }
.consent-text a:hover{ text-decoration:none; }

/* Aide */
.consent-hint{ display:block; margin-top:6px; color:var(--muted); font-size:.92rem; }

/* États JS (facultatif) */
.consent-card.is-invalid .box{ border-color:#ef4444; box-shadow:0 0 0 3px #fff, 0 0 0 5px #fecaca; }
.consent-card.is-valid .box{ border-color:#10b981; box-shadow:0 0 0 3px #fff, 0 0 0 5px #bbf7d0; }

/* Fallback très anciens navigateurs */
@supports not (selector(:has(*))){
  .form-consent input[type="checkbox"]{ accent-color:var(--primary); }
}

/* Devis container */
.devis-container{
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:28px; max-width:980px; margin:0 auto;
}

/* Flash message */
.flash-message{ padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; background:#f3f4f6; color:#111827; }

/* Contact */
.contact-box p{ margin:.25rem 0; }
address.contact-box.in-view{ justify-items:center; }

/* --------- Footer --------- */
.site-footer{ background:#e0dfdf; color:#2C3E50; padding:18px 0; margin-top:40px; }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
.footer-links{ list-style:none; display:flex; gap:12px; padding:0; margin:0; }
.footer-links a{ padding:6px 8px; border-radius:8px; }
.footer-links a:hover{ background:#1118270a; text-decoration:none; }

/* --------- Utilitaires --------- */
.text-center{ text-align:center; }
.max-w-prose{ max-width:70ch; }

/* --------- Responsif --------- */
@media (max-width:1024px){
  .hero-inner{ grid-template-columns:1fr; gap:20px; padding:24px 0; }
  .hero-media{ order:-1; }
  .portfolio{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid-3{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid-4{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:820px){
  .hamburger{ display:flex; }
  #nav-menu{ display:none; }
  #nav-menu.is-open{ display:flex; }
  .main-nav ul{ flex-direction:column; gap:6px; }
  .footer-inner{ flex-direction:column; }
}
@media (max-width:640px){
  .cards,.grid-2,.grid-3,.grid-4,.portfolio,.gallery{ grid-template-columns:1fr; }
  .media-duo{ grid-template-columns:1fr; }
  .split{ grid-template-columns:1fr; }
  .section{ padding:56px 0; }
  .devis-container{ padding:20px; }
  .hero-ctas{ flex-direction:column; align-items:stretch; }
}

/* --------- Ancres sous header sticky --------- */
section[id]{ scroll-margin-top:90px; }

/* ===========================
   Animations & Effects
   =========================== */
[data-animate]{ opacity:0; transform:translateY(12px);
  transition:opacity .7s ease, transform .7s cubic-bezier(.2,.65,.2,1); will-change:opacity,transform; }
.in-view{ opacity:1; transform:none; }

[data-animate="fade-up"]{ transform:translateY(18px); }
[data-animate="fade-down"]{ transform:translateY(-18px); }
[data-animate="fade-left"]{ transform:translateX(24px); }
[data-animate="fade-right"]{ transform:translateX(-24px); }
[data-animate="zoom-in"]{ transform:scale(.96); }
[data-animate="blur-in"]{ filter:blur(6px); transform:translateY(10px); }
.in-view[data-animate="blur-in"]{ filter:blur(0); }

/* Stagger */
[data-stagger] > *{ transition-delay: calc(var(--stagger, 0) * 80ms); }

/* Hero lift */
.hero .hero-content [data-animate],
.hero .hero-media [data-animate]{ transition-duration:.9s; }

/* Boutons — micro interactions */
.btn{ position:relative; overflow:hidden; }
.btn::after{
  content:""; position:absolute; inset:auto -30% 0 -30%; height:0;
  transform:translateY(100%); background:rgba(255,255,255,.18);
  transition:transform .35s ease;
}
.btn:hover::after{ transform:translateY(0); }

/* Nav underline animée */
.main-nav a{ position:relative; }
.main-nav a::before{
  content:""; position:absolute; left:12px; right:12px; bottom:6px; height:2px;
  background:currentColor; transform:scaleX(0); transform-origin:left; transition:transform .25s ease; opacity:.6;
}
.main-nav a:hover::before, .main-nav a.is-active::before{ transform:scaleX(1); }

/* Cards hover */
.portfolio-item,.card{ transition:transform .25s ease, box-shadow .25s ease; }
.portfolio-item:hover,.card:hover{ transform:translateY(-6px); box-shadow:0 14px 32px rgba(0,0,0,.14); }

/* Burger → croix */
.hamburger{ transition:transform .2s ease; }
.hamburger span{ transition:transform .2s ease, opacity .2s ease; }
.main-nav .hamburger[aria-expanded="true"] span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.main-nav .hamburger[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.main-nav .hamburger[aria-expanded="true"] span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* Barre de progression de scroll */
.scroll-progress{
  position:fixed; top:0; left:0; height:3px; width:0%;
  background:linear-gradient(90deg,var(--primary),#ffb84a);
  z-index:1000; box-shadow:0 1px 6px rgba(0,0,0,.2);
}

/* Parallax doux (option JS) */
.hero[data-parallax="true"]::before{ will-change:transform; }

/* Respect des préférences */
@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; }
  [data-animate]{ opacity:1 !important; transform:none !important; filter:none !important; }
  .scroll-progress{ display:none; }
}
/* Consent — interrupteur */
.consent-toggle{
  background:#fff; border:1px solid var(--border); border-radius:12px;
  padding:14px 16px; box-shadow:var(--shadow);
}

.consent-toggle .row{
  display:flex; align-items:center; gap:12px;
}

/* input réel, caché mais focusable */
.consent-toggle input[type="checkbox"]{
  position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0;
  clip:rect(0 0 0 0); overflow:hidden; white-space:nowrap;
}

/* UI du switch */
.switch{
  position:relative; width:44px; height:26px; flex:0 0 44px;
  background:#e5e7eb; border-radius:999px; transition:background .2s ease;
  border:1px solid #d1d5db;
}
.knob{
  position:absolute; top:2px; left:2px; width:22px; height:22px; border-radius:50%;
  background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.15);
  transition:transform .2s ease;
}

/* états */
.consent-toggle input:checked + .switch{
  background: linear-gradient(180deg, #ffd899, #ffbe55);
  border-color: var(--primary);
}
.consent-toggle input:checked + .switch .knob{ transform: translateX(18px); }

/* focus clavier */
.consent-toggle input:focus-visible + .switch{
  box-shadow:0 0 0 3px #fff, 0 0 0 5px var(--primary);
}

/* texte */
.consent-toggle .text{ color:var(--text); line-height:1.45; }
.consent-toggle .text a{ color:var(--primary); text-decoration:underline; }
.consent-toggle .text a:hover{ text-decoration:none; }

/* états JS (optionnels) */
.consent-toggle.is-invalid{ border-color:#ef4444; box-shadow:0 0 0 3px #fff,0 0 0 5px #fecaca; }
.consent-toggle.is-valid  { border-color:#10b981; box-shadow:0 0 0 3px #fff,0 0 0 5px #bbf7d0; }


/* === FIX PACK BOUTONS (à coller tout en bas) =================== */

/* Empêche la règle a:hover globale d'écraser les boutons */
a.btn, .btn { text-decoration: none !important; }

/* Reste "sans soulignement" au survol */
a.btn:hover, .btn:hover { text-decoration: none !important; }

/* Rappel des styles clés (au cas où ils aient été écrasés) */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px; padding:12px 18px; border-radius:10px;
  border:1px solid transparent; cursor:pointer;
  text-decoration:none; user-select:none;
  transition: transform .05s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active{ transform: translateY(1px); }

/* Variantes */
.btn-primary{
  background: var(--primary); border-color: var(--primary); color:#1f2937;
}
.btn-primary:hover{
  background: var(--primary-700); border-color: var(--primary-700); color:#111827;
}

.btn-secondary{
  background:#111827; border-color:#111827; color:#fff;
}
.btn-secondary:hover{ background:#0b1220; }

.btn-ghost{
  background:transparent; border-color:#37415133; color:#111827;
}
.btn-ghost:hover{ background:#1118270a; }

.btn-link{
  padding:0; border:0; background:transparent; color:var(--primary);
}
.btn-link:hover{ color:var(--primary-700); }

/* Effet lueur au survol, comme avant */
.btn{ position:relative; overflow:hidden; }
.btn::after{
  content:""; position:absolute; inset:auto -30% 0 -30%; height:0;
  transform: translateY(100%); background: rgba(255,255,255,.18);
  transition: transform .35s ease;
}
.btn:hover::after{ transform: translateY(0); }
