/* =========================================================
   VARIABLES
   ========================================================= */

:root {
  --bg: #f7f9fc;
  --bg-alt: #eef4ff;
  --surface: #ffffff;

  --text: #172033;
  --text-soft: #5f6b7a;

  --primary: #2563eb;
  --primary-dark: #1d4ed8;

  --border: #dce3ee;

  --shadow:
    0 20px 50px rgba(15, 23, 42, 0.08);

  --radius: 22px;
}


/* =========================================================
   RESET / BASE
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 90px;
}

body {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: var(--bg);
  color: var(--text);

  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;

  z-index: 100;

  background: rgba(255, 255, 255, 0.88);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border-bottom:
    1px solid rgba(220, 227, 238, 0.8);
}

.nav-container {
  min-height: 74px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 13px;

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #5b82f6
    );

  color: white;

  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.03em;

  box-shadow:
    0 8px 22px
    rgba(37, 99, 235, 0.2);
}

.brand-name {
  color: var(--text);

  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.main-nav {
  display: flex;
  align-items: center;

  gap: 28px;

  font-size: 0.95rem;
  font-weight: 600;
}

.main-nav a {
  color: var(--text-soft);

  transition:
    color 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary);
}

.menu-button {
  display: none;

  border: 0;
  background: transparent;

  color: var(--text);

  font-size: 1.7rem;

  cursor: pointer;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  padding: 120px 0 70px;

  background:
    radial-gradient(
      circle at top right,
      rgba(37, 99, 235, 0.14),
      transparent 35%
    ),
    var(--bg);
}

.hero-content {
  display: grid;

  grid-template-columns:
    1.15fr 0.85fr;

  gap: 60px;

  align-items: center;
}

.eyebrow {
  margin-bottom: 14px;

  color: var(--primary);

  text-transform: uppercase;

  letter-spacing: 0.12em;

  font-size: 0.78rem;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;

  font-size:
    clamp(2.7rem, 5.8vw, 4.7rem);

  line-height: 1.04;

  letter-spacing: -0.05em;
}

.hero h1 span {
  color: var(--primary);
}

.hero-description {
  max-width: 700px;

  margin-top: 26px;

  font-size: 1.12rem;

  color: var(--text-soft);
}

.hero-actions {
  margin-top: 34px;

  display: flex;
  flex-wrap: wrap;

  gap: 14px;
}


/* =========================================================
   BOUTONS
   ========================================================= */

.button {
  min-height: 50px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 12px 22px;

  border-radius: 14px;

  font-weight: 700;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--primary);

  color: white;

  box-shadow:
    0 12px 30px
    rgba(37, 99, 235, 0.23);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  background: white;

  border:
    1px solid var(--border);

  color: var(--text);
}

.button-secondary:hover {
  border-color:
    rgba(37, 99, 235, 0.35);

  box-shadow:
    0 10px 24px
    rgba(15, 23, 42, 0.06);
}


/* =========================================================
   HERO CARD
   ========================================================= */

.hero-card {
  padding: 34px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.98),
      rgba(242, 246, 255, 0.95)
    );

  border:
    1px solid var(--border);

  border-radius: 28px;

  box-shadow: var(--shadow);
}

.hero-card-badge {
  display: inline-block;

  padding: 7px 12px;

  margin-bottom: 24px;

  border-radius: 999px;

  background:
    rgba(37, 99, 235, 0.1);

  color: var(--primary);

  font-size: 0.82rem;
  font-weight: 800;
}

.hero-card h2 {
  font-size: 2rem;

  line-height: 1.15;

  letter-spacing: -0.03em;
}

.hero-card > p {
  margin-top: 16px;

  color: var(--text-soft);
}

.hero-card-stats {
  margin-top: 30px;

  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 10px;
}

.hero-card-stats div {
  padding: 16px 10px;

  background: white;

  border:
    1px solid var(--border);

  border-radius: 16px;

  text-align: center;
}

.hero-card-stats strong {
  display: block;

  font-size: 0.92rem;
}

.hero-card-stats span {
  display: block;

  margin-top: 3px;

  font-size: 0.76rem;

  color: var(--text-soft);
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  padding: 90px 0;
}

#services {
  padding-top: 70px;
}

.section-alt {
  background: var(--bg-alt);
}

.section-heading {
  max-width: 720px;

  margin-bottom: 42px;
}

.section-heading h2 {
  font-size:
    clamp(2rem, 5vw, 3.2rem);

  line-height: 1.1;

  letter-spacing: -0.04em;
}

.section-heading > p:last-child {
  margin-top: 16px;

  color: var(--text-soft);
}


/* =========================================================
   SERVICES
   ========================================================= */

.cards-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 22px;
}

.service-card {
  padding: 30px;

  background: var(--surface);

  border:
    1px solid var(--border);

  border-radius: var(--radius);

  box-shadow:
    0 12px 30px
    rgba(15, 23, 42, 0.04);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);

  border-color:
    rgba(37, 99, 235, 0.2);

  box-shadow:
    0 18px 40px
    rgba(15, 23, 42, 0.07);
}

.service-icon {
  width: 46px;
  height: 46px;

  display: grid;

  place-items: center;

  margin-bottom: 28px;

  border-radius: 14px;

  background:
    rgba(37, 99, 235, 0.1);

  color: var(--primary);

  font-size: 0.85rem;
  font-weight: 800;
}

.service-card h3 {
  margin-bottom: 12px;

  font-size: 1.25rem;
}

.service-card p {
  color: var(--text-soft);
}


/* =========================================================
   POURQUOI MALLOUL DIGITAL
   ========================================================= */

.why-section {
  background: white;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.why-card {
  padding: 32px;

  background:
    linear-gradient(
      145deg,
      #ffffff,
      #f8faff
    );

  border:
    1px solid var(--border);

  border-radius: 24px;

  box-shadow:
    0 14px 35px
    rgba(15, 23, 42, 0.05);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.why-card:hover {
  transform: translateY(-4px);

  border-color:
    rgba(37, 99, 235, 0.2);

  box-shadow:
    0 20px 45px
    rgba(15, 23, 42, 0.08);
}

.why-icon {
  width: 50px;
  height: 50px;

  display: grid;
  place-items: center;

  margin-bottom: 24px;

  border-radius: 15px;

  background:
    rgba(37, 99, 235, 0.1);

  color: var(--primary);

  font-size: 0.85rem;
  font-weight: 800;
}

.why-card h3 {
  margin-bottom: 12px;

  font-size: 1.3rem;
}

.why-card p {
  color: var(--text-soft);
}

/* =========================================================
   OUTILS
   ========================================================= */

.tools-carousel-wrapper {
  position: relative;
}

.tools-grid {
  display: grid;

  grid-template-columns:
    repeat(2, 1fr);

  gap: 26px;

  scroll-behavior: smooth;
}

.tool-card {
  position: relative;

  padding: 36px;

  background: white;

  border:
    1px solid var(--border);

  border-radius: 26px;

  box-shadow:
    0 16px 40px
    rgba(15, 23, 42, 0.06);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-5px);

  box-shadow:
    0 24px 55px
    rgba(15, 23, 42, 0.1);
}

.tool-card-featured {
  border-color:
    rgba(37, 99, 235, 0.3);

  background:
    linear-gradient(
      145deg,
      #ffffff,
      #f5f8ff
    );
}

.tool-card-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 28px;
}

.product-label {
  display: inline-block;

  padding: 7px 12px;

  border-radius: 999px;

  background:
    rgba(37, 99, 235, 0.1);

  color: var(--primary);

  font-size: 0.78rem;
  font-weight: 800;
}

.product-label-soon {
  background: #f2f3f6;

  color: #6f7785;
}

.tool-status {
  padding: 6px 10px;

  border-radius: 999px;

  background: #e9f9ef;

  color: #178344;

  font-size: 0.74rem;
  font-weight: 800;
}

.tool-icon {
  width: 58px;
  height: 58px;

  display: grid;

  place-items: center;

  margin-bottom: 24px;

  border-radius: 18px;

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #4f7df3
    );

  color: white;

  font-size: 1rem;
  font-weight: 900;

  letter-spacing: -0.02em;

  box-shadow:
    0 12px 30px
    rgba(37, 99, 235, 0.22);
}

.tool-card h3 {
  margin-bottom: 14px;

  font-size: 1.8rem;

  line-height: 1.1;

  letter-spacing: -0.035em;
}

.tool-card > p {
  color: var(--text-soft);
}

.tool-features {
  margin: 26px 0 30px;

  display: grid;

  gap: 11px;

  list-style: none;
}

.tool-features li {
  position: relative;

  padding-left: 25px;

  color: var(--text-soft);
}

.tool-features li::before {
  content: "✓";

  position: absolute;

  left: 0;

  color: var(--primary);

  font-weight: 900;
}

.button-disabled {
  background: #eef1f5;

  color: #949baa;

  cursor: not-allowed;

  border:
    1px solid #e1e5eb;

  box-shadow: none;
}

.button-disabled:hover {
  transform: none;

  background: #eef1f5;
}


/* =========================================================
   CONTROLES DU CARROUSEL
   cachés sur ordinateur
   ========================================================= */

.tools-carousel-controls {
  display: none;
}

.carousel-button {
  width: 44px;
  height: 44px;

  display: grid;

  place-items: center;

  border:
    1px solid var(--border);

  border-radius: 50%;

  background: white;

  color: var(--text);

  font-size: 1.2rem;
  font-weight: 800;

  cursor: pointer;

  box-shadow:
    0 8px 22px
    rgba(15, 23, 42, 0.08);

  transition:
    transform 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.carousel-button:hover {
  transform: translateY(-2px);

  color: var(--primary);

  border-color:
    rgba(37, 99, 235, 0.35);
}

.carousel-button:active {
  transform: scale(0.95);
}

.carousel-dots {
  display: flex;

  align-items: center;

  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #c8d1de;

  transition:
    width 0.2s ease,
    background 0.2s ease,
    border-radius 0.2s ease;
}

.carousel-dot.active {
  width: 22px;

  border-radius: 999px;

  background: var(--primary);
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
  background: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: start;
}

.contact-form,
.contact-info {
  background: white;
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow:
    0 16px 40px
    rgba(15, 23, 42, 0.06);
}

.contact-form {
  padding: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.92rem;
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;

  padding: 14px 15px;

  border:
    1px solid var(--border);

  border-radius: 14px;

  background: white;
  color: var(--text);

  font: inherit;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color:
    rgba(37, 99, 235, 0.6);

  box-shadow:
    0 0 0 4px
    rgba(37, 99, 235, 0.08);
}

.contact-submit {
  border: 0;
  cursor: pointer;
}

.form-status {
  margin-top: 14px;

  min-height: 24px;

  color: var(--text-soft);

  font-size: 0.9rem;
}

.contact-info {
  padding: 36px;
}

.contact-badge {
  display: inline-block;

  margin-bottom: 22px;

  padding: 7px 12px;

  border-radius: 999px;

  background:
    rgba(37, 99, 235, 0.1);

  color: var(--primary);

  font-size: 0.78rem;
  font-weight: 800;
}

.contact-info h3 {
  margin-bottom: 14px;

  font-size: 2rem;

  line-height: 1.1;

  letter-spacing: -0.03em;
}

.contact-info > p {
  color: var(--text-soft);
}

.contact-services {
  margin: 26px 0;

  display: grid;
  gap: 11px;

  list-style: none;
}

.contact-services li {
  position: relative;

  padding-left: 24px;

  color: var(--text-soft);
}

.contact-services li::before {
  content: "✓";

  position: absolute;

  left: 0;

  color: var(--primary);

  font-weight: 900;
}

.contact-email {
  padding-top: 22px;

  border-top:
    1px solid var(--border);
}

.contact-email span {
  display: block;

  margin-bottom: 5px;

  color: var(--text-soft);

  font-size: 0.82rem;
}

.contact-email a {
  color: var(--primary);

  font-weight: 700;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  padding: 60px 0 24px;

  border-top:
    1px solid var(--border);

  background: white;
}

.footer-grid {
  display: grid;

  grid-template-columns:
    1.4fr 0.8fr 0.8fr;

  gap: 50px;

  padding-bottom: 40px;
}

.footer-brand {
  max-width: 420px;
}

.footer-brand p {
  margin-top: 18px;

  color: var(--text-soft);
}

.footer-column {
  display: flex;
  flex-direction: column;

  gap: 10px;
}

.footer-column h3 {
  margin-bottom: 8px;

  font-size: 1rem;
}

.footer-column a {
  color: var(--text-soft);

  transition:
    color 0.2s ease;
}

.footer-column a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 22px;

  border-top:
    1px solid var(--border);

  color: var(--text-soft);

  font-size: 0.9rem;
}

/* =========================================================
   PAGES LÉGALES
   ========================================================= */

.legal-page {
  padding: 90px 0;
  background: var(--bg);
}

.legal-container {
  max-width: 900px;
}

.legal-heading {
  margin-bottom: 42px;
}

.legal-heading h1 {
  font-size:
    clamp(2.5rem, 6vw, 4.5rem);

  line-height: 1.05;
  letter-spacing: -0.05em;
}

.legal-heading > p:last-child {
  max-width: 680px;

  margin-top: 18px;

  color: var(--text-soft);

  font-size: 1.05rem;
}

.legal-card {
  margin-bottom: 22px;

  padding: 32px;

  background: white;

  border:
    1px solid var(--border);

  border-radius: 22px;

  box-shadow:
    0 12px 30px
    rgba(15, 23, 42, 0.04);
}

.legal-card h2 {
  margin-bottom: 14px;

  font-size: 1.4rem;
}

.legal-card p {
  color: var(--text-soft);
}

.legal-card p + p {
  margin-top: 14px;
}

.legal-list {
  margin-top: 16px;

  display: grid;
  gap: 10px;

  padding-left: 20px;

  color: var(--text-soft);
}

.legal-email {
  display: inline-block;

  margin-top: 10px;

  color: var(--primary);

  font-weight: 700;
}

.legal-back-link {
  color: var(--text-soft);

  font-weight: 600;
}

.legal-back-link:hover {
  color: var(--primary);
}

/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 900px) {

  .hero-content {
    grid-template-columns: 1fr;

    gap: 45px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 90px 0 60px;
  }

  .hero-card {
    max-width: 700px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   MOBILE / CARROUSEL OUTILS
   ========================================================= */

@media (max-width: 720px) {

  /* NAVIGATION */

  .main-nav {
    position: absolute;

    top: 74px;

    left: 20px;
    right: 20px;

    display: none;

    flex-direction: column;

    align-items: stretch;

    padding: 20px;

    background: white;

    border:
      1px solid var(--border);

    border-radius: 18px;

    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 8px 4px;
  }

  .menu-button {
    display: block;
  }


  /* HERO */

  .hero-card-stats {
    grid-template-columns: 1fr;
  }


  /* CARROUSEL OUTILS */

  .tools-carousel-wrapper {
    overflow: hidden;
  }

  .tools-grid {
    display: flex;

    grid-template-columns: none;

    gap: 18px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type:
      x mandatory;

    scroll-behavior: smooth;

    overscroll-behavior-inline:
      contain;

    padding:
      2px 2px 12px;

    scrollbar-width: none;

    -webkit-overflow-scrolling:
      touch;
  }

  .tools-grid::-webkit-scrollbar {
    display: none;
  }

  .tool-card {
    flex:
      0 0 calc(88% - 2px);

    min-width: 0;

    scroll-snap-align: start;

    scroll-snap-stop: always;
  }

  .tool-card:hover {
    transform: none;
  }

  .tools-carousel-controls {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 16px;

    margin-top: 24px;
  }

}

/* =========================================================
   PETITS MOBILES
   ========================================================= */

@media (max-width: 520px) {

  .container {
    width:
      min(
        calc(100% - 28px),
        1120px
      );
  }


  /* HEADER */

  .nav-container {
    min-height: 68px;
  }

  .main-nav {
    top: 68px;

    left: 14px;
    right: 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;

    border-radius: 12px;
  }

  .brand-name {
    font-size: 1rem;
  }


  /* HERO */

  .hero {
    padding: 70px 0 50px;
  }

  .hero h1 {
    font-size:
      clamp(2.4rem, 13vw, 4rem);
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-card {
    padding: 26px;
  }

  .hero-actions {
    flex-direction: column;
  }


  /* SECTIONS */

  .section {
    padding: 52px 0;
  }

  .section-heading {
    margin-bottom: 32px;
  }


  /* SERVICES */

  .service-card {
    padding: 26px;
  }


  /* OUTILS */

  .tool-card {
    flex: 0 0 90%;

    padding: 27px;
  }

  .tool-card h3 {
    font-size: 1.55rem;
  }

  .tool-features {
    margin:
      22px 0 26px;
  }


  /* CONTACT */

  .contact-form,
  .contact-info {
    padding: 26px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-submit {
    width: 100%;
  }


  /* BOUTONS */

  .hero-actions .button {
    width: 100%;
  }


  /* FOOTER */

  #services {
    padding-top: 50px;
  }

  .footer-grid {
    grid-template-columns: 1fr;

    gap: 30px;
  }

  .legal-page {
    padding: 60px 0;
  }

  .legal-card {
    padding: 24px;
  }

  .legal-back-link {
    font-size: 0.88rem;
  }

}


/* =========================================================
   TRES PETITS ECRANS
   ========================================================= */

@media (max-width: 380px) {

  .tool-card {
    flex: 0 0 94%;
  }

  .tool-card {
    padding: 23px;
  }

  .hero-card {
    padding: 22px;
  }

}


/* =========================================================
   ACCESSIBILITE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    transition-duration:
      0.01ms !important;

    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;
  }

}