/*
Theme Name: IT Hexagone
Description: Thème vitrine (bannière, onglets, prestations, carrousel actus, FAQ, télémaintenance, contact, actualités, single “carte blanche” et pages prestations).
Version: 4.0
*/

/* ---------------- Fonts ---------------- */
@font-face{
  font-family:"Afacad";
  src:
    url("assets/fonts/Afacad-VariableFont_wght.woff2") format("woff2"),
    url("assets/fonts/Afacad-VariableFont_wght.ttf") format("truetype");
  font-weight:100 900;
  font-style:normal;
  font-display:swap;
}

/* ---------------- Design tokens ---------------- */
:root{
  /* couleurs */
  --bg-a:#A6BBE0;    /* header + qui sommes-nous + footer */
  --bg-b:#DBE8FF;    /* prestations */
  --bg-c:#CDDBF3;    /* dernières actus */
  --panel:#E8EFF9;   /* panneaux/accordéons */
  --card:#FFFFFF;    /* cartes */
  --frame:#2F3A4B;
  --border:#C8D2E2;
  --divider:#C8D2E2;
  --text:#0F1520;
  --muted:#2A3244;

  /* rayons / ombres / espacements */
  --radius:12px;
  --radius-sm:8px;
  --shadow-soft:0 8px 16px rgba(22,28,45,.08);
  --shadow-hero:0 10px 20px rgba(22,28,45,.10);
  --space-1:8px;
  --space-2:12px;
  --space-3:16px;
  --space-4:20px;
  --space-5:24px;
  --space-6:28px;
  --space-7:32px;

  /* chips/boutons */
  --chip:#FFFFFF;
  --chip-br:#1F2A3A;
}

/* ---------------- Reset/Base ---------------- */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  background:var(--bg-a);
  color:var(--text);
  font:400 18px/1.85 "Afacad",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}

h1,h2,h3{
  margin:0 0 var(--space-3);
  font-weight:800;
  color:#1E2B3C;
}
h1{font-size:clamp(30px,4.6vw,52px);line-height:1.18;letter-spacing:.01em}
h2{font-size:clamp(22px,2.4vw,34px);line-height:1.22;letter-spacing:.05em;text-transform:uppercase}
h3{font-size:clamp(18px,2vw,22px);line-height:1.3}

.container{max-width:1280px;margin:0 auto;padding:0 var(--space-4)}
.section{padding:72px 0}
.about{background:var(--bg-a)}
.services{background:var(--bg-b)}
.news{background:var(--bg-c)}
.site-footer{background:var(--bg-a)}

/* ---------------- Boutons pill ---------------- */
.btn-pill{
  display:inline-block;
  padding:12px 22px;
  border-radius:999px;
  font-weight:800;
  border:2px solid var(--chip-br);
  background:#fff;
  color:#0F1520;
  box-shadow:0 8px 16px rgba(22,28,45,.10);
  transition:transform .08s ease,box-shadow .2s ease,filter .15s ease;
}
.btn-pill:hover{transform:translateY(-1px);filter:brightness(1.02)}
.btn-primary{
  background:linear-gradient(180deg,#1f7ae6 0%, #145fb9 100%);
  color:#fff;
}

/* ---------------- Header ---------------- */
.site-top{padding-top:10px}
.topbar{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:2px}
.brand{display:block;line-height:0;background:transparent}
.brand__logo{width:120px;height:auto;background:transparent !important}

.top-actions{display:flex;gap:20px;margin-top:4px}
.chip{
  display:inline-block;padding:.78rem 1.4rem;border-radius:999px;
  font-weight:700;font-size:18px;line-height:1;
  background:var(--chip);border:2px solid var(--chip-br);
  box-shadow:0 1px 0 rgba(0,0,0,.08);
}
.chip--strong:hover{background:#F8FBFF}

/* ---------------- Hero + Onglets ---------------- */
.hero-wrap .container{position:relative}
.hero-banner{
  height:clamp(300px,28vw,440px);
  border:2px solid var(--frame);border-radius:var(--radius);
  overflow:hidden;background:#15263c;box-shadow:var(--shadow-hero);
}
.hero-banner img{width:100%;height:100%;object-fit:cover;object-position:69% center}

.tabs{
  margin-top:8px;border:2px solid var(--frame);border-radius:var(--radius);
  background:var(--panel);box-shadow:var(--shadow-hero);
}
.tabs__list{list-style:none;margin:0;padding:12px 18px;display:flex}
.tabs__list li{flex:1;position:relative}
.tabs__list li+li::before{content:"";position:absolute;left:-.5px;top:8px;bottom:8px;width:1px;background:var(--divider)}
.tabs__list a{
  display:block;text-align:center;color:#122037;
  font-weight:700;font-size:18px;padding:12px 0;border-radius:6px;
}
.tabs__list a:hover{background:#fff}

/* ---------------- Qui sommes-nous ---------------- */
.about__grid{
  display:grid;grid-template-columns:.9fr 1.1fr;gap:48px;align-items:start;
}
.about__text p{
  font-size:21px;line-height:1.9;max-width:58ch;margin:0;
}
.about__media img{border-radius:var(--radius-sm);box-shadow:0 16px 24px rgba(0,0,0,.16)}

/* ---------------- Prestations (cartes carrées) ---------------- */
.services h2{text-align:center;margin-bottom:28px}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.card{
  background:var(--card);border:1px solid var(--border);border-radius:var(--radius-sm);
  overflow:hidden;box-shadow:var(--shadow-soft);display:flex;flex-direction:column;
}
.card__media img{width:100%;aspect-ratio:1/1;object-fit:cover}
.card__body{padding:18px;display:flex;flex-direction:column;gap:10px}
.card h3{font-size:18px;margin:0}
.card p{font-size:15px;color:var(--muted);margin:0}
.card .chip--sm{align-self:flex-start;margin-top:auto;font-size:14px;padding:.5rem 1.1rem;border:2px solid var(--chip-br);background:#fff}

/* ---------------- Carrousel “Dernières actus” ---------------- */
.news h2{text-align:center;margin-bottom:22px}
.carousel{position:relative;overflow:hidden;padding-inline:34px}
.carousel__track{display:flex;gap:24px;will-change:transform;transition:transform .4s ease}
.slide{
  flex:0 0 46%;background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius-sm);overflow:hidden;box-shadow:var(--shadow-soft);
  display:flex;flex-direction:column;
}
.slide__media img{width:100%;height:180px;object-fit:cover}
.slide__body{padding:14px;display:flex;flex-direction:column;gap:8px}
.slide h3{font-size:16px;margin:0}
.slide p{font-size:14px;color:#3a4152;margin:0}
.carousel__nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:42px;height:42px;border-radius:50%;border:2px solid var(--chip-br);
  background:#fff;box-shadow:var(--shadow-soft);display:grid;place-items:center;cursor:pointer;z-index:2;
}
.carousel__nav:hover{background:#f9fbff}
.carousel__nav.prev{left:6px}.carousel__nav.next{right:6px}
.news-cta{display:flex;justify-content:center;margin-top:14px}
.news-cta .chip--sm{padding:.5rem 1.2rem}

/* ---------------- Footer ---------------- */
.site-footer{color:#111;padding:32px 0 22px}
.footer-columns{
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;align-items:center;
}
.fcol h4{font-size:15px;margin:0 0 8px}
.fcol p{margin:0;font-size:14px;color:#2a3244}
.fcol--logo{text-align:center}
.brand-mini{width:110px;height:auto;margin:0 auto;display:block}
.brand-text{display:none !important} /* on masque le doublon “HEXAGONE” */
.footer-legal{margin-top:12px;text-align:center;font-size:13px}
.footer-legal a{color:#1c2740}
.copyright{text-align:center;font-size:12px;opacity:.8;margin-top:8px}

/* ---------------- FAQ ---------------- */
.faq__title{text-align:center;text-transform:uppercase;letter-spacing:.05em;margin-bottom:22px}
.faq-acc{display:grid;gap:12px}
.faq-item{
  background:var(--panel);border:2px solid var(--frame);
  border-radius:var(--radius-sm);box-shadow:var(--shadow-soft)
}
.faq-q{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 16px;background:transparent;border:0;text-align:left;cursor:pointer;
  font:700 18px/1.3 "Afacad",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#122037;
}
.faq-icon{
  width:28px;height:28px;border:2px solid var(--chip-br);border-radius:999px;
  display:grid;place-items:center;line-height:1;transition:transform .2s ease;user-select:none;
}
.faq-item.open .faq-icon{transform:rotate(45deg)}
.faq-a{overflow:hidden;max-height:0;opacity:.98;transition:max-height .3s ease;padding:0 16px}
.faq-item.open .faq-a{padding-bottom:16px}
.faq-a p{margin:12px 0 0;font-size:16px;color:var(--muted)}

/* ---------------- Télémaintenance ---------------- */
.tm{text-align:center}
.tm__title{font-size:clamp(34px,4.2vw,52px);letter-spacing:.02em;margin-bottom:18px}
.tm__lead{font-size:clamp(17px,1.6vw,20px);line-height:1.75;max-width:920px;margin:0 auto 26px}
.tm__actions{margin:18px 0 22px}
.tm .btn-pill{border:2px solid var(--chip-br)}
.tm__detected{display:block;margin-top:16px;color:#10233b}
.tm__toggle{
  margin-top:14px;display:inline-flex;align-items:center;gap:.5rem;
  padding:10px 14px;border-radius:12px;border:1px solid var(--chip-br);background:#fff;font-weight:700;cursor:pointer;
}
.tm__versions{margin-top:10px;display:none}
.tm__versions[aria-hidden="false"]{display:block}
.tm__versions ul{list-style:none;padding:0;margin:10px 0 0}
.tm__versions li{margin:8px 0}
.tm__versions a{font-weight:700;color:#0f3b8f}
.tm__versions a:hover{text-decoration:underline}

/* autres versions (liste + mini-boutons) */
.tm__more{max-width:740px;margin:22px auto 0}
.tm__list{list-style:none;padding:0;margin:18px auto 0;display:grid;gap:12px}
.tm__list li{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:#E8EFF9;border:1px solid #C8D2E2;border-radius:12px;padding:12px 16px;box-shadow:0 2px 6px rgba(0,0,0,.06);
}
.tm__list li span{font-weight:600;color:#122037}
.tm__mini-btn{
  display:inline-block;padding:.48rem .9rem;border-radius:999px;border:2px solid var(--chip-br);
  background:#fff;color:#0F1520;font-weight:700;line-height:1;box-shadow:0 2px 0 rgba(0,0,0,.05);
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.tm__mini-btn:hover{background:#F3F8FF;transform:translateY(-1px);box-shadow:0 6px 12px rgba(0,0,0,.10)}

/* ---------------- Contact ---------------- */
.contact__title{text-align:center;margin-bottom:18px;letter-spacing:.03em;text-transform:uppercase}
.contact .container{max-width:860px}
.notice{
  border-radius:12px;padding:12px 14px;margin-bottom:16px;border:1px solid var(--border);
  box-shadow:var(--shadow-soft);background:#fff;
}
.notice--success{border-color:#74c476;background:#e9f7ec}
.notice--error{border-color:#e59ba1;background:#fdeef0}
.contact__form{background:var(--panel);border:2px solid var(--frame);border-radius:var(--radius-sm);box-shadow:var(--shadow-hero);padding:22px}
.contact__form .hp{position:absolute !important;left:-9999px !important;top:auto !important;width:1px;height:1px;overflow:hidden}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width:720px){.grid{grid-template-columns:1fr}}
.field label{display:block;font-weight:700;margin-bottom:6px}
.field input,.field textarea{
  width:100%;padding:12px;border-radius:8px;border:1px solid var(--border);font-size:16px;line-height:1.5;background:#fff
}
.field textarea{resize:vertical;min-height:140px}
.consent{margin:10px 0 6px}
.chk{display:flex;align-items:flex-start;gap:10px}
.chk input{transform:translateY(2px)}
.chk a{text-decoration:underline}
.actions{display:flex;align-items:center;gap:14px;margin-top:10px}
.actions .hint{margin:0;font-size:14px;color:#2a3244}

/* ---------------- Archive actualités ---------------- */
.news-archive__title{text-align:center;margin-bottom:26px;text-transform:uppercase;letter-spacing:.02em}
.news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
@media (max-width:1024px){.news-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:640px){.news-grid{grid-template-columns:1fr}}
.news-card{
  background:#fff;border:1px solid var(--border);border-radius:var(--radius-sm);
  overflow:hidden;box-shadow:var(--shadow-soft);display:flex;flex-direction:column
}
.news-card__media{display:block;line-height:0}
.news-card__img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;display:block}
.news-card__body{padding:16px 16px 18px;display:flex;flex-direction:column;gap:10px}
.news-card__date{font-size:13px;opacity:.75}
.news-card__title{font-size:18px;margin:0;line-height:1.3}
.news-card__title a:hover{text-decoration:underline}
.news-card__excerpt{margin:0;color:var(--muted);font-size:15px}
.pagination{margin-top:24px;display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.pagination .page-numbers{
  display:inline-block;padding:8px 12px;border:1px solid var(--border);
  background:#fff;border-radius:6px;text-decoration:none
}
.pagination .page-numbers.current{background:var(--panel);font-weight:700}
.news-empty{text-align:center;opacity:.8}

/* ---------------- Single “carte blanche” (articles) ---------------- */
.post-section{padding:36px 0 50px}
.post-wrap{max-width:960px;margin:0 auto}
.pill-link{
  display:inline-block;padding:.5rem .9rem;border:1px solid rgba(0,0,0,.15);
  border-radius:999px;background:#fff;box-shadow:0 6px 12px rgba(22,28,45,.06);
  font-weight:600;font-size:14px;margin-bottom:12px
}
.post-title{font-size:clamp(28px,3.2vw,40px);line-height:1.22;margin:.2rem 0 .35rem}
.post-meta{font-size:14px;opacity:.8;margin-bottom:16px;display:flex;gap:.5rem;align-items:center}
.post-meta__sep{opacity:.6}
.post-card{
  background:#fff;color:#0f1520;border:1px solid var(--border);
  border-radius:var(--radius);box-shadow:var(--shadow-soft);padding:28px 30px
}
.rte--article{font-size:18px;line-height:1.85}
.rte--article p+p{margin-top:1.05em}
.rte--article h2{font-size:22px;margin:1.2em 0 .4em}
.rte--article h3{font-size:19px;margin:1.1em 0 .35em}
.rte--article ul,.rte--article ol{margin:.8em 0 .8em 1.2em}
.rte--article li{margin:.3em 0}
.post-nav{
  display:flex;justify-content:space-between;gap:12px;margin-top:18px;
  padding-top:14px;border-top:1px dashed rgba(0,0,0,.12);font-size:14px;opacity:.95
}
.post-nav a:hover{text-decoration:underline}

/* ---------------- Pages Prestations (Option A) ---------------- */
/* règle universelle : espace entre tous les blocs frères */
.post-article > * + *{margin-top:28px}

/* grilles 2 colonnes en haut des pages */
.post-article .grid{
  display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-bottom:24px
}
@media (max-width:900px){.post-article .grid{grid-template-columns:1fr}}

/* cartes prestation */
.post-article .post-card{
  background:#fff;border:1px solid var(--border);border-radius:var(--radius);
  padding:22px 24px;box-shadow:var(--shadow-soft);margin:0
}
.post-article .post-card h2{
  margin:0 0 12px;font-size:20px;letter-spacing:.02em;text-transform:uppercase
}

/* listes claires et cohérentes */
.post-article .post-card ul,
.post-article .post-card ol{list-style:none;margin:0;padding:0}
.post-article .post-card li{
  position:relative;margin:8px 0;padding-left:18px;line-height:1.75;font-size:16px
}
.post-article .post-card li::before{
  content:"";position:absolute;left:0;top:.62em;width:7px;height:7px;border-radius:50%;
  background:#1F2A3A;box-shadow:0 1px 0 rgba(0,0,0,.08)
}
.post-article .notice{margin-bottom:18px}

/* CTA bas de page prestations */
.post-article p[style*="display:flex"]{margin-top:18px}

/* ---------------- Offsets d’ancre (onglets) ---------------- */
.section{scroll-margin-top:96px}
@media (min-width:783px){#wpadminbar ~ * .section{scroll-margin-top:128px}}

/* ---------------- Responsive tweaks ---------------- */
@media (max-width:1100px){.brand__logo{width:104px}}
@media (max-width:980px){
  .tabs__list{flex-wrap:wrap;row-gap:8px}
  .about__grid{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr 1fr}
  .slide{flex:0 0 70%}
  .brand__logo{width:92px}
  .section{padding:56px 0}
}
@media (max-width:600px){
  .cards{grid-template-columns:1fr}
  .slide{flex:0 0 88%}
  .brand__logo{width:80px}
  .section{padding:44px 0}
}
/* Qui sommes-nous : remettre un cartouche blanc autour du bloc texte */
.about .about__text{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  padding:24px 28px;
}

/* espace sous le titre quand il est dans le cartouche */
.about .about__text h2{
  margin-bottom:16px;
}
/* ===== Components : cartes, grille, espacement, CTA ===== */
:root{
  --card-bg:#fff;
  --card-br: var(--border, #C8D2E2);
  --card-radius: 14px;
  --card-pad: 22px;
  --gap: 22px;
}

/* Carte blanche générique */
.card{
  background:var(--card-bg);
  border:1px solid var(--card-br);
  border-radius:var(--card-radius);
  box-shadow:var(--shadow-soft, 0 10px 20px rgba(22,28,45,.08));
  padding:var(--card-pad);
}

/* Petite alerte / info */
.notice{
  border:1px solid var(--card-br);
  border-left:4px solid #1f7ae6;
  background:#f7fbff;
  border-radius:10px;
  padding:12px 14px;
}

/* Grille 2 colonnes responsive */
.grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--gap);
}
@media (max-width: 900px){
  .grid-2{ grid-template-columns:1fr; }
}

/* Stack vertical : espace régulier entre enfants */
.stack > * + *{ margin-top: var(--gap); }

/* Article service (contenant) */
.post-section{ padding:42px 0; }
.post-wrap{ max-width:960px; margin:0 auto; }
.post-title{ margin:0 0 8px; }
.post-article > * + *{ margin-top: var(--gap); }

/* Boutons */
.btn-pill{
  display:inline-block; padding:12px 22px; border-radius:999px;
  font-weight:800; border:2px solid var(--chip-br,#1F2A3A);
  text-decoration:none;
}
.btn-primary{
  color:#fff;
  background:linear-gradient(180deg,#1f7ae6 0%, #145fb9 100%);
  box-shadow:0 10px 22px rgba(31,58,75,.20);
}
.btn-primary:hover{ filter:brightness(1.06); }
.btn-ghost{
  background:#fff; color:#0F1520;
}
.cta-row{ display:flex; gap:12px; flex-wrap:wrap; margin:6px 0 0; }

/* ===== Présentation (Qui sommes-nous ?) : carte blanche auto ===== */
.about .about__text{
  background:var(--card-bg);
  border:1px solid var(--card-br);
  border-radius:var(--card-radius);
  box-shadow:var(--shadow-soft, 0 10px 20px rgba(22,28,45,.08));
  padding:var(--card-pad);
}
.about .about__text p + p{ margin-top:.9em; }

/* (Sécurité) si certains templates utilisaient .post-card, on les rend identiques aux nouvelles cartes */
.post-card{ composes: card; } /* ignoré par les navigateurs, garde juste la compat mental model */
.post-card{ background:var(--card-bg); border:1px solid var(--card-br); border-radius:var(--card-radius); box-shadow:var(--shadow-soft, 0 10px 20px rgba(22,28,45,.08)); padding:var(--card-pad); }

/* Ajoute un peu plus d’air entre les grandes sections de services */
.post-article .card + .card{ margin-top:26px; }
