/* =============================================================
   WARNA — Solutions technologiques complètes
   Stylesheet (clean rebuild, fidèle warna.ma)
   ============================================================= */

/* -------------------------------------------
   1. Design tokens
   ------------------------------------------- */
:root {
  /* Colors */
  --c-bg:           #ffffff;
  --c-bg-light:     #f5f5f5;
  --c-bg-dark:      #000000;
  --c-text:         #000000;        /* warna.ma h2/p */
  --c-text-mute:    #555555;
  --c-text-faint:   #888888;
  --c-accent:       #06b6d4;        /* cyan icons + footer bullets */
  --c-pink:         #ff5fa3;        /* FR + menu hover */
  --c-divider:      #222222;

  /* Typography */
  --font:           'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Sizes (warna.ma reference) */
  --fs-h-hero:      65px;
  --fs-h-section:   50px;
  --fs-h-content:   40px;
  --fs-h-footer:    25px;
  --fs-text:        20px;
  --fs-contact:     25px;
  --fs-menu:        18px;
  --fs-filter:      13px;

  /* Layout */
  --container:      1225px;
  --pad-x:          24px;
  --pad-header:     40px;

  /* Misc */
  --t-fast:         150ms ease;
  --t-norm:         250ms ease;
}

/* -------------------------------------------
   2. Reset / base
   ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font); font-weight: 500; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg, video { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Reveal-on-scroll (added by IntersectionObserver) */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }


/* =============================================================
   3. HEADER — transparent overlay over hero
   ============================================================= */
.header {
  position: absolute; inset: 0 0 auto 0;
  z-index: 30;
  padding: 18px var(--pad-header);
  color: #fff;
}
.header__grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
}
.header__logo     { display: inline-flex; align-items: center; }
.header__logo-img { height: 50px; width: auto; object-fit: contain; }

.header__nav { display: flex; align-items: center; justify-content: center; gap: 30px; }
.header__nav a {
  font-size: var(--fs-menu);
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
  max-width: 120px;
  text-align: center;
  padding: 6px 2px;
  transition: color var(--t-fast);
}
.header__nav a:hover { color: var(--c-pink); }

.header__lang { display: flex; justify-content: flex-end; gap: 14px; font-size: 15px; font-weight: 600; }
.header__lang button { background: none; border: none; padding: 4px 6px; color: #fff; }
.header__lang .is-active { color: var(--c-pink); }

.header__burger { display: none; padding: 8px; background: none; border: none; color: #fff; }
.header__burger svg { width: 24px; height: 24px; }


/* =============================================================
   4. HERO — video bg + dark overlay + centered text + contact bar
   ============================================================= */
.hero {
  position: relative;
  overflow: hidden;
  /* hero s'adapte au contenu (header + slogan + contacts) — pas d'espace vide en bas */
  display: flex;
  flex-direction: column;
  padding-top: 100px;          /* place pour le header transparent */
  color: #fff;
  background: var(--c-bg-dark);
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background: #000;
}
.hero__video {
  position: absolute; top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  transform: translate(-50%, -50%) translateZ(0);   /* force GPU layer = rendu plus net */
  object-fit: cover;
  pointer-events: none;
  /* Améliorer la netteté à l'upscale */
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  /* Overlay plus léger : la vidéo reste lisible */
  background: linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.35));
}

.hero__content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 40px 24px 30px;       /* moins de padding-top : slogan plus haut */
}
.hero__title {
  font-size: var(--fs-h-hero);
  font-weight: 500;
  letter-spacing: -6px;
  line-height: var(--fs-h-hero);
  color: #fff;
}
.hero__title-main, .hero__title-sub {
  display: block;
  font-size: var(--fs-h-hero);
  line-height: var(--fs-h-hero);
}
.hero__title-sub { margin-top: 30px; letter-spacing: -2px; }

/* --- Style C · Néon lumineux cyan (couleurs originales) --- */
.hero__title-sub--neon {
  font-weight: 600;
  color: #fff;
  text-shadow:
    0 0 6px  var(--c-accent),
    0 0 18px var(--c-accent),
    0 0 36px var(--c-accent),
    0 0 60px rgba(6, 182, 212, .6);
  animation: heroNeonFlick 3s ease-in-out infinite;
}
@keyframes heroNeonFlick {
  0%, 100%   { opacity: 1; }
  49.5%      { opacity: 1; }
  50%        { opacity: .72; }
  50.5%      { opacity: 1; }
  51%        { opacity: .85; }
  51.5%      { opacity: 1; }
}

.hero__contact {
  position: relative; z-index: 2;
  padding: 30px var(--pad-header) 60px;
}
.hero__contact-row {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.contact-item { display: flex; align-items: center; gap: 16px; color: #fff; }
.contact-item__icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border: 2px solid var(--c-accent);
  border-radius: 50%;
  color: var(--c-accent);
  display: grid; place-items: center;
}
.contact-item__icon svg { width: 26px; height: 26px; }
.contact-item__text {
  font-size: var(--fs-contact);
  font-weight: 600;
  line-height: 30px;
}


/* =============================================================
   4b. SECTION IA · HEXAGONES PAR DIRECTION (compact)
   ============================================================= */
.section.hex-section {
  background: var(--c-bg-light);
  padding: 50px 20px;
}
.hex-section__intro { text-align: center; max-width: 880px; margin: 0 auto 24px; }
/* Titre h2 dans le style "Nos Partenaires" (.section--centered h2) */
.section.hex-section h2 {
  font-size: var(--fs-h-section);   /* 50px */
  font-weight: 500;
  line-height: var(--fs-h-section); /* 50px */
  letter-spacing: -0.4px;
  color: var(--c-text);
  text-align: center;
  margin: 0 0 20px;
}
.section.hex-section .hex-section__sub {
  font-size: var(--fs-text);        /* 20px — comme les sections texte */
  font-weight: 500;
  color: var(--c-text);
  margin: 0;
  line-height: 30px;
}

/* Layout: hexagones à gauche, détail à droite */
.hex-section__wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: stretch;
}

/* Honeycomb grid — taille moyenne, mieux dimensionné */
.hex-grid {
  --w: 130px;
  --h: 148px;
  --gap: 12px;
  position: relative;
  width: calc(var(--w) * 3 + var(--gap) * 2);
  height: calc(var(--h) * 1.75);
}
.hex {
  width: var(--w); height: var(--h);
  position: absolute;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: #ffffff;
  display: grid; place-items: center; text-align: center;
  padding: 10px;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  transition: background .3s ease, transform .3s ease;
}
.hex::after {
  content: '';
  position: absolute; inset: 1px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: #ffffff;
  z-index: 0;
  transition: background .3s ease, box-shadow .3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .04);
}
.hex > * { position: relative; z-index: 1; }
.hex:hover, .hex.active {
  background: linear-gradient(135deg, var(--c-accent) 0%, #1e90ff 100%);
  transform: translateY(-2px);
}
.hex:hover::after, .hex.active::after {
  background: linear-gradient(135deg, #ffffff 0%, #e7faff 60%);
  box-shadow: 0 6px 18px rgba(6, 182, 212, .18);
}
.hex__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(6, 182, 212, .12);
  color: var(--c-accent);
  margin: 0 auto 8px;
  transition: background .3s, color .3s;
}
.hex__icon svg { width: 22px; height: 22px; }
.hex:hover .hex__icon,
.hex.active .hex__icon {
  background: var(--c-accent);
  color: #ffffff;
}
.hex__name {
  font-size: 15px; font-weight: 700;
  color: var(--c-text);
  letter-spacing: .5px;
  display: block;
  line-height: 1.1;
}
.hex__sub {
  font-size: 11px;
  color: var(--c-text-mute);
  margin-top: 2px;
  font-weight: 500;
  display: block;
}

/* Hex positions (3 hex top row, 2 hex offset bottom row) */
.hex[data-pos="0"] { left: 0;                                  top: 0; }
.hex[data-pos="1"] { left: calc(var(--w) + var(--gap));        top: 0; }
.hex[data-pos="2"] { left: calc(2 * (var(--w) + var(--gap)));  top: 0; }
.hex[data-pos="3"] { left: calc((var(--w) + var(--gap)) / 2);  top: calc(var(--h) * .75 + 3px); }
.hex[data-pos="4"] { left: calc((var(--w) + var(--gap)) * 1.5); top: calc(var(--h) * .75 + 3px); }

/* Detail panel (compact) */
.hex-detail {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .04);
  position: relative;
  overflow: hidden;
}
.hex-detail::before {
  content: '';
  position: absolute; top: -40%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(6, 182, 212, .06) 0%, transparent 60%);
  pointer-events: none;
}
.hex-detail__inner { position: relative; }
.hex-detail__tag {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 8px;
}
.hex-detail h3 {
  font-size: 22px;
  font-weight: 500;
  color: var(--c-text);
  margin: 0 0 8px;
  line-height: 1.2;
}
.hex-detail__desc {
  color: var(--c-text-mute);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.hex-list { display: flex; flex-direction: column; gap: 6px; }
.hex-list__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--c-bg-light);
  border-radius: 10px;
  transition: background .25s ease, transform .25s ease;
  opacity: 0;
  animation: hex-in .35s ease forwards;
}
@keyframes hex-in { to { opacity: 1; transform: none; } }
.hex-list__item:hover {
  background: rgba(6, 182, 212, .06);
  transform: translateX(3px);
}
.hex-list__item-icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: #fff;
  color: var(--c-accent);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
  font-size: 15px;
}
.hex-list__item-text { flex: 1; min-width: 0; }
.hex-list__item-text strong {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--c-text);
  margin-bottom: 1px;
  line-height: 1.25;
}
.hex-list__item-text span {
  font-size: 12px;
  color: var(--c-text-mute);
  line-height: 1.4;
}
.hex-list__item-tag {
  flex-shrink: 0;
  font-size: 10px; font-weight: 600;
  color: var(--c-accent);
  background: rgba(6, 182, 212, .1);
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
}

/* Hex section responsive */
@media (max-width: 1024px) {
  .hex-section__wrap { grid-template-columns: 1fr; gap: 30px; }
  .hex-grid          { margin: 0 auto; }
}
@media (max-width: 600px) {
  .hex-grid          { --w: 90px; --h: 102px; --gap: 8px; }
  .hex-section       { padding: 50px 20px; }
  .hex-section h2    { font-size: 26px; }
  .hex-detail        { padding: 20px; }
  .hex-detail h3     { font-size: 20px; }
}


/* =============================================================
   5. SECTIONS — text + carousels
   ============================================================= */
.section            { padding: 115px 20px; background: var(--c-bg); }
.section--light     { background: var(--c-bg-light); }
.section--centered  { padding: 100px 20px; text-align: center; }

.section h2 {
  font-size: var(--fs-h-content);    /* 40px */
  font-weight: 600;
  line-height: var(--fs-h-content);
  color: var(--c-text);
  margin: 0;
}
.section--centered h2 {
  font-size: var(--fs-h-section);    /* 50px */
  font-weight: 500;
  line-height: var(--fs-h-section);
  letter-spacing: -0.4px;
  margin: 0 0 20px;
}
.section p {
  font-size: var(--fs-text);
  font-weight: 500;
  line-height: 30px;
  color: var(--c-text);
  margin: 0 0 30px;
}
.section p strong { font-weight: 700; }
.section .gap-top { margin-top: 30px; }


/* =============================================================
   6. CAROUSELS (Swiper)
   ============================================================= */
.swiper                  { padding: 55px 30px; }
.swiper-slide            { display: flex; align-items: center; justify-content: center; height: 121px; }
.swiper-slide img        { max-width: 116px; max-height: 116px; object-fit: contain; }

/* Refs swiper — logos plus grands (institutions/clients) */
.refs-swiper .swiper-slide       { height: 170px; }
.refs-swiper .swiper-slide img   { max-width: 160px; max-height: 160px; }

/* Swiper arrows — flat, transparent, just a chevron */
.swiper-button-prev,
.swiper-button-next {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  width: 40px !important;
  height: 40px !important;
  margin-top: -20px !important;
  color: var(--c-text) !important;
  outline: none !important;
  cursor: pointer;
  transition: color var(--t-fast), transform var(--t-fast);
}
.swiper-button-prev:hover,
.swiper-button-next:hover {
  color: var(--c-accent) !important;
}
.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 28px !important;
  font-weight: 600 !important;
}
.swiper-button-prev:hover { transform: translateX(-3px); }
.swiper-button-next:hover { transform: translateX(3px); }
.swiper-button-disabled   { opacity: .25 !important; pointer-events: none; }


/* =============================================================
   7. SOLUTIONS — filter buttons + grid
   ============================================================= */
.filters {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 4px;
  margin: 0 0 30px;
}
.filter-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: var(--fs-filter);
  font-weight: 500;
  color: var(--c-text);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0;
  transition: color var(--t-fast), background var(--t-fast);
}
.filter-btn:hover     { color: var(--c-text-mute); }
.filter-btn.is-active { background: var(--c-bg-dark); color: #fff; }

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.solution-card {
  background: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 211 / 209;
  padding: 10px;
  transition: transform var(--t-norm), box-shadow var(--t-norm);
}
.solution-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.solution-card img,
.solution-card__label {
  max-width: 191px; max-height: 188px;
  width: 100%; height: 100%;
  object-fit: contain;
}
.solution-card__label {
  display: grid; place-items: center;
  text-align: center;
  font-size: 14px; font-weight: 600;
  color: var(--c-text-mute);
  padding: 8px;
}
.solution-card.is-hidden { display: none; }

.load-more-wrap { text-align: center; margin-top: 30px; }
.load-more {
  background: var(--c-bg-dark); color: #fff;
  border: none;
  padding: 10px 24px;
  font-size: 13px; font-weight: 500;
  border-radius: 3px;
  transition: background var(--t-fast);
}
.load-more:hover { background: #333; }


/* =============================================================
   8. FOOTER
   ============================================================= */
.footer {
  background: var(--c-bg-dark);
  color: #fff;
  padding: 100px 20px;
}
.footer h2 {
  font-size: var(--fs-h-footer);
  font-weight: 500;
  line-height: var(--fs-h-footer);
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 30px;
}
.footer__list { list-style: none; padding: 0; margin: 0 0 40px; }
.footer__list li {
  position: relative;
  padding: 10px 0 10px 24px;
  font-size: var(--fs-menu);
  font-weight: 500;
}
.footer__list li::before {
  content: '';
  position: absolute; left: 0; top: 18px;
  width: 6px; height: 6px;
  background: var(--c-accent);
  border-radius: 50%;
}
.footer__list a:hover { color: var(--c-accent); }

.footer__social { display: flex; gap: 16px; margin-bottom: 30px; }
.footer__social a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: #fff;
  transition: color var(--t-fast);
}
.footer__social a:hover { color: var(--c-accent); }
.footer__social svg     { width: 18px; height: 18px; }

.footer__bottom {
  border-top: 1px solid var(--c-divider);
  padding-top: 20px;
  font-size: 13px;
  color: var(--c-text-faint);
  text-align: center;
}


/* =============================================================
   9. MOBILE MENU
   ============================================================= */
.mobile-menu {
  display: none;
  background: var(--c-bg-dark);
  color: #fff;
  padding: 16px 24px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a       { display: block; padding: 10px 0; font-size: 15px; }


/* =============================================================
   10. RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  .header__nav, .header__lang { display: none; }
  .header__burger             { display: block; }
  .solutions-grid             { grid-template-columns: repeat(3, 1fr); }
  .ai-grid                    { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero__contact-row          { grid-template-columns: 1fr; gap: 20px; }
  .hero__title                { font-size: 42px; line-height: 42px; letter-spacing: -2px; }
  .hero__title-main,
  .hero__title-sub            { font-size: 42px; line-height: 42px; }
  .solutions-grid             { grid-template-columns: repeat(2, 1fr); }
  .ai-grid                    { grid-template-columns: 1fr; }
  .section                    { padding: 70px 20px; }
  .section--centered          { padding: 70px 20px; }
  .section h2                 { font-size: 32px; line-height: 1.1; }
  .section--centered h2       { font-size: 36px; line-height: 1.1; }
  .section--ai h2             { font-size: 32px; }
  .header                     { padding: 16px 20px; }
}
