/* =========================================================
   SAWA — Page « En maintenance »
   Reproduction responsive de la maquette Illustrator.
   Le texte est conservé en version graphique (images),
   la mise en page se recompose sur mobile / tablette / desktop.
   ========================================================= */

/* ---------- Variables de thème (couleurs de la maquette) ---------- */
:root {
  --cream:    #fbfcfa;  /* fond principal            */
  --lavender: #f4eff4;  /* bandeau contact           */
  --teal:     #082f39;  /* pied de page & contours   */
  --content:  1440px;   /* largeur max des cartes    */
}

/* ---------- Reset léger ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--teal);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

img { display: block; max-width: 100%; height: auto; }

a { text-decoration: none; }

/* ---------- Utilitaire d'accessibilité ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* =========================================================
   EN-TÊTE : logo + titre « En maintenance… »
   ========================================================= */
.hero {
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(40px, 6vw, 96px) 20px clamp(28px, 4vw, 56px);
  gap: clamp(20px, 3vw, 44px);
}

.hero__logo {
  width: clamp(92px, 10vw, 142px);
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.5vw, 22px);
}

.hero__maintenance {
  width: min(88vw, 620px);
}

/* Sous-titre reconstitué en 3 morceaux alignés (une seule ligne homogène) */
.hero__subtitle {
  margin: 0;
  width: min(70vw, 496px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Largeurs proportionnelles aux largeurs réelles des mots (total = 100 %)
   -> hauteurs identiques, la ligne se reconstitue sans couture */
.sub { display: block; }
.sub--a   { width: 24.85%; }   /* « Agence »        */
.sub--cyc { width: 45.24%; }   /* « 100% Créative » */
.sub--c   { width: 29.91%; }   /* « à Abidjan »     */

/* « 100% Créative » : glyphes rendus via masque alpha (couleur fixe) */
.sub--cyc {
  aspect-ratio: 456 / 107;
  background-color: #082f39;                 /* couleur d'origine (teal) */
  /* chemin relatif au fichier CSS (dossier css/) */
  -webkit-mask: url("../assets/sub-creative.png") center / contain no-repeat;
          mask: url("../assets/sub-creative.png") center / contain no-repeat;
}

/* =========================================================
   CARTES DE SERVICES (grille responsive)
   4 colonnes  ->  2 colonnes  ->  1 colonne
   ========================================================= */
.services {
  background: var(--cream);
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(24px, 3vw, 48px) clamp(20px, 4vw, 56px) clamp(52px, 7vw, 112px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 34px);
  align-items: start;
}

.card {
  --tilt: 0deg;             /* inclinaison définie aléatoirement en JS */
  --radius: 2.6cqi;         /* rayon d'arrondi, proportionnel (coins des PNG) */
  position: relative;
  margin: 0;
  container-type: inline-size;
  transform-origin: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.card__img {
  width: 100%;
  border-radius: var(--radius);
}

/* Survol : inclinaison aléatoire (3–6° via --tilt) + zoom.
   (l'entrée utilise « translate », le survol « transform » : aucun conflit) */
@media (hover: hover) {
  .card:hover {
    transform: rotate(var(--tilt)) scale(1.045);
    z-index: 3;
  }
}

/* Tablette : 2 colonnes */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile : 1 colonne */
@media (max-width: 560px) {
  .services {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
}

/* =========================================================
   CONTACT : « Vous avez un projet ? » + boutons
   Bandeau lavande pleine largeur
   ========================================================= */
.contact {
  background: var(--lavender);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(44px, 6vw, 92px) 20px;
  gap: clamp(28px, 4vw, 52px);
}

.contact__title {
  width: min(82vw, 540px);
}

.contact__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 2.4vw, 30px);
  width: 100%;
}

/* Boutons : forme pilule, calés sur la hauteur (proportions d'origine) */
.btn {
  display: inline-block;
  border-radius: 999px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.btn img { height: clamp(52px, 6vw, 70px); width: auto; display: block; }

@media (hover: hover) {
  .btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(8, 47, 57, 0.28);
  }
}

/* Mobile : boutons empilés, pleine largeur */
@media (max-width: 560px) {
  .contact__buttons { flex-direction: column; }
  .btn { width: 100%; max-width: 340px; }
  .btn img { width: 100%; height: auto; }
}

/* =========================================================
   PIED DE PAGE : « Just Creativity »
   ========================================================= */
.footer {
  background: var(--teal);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(26px, 3.4vw, 46px) 20px;
}

.footer__logo {
  height: clamp(34px, 4vw, 54px);
  width: auto;
}

/* =========================================================
   Animations d'entrée (respectent prefers-reduced-motion)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .hero__logo,
  .hero__title,
  .card,
  .contact__title,
  .btn {
    animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .hero__title      { animation-delay: 0.08s; }
  .card:nth-child(1){ animation-delay: 0.14s; }
  .card:nth-child(2){ animation-delay: 0.22s; }
  .card:nth-child(3){ animation-delay: 0.30s; }
  .card:nth-child(4){ animation-delay: 0.38s; }
  .contact__title   { animation-delay: 0.10s; }

  /* On anime « translate » (et non « transform ») pour laisser le survol
     utiliser librement rotate()/scale() sans être bloqué par l'entrée. */
  @keyframes fade-up {
    from { opacity: 0; translate: 0 22px; }
    to   { opacity: 1; translate: 0 0; }
  }
}
