/* ==========================================================
   Groupe SONIR — feuille de style
   ========================================================== */
:root {
  --navy: #203467;
  --navy-dark: #16244a;
  --cyan: #00aeef;
  --cyan-light: #dcf1fc;
  --ink: #2a2f45;
  --muted: #5d6478;
  --line: #e3e7ef;
  --bg: #ffffff;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(32, 52, 103, .12);
  --container: 1120px;
  --header-h: 84px;

  /* thème par défaut (surchargé par les pages filiales) */
  --accent: var(--cyan);
  --accent-grad: linear-gradient(135deg, #00aeef 0%, #2ec5f7 100%);
  --band: var(--cyan-light);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .6em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--band { background: var(--band); }
.text-justify { text-align: justify; hyphens: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--navy); color: #fff; padding: 8px 14px; border-radius: var(--radius);
}
.skip-link:focus { left: 8px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.brand img { height: 46px; width: auto; }

.nav { display: flex; align-items: stretch; height: 100%; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(16px, 4vw, 56px); height: 100%; }
.nav > ul > li { position: relative; display: flex; align-items: center; }
.nav-link {
  display: flex; align-items: center; height: 100%;
  font-weight: 800; font-size: 14px; letter-spacing: .02em; text-transform: uppercase;
  color: var(--navy); text-decoration: none;
  background: none; border: 0; font-family: inherit; cursor: pointer; padding: 0;
  position: relative;
}
.nav-link::after {
  content: ""; position: absolute; left: -10px; right: -10px; bottom: 0; height: 4px;
  background: var(--cyan); transform: scaleX(0); transition: transform .2s ease;
}
.nav-link:hover::after, .nav-link:focus-visible::after,
.nav li.is-active > .nav-link::after { transform: scaleX(1); }

.dropdown {
  list-style: none; margin: 0; padding: 0;
  position: absolute; top: 100%; left: -10px; min-width: 200px;
  background: #fff; border-top: 4px solid var(--cyan);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.open > .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a {
  display: block; padding: 9px 16px;
  font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--line);
}
.dropdown li:last-child a { border-bottom: 0; }
.dropdown a:hover, .dropdown a[aria-current="page"] { background: var(--cyan-light); color: var(--navy); }

.menu-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy);
}
.menu-toggle svg { width: 28px; height: 28px; }

/* ---------- Héros ---------- */
.hero { position: relative; background: var(--navy); overflow: hidden; }
.hero img { width: 100%; height: clamp(170px, 24vw, 300px); object-fit: cover; }
/* voile pour la lisibilité du titre + bandes bleues diagonales de la charte */
.hero--home::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, rgba(22, 36, 74, .66) 0%, rgba(22, 36, 74, .4) 45%, rgba(22, 36, 74, 0) 75%);
}
.hero--home::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(45deg, transparent 84%, rgba(0, 113, 188, .92) 84%, rgba(0, 113, 188, .92) 90%, rgba(0, 174, 239, .9) 90%) top right / 100% 100% no-repeat,
    linear-gradient(45deg, rgba(220, 241, 252, .9) 0, rgba(220, 241, 252, .9) 7%, rgba(0, 174, 239, .35) 7%, rgba(0, 174, 239, .35) 10%, transparent 10%) bottom left / 100% 100% no-repeat;
}
.hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
}
.hero__content h1 {
  color: #fff; text-transform: uppercase; font-weight: 800;
  font-size: clamp(19px, 2.5vw, 31px); letter-spacing: .04em; line-height: 1.3;
  max-width: 25em; margin-bottom: 1.1em;
  text-shadow: 0 2px 18px rgba(16, 30, 70, .35);
}

/* ---------- Carrousel d'accueil ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.carousel { height: clamp(400px, 46vw, 580px); touch-action: pan-y; }
/* .slide ne crée pas de contexte d'empilement : image (0), voile + bandes (1), texte (2), commandes (3) */
.slide { position: absolute; inset: 0; }
.slide > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  opacity: 0; transform: scale(1.06);
  transition: opacity .9s ease, transform 7s ease-out;
}
.slide.is-active > img { opacity: 1; transform: scale(1); }
.slide .hero__content { z-index: 2; visibility: hidden; }
.slide.is-active .hero__content { visibility: visible; }
.slide .hero__content > .container > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.slide.is-active .hero__content > .container > * { opacity: 1; transform: none; }
.slide.is-active .slide__title { transition-delay: .12s; }
.slide.is-active .slide__text { transition-delay: .22s; }
.slide.is-active .btn { transition-delay: .32s; }

.slide__kicker {
  display: inline-block; margin-bottom: 14px; padding: 5px 12px;
  background: var(--cyan); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.slide__title {
  color: #fff; text-transform: uppercase; font-weight: 800;
  font-size: clamp(22px, 3.2vw, 40px); letter-spacing: .03em; line-height: 1.18;
  max-width: 17em; margin-bottom: .45em;
  text-shadow: 0 2px 18px rgba(16, 30, 70, .35);
}
.slide__text {
  color: #eef4ff; font-size: clamp(15px, 1.35vw, 18px); line-height: 1.5;
  max-width: 34em; margin-bottom: 1.6em;
  text-shadow: 0 1px 10px rgba(16, 30, 70, .45);
}

.carousel__arrow {
  position: absolute; bottom: 12px; z-index: 3;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: #fff;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background .2s ease;
}
.carousel__arrow:hover { background: var(--cyan); }
.carousel__arrow:focus-visible, .carousel__dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.carousel__arrow svg { width: 22px; height: 22px; }
.carousel__arrow--prev { right: 70px; }
.carousel__arrow--next { right: 18px; }

.carousel__nav { position: absolute; left: 0; right: 0; bottom: 31px; z-index: 3; }
.carousel__nav .container { display: flex; gap: 10px; }
.carousel__dot {
  position: relative; width: 44px; height: 5px; padding: 0; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .4); overflow: hidden;
}
/* agrandit la zone cliquable sans changer l'apparence */
.carousel__dot::before { content: ""; position: absolute; inset: -12px 0; }
.carousel__dot::after {
  content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left;
}
.carousel__dot[aria-current="true"]::after { transform: scaleX(1); }
.carousel.is-playing .carousel__dot[aria-current="true"]::after {
  animation: dot-progress var(--slide-delay, 6s) linear;
}
@keyframes dot-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; padding: 12px 26px;
  background: linear-gradient(90deg, #0099e0, var(--cyan) 60%, #23c3f5);
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border: 0; border-radius: 2px; cursor: pointer; font-family: inherit;
  transition: filter .2s ease, transform .2s ease;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }

/* ---------- Titres de section ---------- */
.section-title {
  text-align: center; text-transform: uppercase; font-weight: 800;
  font-size: clamp(20px, 2.4vw, 26px); letter-spacing: .12em; margin-bottom: 1.8em;
}
.h-band {
  text-transform: uppercase; font-weight: 800; letter-spacing: .1em;
  font-size: clamp(18px, 2.2vw, 24px);
}

/* ---------- Grille des secteurs ---------- */
.sectors {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px) clamp(18px, 2.4vw, 28px);
}
.sector { scroll-margin-top: calc(var(--header-h) + 24px); }
.sector__img { aspect-ratio: 220 / 139; overflow: hidden; }
.sector__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sector:hover .sector__img img { transform: scale(1.05); }
.sector__body { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; }
.sector__icon { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.sector h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 4px 0 2px; }
.sector p { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin: 0; }

/* ---------- Logos filiales (accueil) ---------- */
.logos {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; align-items: center;
}
.logos a {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; height: 110px; transition: box-shadow .2s ease, transform .2s ease;
}
.logos a:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.logos img { max-height: 70px; width: auto; object-fit: contain; }

/* ---------- Bloc texte + photo avec carte superposée ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 5vw, 64px); align-items: center;
}
.split + .split { margin-top: clamp(56px, 8vw, 110px); }
.split__text .lead {
  font-weight: 300; text-transform: uppercase; color: var(--navy);
  font-size: clamp(20px, 2.3vw, 27px); letter-spacing: .03em; line-height: 1.22; margin-bottom: .8em;
}
.split__text .lead strong { font-weight: 800; }
.split__text p { color: var(--navy); font-size: 15px; }
.lead--big { font-size: clamp(22px, 2.8vw, 32px) !important; }

.media { position: relative; padding-right: 22%; padding-bottom: 12%; }
.media > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.media__card {
  position: absolute; right: 0; bottom: 0; width: 52%;
  background: var(--accent-grad); color: #fff;
  padding: clamp(16px, 2vw, 24px);
  box-shadow: var(--shadow);
}
.media__card h3 { color: #fff; font-size: clamp(15px, 1.5vw, 18px); font-weight: 700; margin-bottom: .5em; }
.media__card p { font-size: 13px; line-height: 1.55; margin: 0; }

.card--orange { --accent-grad: linear-gradient(135deg, #f7a21b 0%, #e4452a 100%); }
.card--cyan { --accent-grad: linear-gradient(135deg, #00aeef 0%, #34c8f6 100%); }

/* ---------- Valeurs ---------- */
.value {
  display: grid; grid-template-columns: 300px 1fr; gap: clamp(22px, 4vw, 44px); align-items: start;
}
.value + .value { margin-top: clamp(36px, 5vw, 56px); }
.value img { width: 100%; aspect-ratio: 250 / 191; object-fit: cover; }
.value h2 { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 22px; margin-top: 4px; }
.value p { color: var(--navy); }

/* ---------- Pages filiales ---------- */
.sub-logo { max-width: 260px; max-height: 130px; width: auto; margin-bottom: 28px; }
.sub-intro .media { margin-top: clamp(0px, 6vw, 70px); }
.invest { padding-top: 0; }
.invest p { color: var(--navy); }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 6px clamp(28px, 5vw, 64px); }
.features h3 { font-size: 15.5px; font-weight: 700; margin-bottom: .2em; }
.features p { font-size: 15px; color: var(--navy); }
.features .full { grid-column: 1 / -1; }
.feature-photo img { width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow); }

.theme-bravo     { --accent-grad: linear-gradient(135deg, #1a9447 0%, #8fc13e 55%, #e3d61d 100%); --band: #e4edb9; }
.theme-almarwa   { --accent-grad: linear-gradient(135deg, #0071bc 0%, #00aeef 100%); --band: #dcf1fc; }
.theme-marwafish { --accent-grad: linear-gradient(135deg, #00799d 0%, #2cb4c8 100%); --band: #c6e6eb; }
.theme-microsa   { --accent-grad: linear-gradient(150deg, #f39a1e 0%, #8a4d1a 60%, #3c2414 100%); --band: #ffe4b6; }
.theme-sogid     { --accent-grad: linear-gradient(135deg, #fec10d 0%, #f7a81b 100%); --band: #fff8a9; }
.theme-assava    { --accent-grad: linear-gradient(135deg, #0a8a3b 0%, #6dbb45 70%, #a6cf3a 100%); --band: #e4edb9; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.form-card { background: #fff; box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid #d5dbe6; border-radius: 2px; padding: 11px 12px; background: #fff;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--cyan); outline-offset: 0; border-color: var(--cyan);
}
.form-card .btn { width: 100%; margin-top: 20px; padding-block: 14px; }
.form-status { margin: 14px 0 0; font-size: 14px; color: var(--navy); }
.form-status[data-state="error"] { color: #b42318; }

.contact-card .name { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: .06em; margin-bottom: 0; }
.contact-card .role { color: var(--cyan); font-size: 18px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.2em; }
.contact-card address, .contact-card ul {
  font-style: normal; list-style: none; padding: 0; margin: 0 0 .8em;
  font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); line-height: 2;
}
.contact-card a { text-decoration: none; }
.contact-card a:hover { color: var(--cyan); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy); color: #c9d2ea; font-size: 14px; }
.site-footer .container { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 32px; padding-block: 56px 36px; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { text-decoration: none; color: #c9d2ea; }
.site-footer a:hover { color: #fff; }
.footer-brand img { background: #fff; padding: 10px 14px; border-radius: var(--radius); height: 62px; width: auto; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 18px; font-size: 13px; text-align: center; }

/* ---------- Animations d'apparition ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .slide > img, .slide .hero__content > .container > * { transition: opacity .3s ease; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .logos { grid-template-columns: repeat(3, 1fr); }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --header-h: 70px; }
  .brand img { height: 38px; }
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; height: auto;
    background: #fff; box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    display: none;
  }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .nav > ul > li { display: block; border-bottom: 1px solid var(--line); }
  .nav-link { padding: 14px 0; width: 100%; }
  .nav-link::after { display: none; }
  .nav li.is-active > .nav-link { color: var(--cyan); }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border-top: 0; display: none; padding-bottom: 8px;
  }
  .has-dropdown.open > .dropdown { display: block; }
  .dropdown a { border-bottom: 0; padding-left: 14px; }

  .sectors { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split--reverse .split__text { order: 0; }
  .value { grid-template-columns: 220px 1fr; }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .text-justify { text-align: left; }
  .carousel { height: 480px; }
  .hero--home::before { background: linear-gradient(0deg, rgba(22, 36, 74, .78) 0%, rgba(22, 36, 74, .45) 60%, rgba(22, 36, 74, .2) 100%); }
  .hero--home .hero__content { justify-content: flex-end; padding-bottom: 64px; }
  .hero--home::after { background: linear-gradient(45deg, transparent 84%, rgba(0, 113, 188, .92) 84%, rgba(0, 113, 188, .92) 90%, rgba(0, 174, 239, .9) 90%); }
  .sectors { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .value { grid-template-columns: 1fr; }
  .media { padding: 0; }
  .media__card { position: relative; width: auto; margin: -36px 16px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; }
}
