/* =========================================================
   GROUPE INNOVA FRANCE — gi-components.css (version propre)
   Charte graphique + composants UI, responsif & accessible
   ========================================================= */

/* ===== VARIABLES ===== */
:root{
  --bg-1:#2b4c87;        /* bleu ciel foncé */
  --bg-2:#3e6fb3;        /* bleu clair */
  --card:rgba(8,16,32,.9);
  --text:#ffffff;
  --muted:#cbd6ea;
  --accent:#ff9900;

  --header-h:72px;
  --container:1200px;

  --space-1:8px;
  --space-2:12px;
  --space-3:16px;
  --space-4:24px;
  --space-5:32px;
  --space-6:48px;
}

/* ===== PRÉFÉRENCES UTILISATEUR ===== */
@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* ===== RESET LÉGER & BASE ===== */
*{box-sizing:border-box}
html,body{height:100%;margin:0}
html{scroll-behavior:smooth}
body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  color:var(--text);
  background:linear-gradient(160deg,var(--bg-1),var(--bg-2));
  line-height:1.5;
  -webkit-tap-highlight-color:transparent;
}

a,
a:visited{color:inherit;text-decoration:none}
a:hover{text-decoration:underline}
a:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;border-radius:8px
}

img{max-width:100%;height:auto;display:block;border:0}

/* Eviter le scroll horizontal global, sans clipper les menus */
html, body{overflow-x:hidden}

/* Conteneur générique */
.gi-wrap{max-width:var(--container);margin:0 auto;padding:20px}

/* ===== TITRAGES & RYTHME ===== */
h1{font-size:clamp(28px,3.6vw,40px);line-height:1.15;margin:0 0 var(--space-3)}
h2{font-size:clamp(22px,2.6vw,28px);line-height:1.2;margin:0 0 var(--space-3)}
h3{font-size:clamp(18px,2vw,22px);line-height:1.25;margin:0 0 var(--space-2)}
.lead{color:var(--muted);font-size:clamp(16px,1.4vw,18px);line-height:1.6;max-width:70ch}
main section{padding-block:var(--space-5)}
@media(max-width:860px){main section{padding-block:var(--space-4)}}

/* Petit kicker du hero */
.gi-hero-kicker{
  display:inline-block;
  font-size:.8rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:.3rem .7rem;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:#f5f7ff;
  margin-bottom:.9rem;
}

/* ===== BOUTONS ===== */
.gi-btn,
.gi-btn:visited{
  display:inline-block;
  background:var(--accent);
  color:#101318!important;
  font-weight:800;
  padding:10px 16px;
  border-radius:12px;
  text-decoration:none;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  transition:filter .2s ease,transform .2s ease;
}
.gi-btn:hover{filter:saturate(1.05) brightness(1.03)}
.gi-btn:active{transform:translateY(1px)}

/* Tags */
.gi-tag{
  display:inline-block;
  background:rgba(255,255,255,.08);
  padding:6px 10px;
  border-radius:999px;
  margin-left:6px
}

/* Notes */
.gi-note{color:var(--muted);font-size:.9rem}

/* ===== PASTILLES / PILLS ===== */
.gi-pills{display:flex;flex-wrap:wrap;gap:12px;margin:.5rem 0}
.gi-pills a{
  color:#fff!important;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  padding:12px 16px;
  border-radius:999px;
  font-weight:700;
  display:inline-block;
  transition:background .2s ease,box-shadow .2s ease;
  white-space:nowrap;
}
.gi-pills a:hover{background:rgba(255,255,255,.16)}
.gi-pills a[aria-current="page"]{
  background:var(--accent);
  color:#101318!important;
  font-weight:800;
  box-shadow:0 8px 20px rgba(255,153,0,.25);
}

@media (max-width:991px){
  .gi-pills{
    gap:10px 12px;
    margin:12px 0;
    padding:8px 16px;
    position:sticky; top:0; z-index:100;
    background:linear-gradient(160deg,var(--bg-1),var(--bg-2));
  }
  .gi-pills a{
    white-space:normal;
    line-height:1.25;
    overflow-wrap:anywhere;
    word-break:normal;
    hyphens:auto;
  }
}

/* ===== CARTES ===== */
.gi-card{
  background:var(--card);
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  padding:16px;
  box-shadow:0 10px 24px rgba(0,0,0,.2);
}
.gi-footer p{margin:0;line-height:1.6}

/* ===== HEADER ===== */
.gi-header{
  position:relative;
  z-index:1000;
  background:transparent;
  overflow:visible;
}
.gi-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:var(--header-h);
  padding:0 16px;
}

/* Logo */
.gi-logo{
  font-weight:900;
  letter-spacing:.5px;
  text-decoration:none;
  color:var(--text);
  white-space:nowrap;
}

/* ===== NAVIGATION (desktop) ===== */
.gi-nav-desktop{
  display:flex;
  justify-content:center;
  border-top:1px solid rgba(255,255,255,.06);
}
.gi-nav-list{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  list-style:none;
  gap:12px;
  margin:0;
  padding:0;
}
.gi-nav-list li{min-width:0}
.gi-nav-list a{
  color:var(--text);
  text-decoration:none;
  padding:8px 10px;
  border-radius:10px;
  font-size:.97rem;
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
}
.gi-nav-list a:hover,
.gi-nav-list a[aria-current="page"]{
  background:rgba(255,255,255,.08);
}
.gi-nav-desktop .gi-nav-list li.is-cta a{
  background:var(--accent);
  color:#111;
  font-weight:800;
  box-shadow:0 8px 20px rgba(255,153,0,.25);
}

/* ===== BURGER (mobile) ===== */
.gi-burger{
  display:none;
  align-items:center;
  justify-content:center;
  width:44px;height:44px;
  font-size:22px;line-height:1;
  background:transparent;border:0;color:var(--text);
  cursor:pointer;z-index:1003;
}

/* ===== DRAWER (menu mobile) ===== */
.gi-drawer{
  position:fixed; top:0; right:0; bottom:0;
  width:100vw; max-width:420px;
  background:rgba(5,12,28,.98);
  padding:18px 16px 24px;
  overflow-y:auto;
  box-shadow:-12px 0 36px rgba(0,0,0,.35);
  transform:translateX(100%);
  visibility:hidden;
  z-index:1002;
  transition:transform .25s ease,visibility .25s step-end;
}
.gi-drawer[aria-hidden="true"]{transform:translateX(calc(100% + 12px))}
.gi-drawer[aria-hidden="false"]{
  transform:translateX(0);
  visibility:visible;
  transition:transform .25s ease,visibility 0s linear;
}
.gi-drawer a{
  display:block;
  padding:12px 10px;
  border-radius:12px;
  color:var(--text);
  text-decoration:none;
}
.gi-drawer a:hover,
.gi-drawer a[aria-current="page"]{background:rgba(255,255,255,.08)}
.gi-drawer-open,.gi-no-scroll{overflow:hidden}
@media (max-width:480px){
  .gi-drawer{width:100vw}
}
@media(max-width:991px){
  .gi-nav-desktop{display:none!important}
  .gi-burger{display:inline-flex!important}
}
@media(min-width:992px){
  .gi-nav-desktop{display:flex!important}
  .gi-burger{display:none!important}
  .gi-drawer{transform:translateX(100%);visibility:hidden}
}

/* ===== CONTRASTE PAGES NUISIBLES ===== */
body:has(.nuisibles-subnav){
  --card:#0c1730;
  --text:#ffffff;
  --muted:#d9e6ff;
}
body:has(.nuisibles-subnav) .gi-card{
  background:#0c1730;
  border:1px solid #3a5bb5;
  box-shadow:0 10px 28px rgba(0,0,0,.35);
}
body:has(.nuisibles-subnav) h1,
body:has(.nuisibles-subnav) h2{color:#fff}
body:has(.nuisibles-subnav) .lead{color:#d9e6ff}

/* ===== GRILLES ===== */
.gi-grid{display:grid;gap:var(--space-3)}
@media(min-width:900px){.gi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ===== IMAGES ===== */
img,.gi-gallery img,.gi-before-after img{border-radius:16px}
.gi-gallery img{aspect-ratio:16/9;object-fit:cover}
.gi-before-after figure{margin:0}

/* ===== FOOTER ===== */
.gi-footer{
  color:var(--muted);
  font-size:.95rem;
  padding-bottom:40px;
  text-align:center;
}

/* =========================================================
   HERO ACCUEIL
   - Pleine largeur (100vw)
   - Drone + toiture visibles sans scroller sur PC
   - Rendu équilibré sur mobile
   ========================================================= */

.gi-hero{
  padding-block:0;
}

/* Le bloc hero occupe vraiment toute la largeur fenêtre */
.gi-hero picture{
  display:block;
  width:100vw;
  margin-left:50%;
  transform:translateX(-50%);
}

/* Règle par défaut = desktop / tablettes larges */
.gi-hero-wrap img{
  display:block;
  width:100%;
  height:clamp(380px, 68vh, 780px); /* hauteur flexible */
  object-fit:cover;
  object-position:50% 68%;          /* drone + toiture visibles */
  border-radius:0;
  opacity:0;
  transition:opacity .25s ease;
}

/* Anti-flash : on affiche après chargement */
body.is-ready .gi-hero-wrap img{opacity:1}

/* Mobile : on réduit un peu la hauteur, drone + toiture visibles sans scroller */
@media (max-width:640px){
  .gi-hero-wrap img{
    height:55vh;
    object-position:50% 60%;
  }
}

/* ===== TABS SERVICES (onglets) ===== */
.gi-tabs,
.gi-tabs-wrap{overflow:visible}

.gi-tabs{display:flex;gap:12px;flex-wrap:wrap}
.gi-tabs a{
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
  font-weight:700;
  transition:background .2s ease,box-shadow .2s ease;
  white-space:nowrap;
}
.gi-tabs a:hover{background:rgba(255,255,255,.16)}
.gi-tabs a.active{
  background:var(--accent);
  color:#101318;
  box-shadow:0 8px 20px rgba(255,153,0,.25);
}

.gi-services-switch{display:none}

@media (max-width:991px){
  .gi-tabs.services{display:none!important}
  .gi-services-switch{
    display:grid!important;
    grid-template-columns:repeat(2,1fr);
    gap:12px; margin:12px 16px;
  }
  .gi-services-switch a{
    display:flex; align-items:center; justify-content:center;
    text-align:center;
    min-height:72px; padding:14px; border-radius:16px;
    font-weight:800; line-height:1.2; color:#fff!important;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.18);
    box-shadow:0 6px 16px rgba(0,0,0,.15);
    white-space:normal; overflow-wrap:anywhere;
  }
  .gi-services-switch a[aria-current="page"]{
    background:var(--accent);
    color:#101318!important;
    box-shadow:0 8px 20px rgba(255,153,0,.25);
  }
}

@media (min-width:992px){
  .gi-services-switch{display:none!important}
  .gi-tabs.services{display:flex!important}
}

/* ===== UTILITAIRES SCOPÉS ===== */
.gi-card a,
.gi-pills a,
.gi-tabs a,
.gi-nav-list a,
.gi-drawer a{color:var(--text)}
.gi-muted{color:var(--muted)}
.visually-hidden{
  position:absolute!important; width:1px; height:1px;
  margin:-1px; border:0; padding:0; clip:rect(0 0 0 0); overflow:hidden
}
/* Ajustement visuel spécifique du hero accueil */
.gi-hero-wrap img {
  object-position: 45% 40%; /* descend un peu le cadrage du drone */
}
