/* ==========================================================================
   ARPI GROUP — Feuille de style principale
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --navy: #173C52;
  --navy-dark: #0E2836;
  --navy-light: #2A5570;
  --slate: #5C7290;
  --slate-light: #9AB0C6;
  --bg-soft: #F5F8FA;
  --bg-soft-2: #EDF1F5;
  --white: #FFFFFF;
  --ink: #2A333B;
  --ink-soft: #5A6672;
  --border: #E1E7EC;

  --c-info: #173C52;   /* Informatique */
  --c-transport: #2E6E8E; /* Transport */
  --c-meca: #5C7290;   /* Mécanique */
  --c-agro: #4B7A55;   /* Agropastoral */

  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 60, 82, 0.08);
  --shadow-lg: 0 20px 50px rgba(23, 60, 82, 0.14);
  --container: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ---------- Justified body copy ---------- */
.text-justify {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
@media (max-width: 560px) {
  .text-justify { text-align: left; hyphens: none; -webkit-hyphens: none; }
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 12px;
}

.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 16px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; text-align: justify; text-justify: inter-word; hyphens: auto; }
.section-head.center p { text-align: center; hyphens: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-primary { background: var(--white); color: var(--navy); }
.btn-primary:hover { background: var(--bg-soft-2); transform: translateY(-2px); }
.btn-outline { border-color: rgba(255,255,255,0.55); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-dark); transform: translateY(-2px); }
.btn-ghost { border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.nav__logo img { height: 120px; width: auto; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav__links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
  position: relative;
  padding: 4px 0;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--slate);
  transition: width 0.25s ease;
}
.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }
.nav__links a.active { color: var(--slate); }
.nav__cta { display: flex; align-items: center; gap: 18px; }
.nav__cta .btn { padding: 11px 24px; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span { width: 26px; height: 2px; background: var(--navy); border-radius: 2px; }

@media (max-width: 900px) {
  .nav__links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    opacity: 0;
    transition: all 0.3s ease;
  }
  .nav__links.open { transform: translateY(0); opacity: 1; }
  .nav__toggle { display: flex; }
  .nav__cta .btn-ghost { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 110px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero__blob-1, .hero__blob-2 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero__blob-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255,255,255,0.10), transparent 70%);
  top: -200px; right: -160px;
}
.hero__blob-2 {
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(154,176,198,0.20), transparent 70%);
  bottom: -160px; left: -90px;
}
.hero__dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 80%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 80%);
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero__art { position: relative; }
.hero__art svg { width: 100%; height: auto; display: block; }
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 340px; margin: 0 auto; order: -1; }
}
.hero__inner { max-width: 760px; position: relative; z-index: 1; }
.hero .eyebrow { color: var(--slate-light); }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 22px;
}
.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin-bottom: 36px;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero__tags { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__tags span {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.9);
}

.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 84px 0 70px;
  text-align: center;
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 14px; }
.page-hero p { color: rgba(255,255,255,0.82); max-width: 620px; margin: 0 auto; }
.page-hero p.text-justify { text-align: justify; hyphens: none; }

/* ---------- Cards: divisions ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 620px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.division-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.division-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.division-card .visual-banner {
  height: 128px;
  position: relative;
  overflow: hidden;
  background: var(--accent, var(--navy));
  background: linear-gradient(135deg, var(--accent, var(--navy)) 0%, color-mix(in srgb, var(--accent, var(--navy)) 65%, #000 20%) 100%);
  display: flex; align-items: center; justify-content: center;
}
.division-card .visual-banner .dot-pattern {
  position: absolute; inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 16px 16px;
}
.division-card .visual-banner .blob {
  position: absolute;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  bottom: -60px; right: -30px;
}
.division-card .visual-banner svg {
  width: 52px; height: 52px;
  color: #fff;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}
.division-card .card-body { padding: 26px 26px 30px; }
.division-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.division-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 18px; text-align: justify; text-justify: inter-word; hyphens: auto; }
.division-card a.more { font-size: 0.88rem; font-weight: 600; color: var(--accent, var(--navy)); }

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  color: var(--white);
  background: var(--accent, var(--navy));
  margin-bottom: 16px;
}

/* ---------- Values / features ---------- */
.value-card {
  padding: 30px 26px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  height: 100%;
}
.value-card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.value-card .icon svg { width: 24px; height: 24px; }
.value-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.value-card p { color: var(--ink-soft); font-size: 0.94rem; text-align: justify; text-justify: inter-word; hyphens: auto; }

/* ---------- Service detail sections ---------- */
.service-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
  padding: 70px 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-child { border-bottom: none; }
.service-block.reverse .service-visual { order: 2; }
.service-visual {
  border-radius: var(--radius);
  min-height: 360px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  background: var(--accent, var(--navy));
  background: linear-gradient(150deg, var(--accent, var(--navy)) 0%, color-mix(in srgb, var(--accent, var(--navy)) 60%, #000 22%) 100%);
  position: relative;
  overflow: hidden;
  padding: 30px;
}
.service-visual svg { width: 100%; max-width: 320px; height: auto; position: relative; z-index: 1; }
.service-visual::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.14), transparent 60%);
}
.service-content h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 16px; }
.service-content > p { color: var(--ink-soft); margin-bottom: 22px; text-align: justify; text-justify: inter-word; hyphens: auto; }
.service-list { display: grid; gap: 12px; margin-bottom: 22px; }
.service-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.96rem;
  color: var(--ink);
}
.service-list li .dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent, var(--navy));
  margin-top: 8px;
}
.ambition-box {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent, var(--navy));
  padding: 18px 22px;
  border-radius: 0 10px 10px 0;
  font-size: 0.93rem;
  color: var(--ink-soft);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.ambition-box strong { color: var(--navy); }

@media (max-width: 900px) {
  .service-block, .service-block.reverse { grid-template-columns: 1fr; gap: 32px; }
  .service-block.reverse .service-visual { order: 0; }
  .service-visual { min-height: 220px; }
}

/* ---------- Team ---------- */
.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.team-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--bg-soft-2);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  color: var(--slate);
}
.team-avatar svg { width: 38px; height: 38px; }
.team-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.team-card .role { font-size: 0.85rem; color: var(--slate); font-weight: 600; margin-bottom: 10px; }
.team-card .note { font-size: 0.82rem; color: var(--ink-soft); font-style: italic; }

.note-banner {
  background: var(--bg-soft);
  border: 1px dashed var(--slate-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 50px;
}
.note-banner strong { color: var(--navy); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
}
.contact-info-card h3 { color: var(--white); margin-bottom: 22px; }
.contact-row { display: flex; gap: 16px; margin-bottom: 22px; align-items: flex-start; }
.contact-row .icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
}
.contact-row .icon svg { width: 20px; height: 20px; }
.contact-row .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--slate-light); margin-bottom: 3px; }
.contact-row .value { font-size: 0.98rem; }
.divisions-mini { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); }
.divisions-mini li { font-size: 0.88rem; padding: 6px 0; color: rgba(255,255,255,0.85); }

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 34px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg-soft);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--slate);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 10px; }

.map-placeholder {
  margin-top: 26px;
  border-radius: var(--radius);
  height: 220px;
  background: var(--bg-soft-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 0h40v40H0z' fill='none'/%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23E1E7EC' stroke-width='1'/%3E%3C/svg%3E");
  display: flex; align-items: center; justify-content: center;
  color: var(--slate);
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}
.map-placeholder svg { width: 22px; height: 22px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); font-size: 1.7rem; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.8); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.75); padding-top: 70px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col img { height: 100px; margin-bottom: 5px; }
.footer-col p { font-size: 0.9rem; line-height: 1.7; margin-bottom: 16px; text-align: justify; text-justify: inter-word; hyphens: auto; }
.footer-col h4 { color: var(--white); font-family: 'Poppins', sans-serif; font-size: 0.95rem; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul li { margin-bottom: 11px; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; font-size: 0.82rem; flex-wrap: wrap; gap: 10px;
}
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.social-links a svg { width: 16px; height: 16px; }
.social-links a:hover { background: var(--slate); }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
