/* ==========================================================================
   Stefi – Page « Website under construction »
   Intégration du PSD « stefi-website underconstruction.psd » (artboard 1440 × 1071)

   Sommaire
   1. Polices
   2. Variables (design tokens)
   3. Reset / base
   4. Bloc .page (layout + emblème de fond)
   5. Bloc .brand (logo)
   6. Bloc .hero (titre + illustration)
   7. Bloc .contact (intro + coordonnées)
   8. Breakpoint tablette  (≥ 768px)
   9. Breakpoint desktop   (≥ 1200px)
   10. Préférences utilisateur
   ========================================================================== */


/* ==========================================================================
   1. Polices
   Gilroy (Radomir Tinkov) est une police commerciale : déposer les fichiers
   sous licence dans assets/fonts/. Si Gilroy est installée sur le poste,
   local() la trouve directement.
   ========================================================================== */
@font-face {
  font-family: "Gilroy";
  src: local("Gilroy-Bold"), local("Gilroy Bold"),
       url("../assets/fonts/Gilroy-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: local("Gilroy-Heavy"), local("Gilroy Heavy"),
       url("../assets/fonts/Gilroy-Heavy.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}


/* ==========================================================================
   2. Variables (valeurs extraites du PSD)
   ========================================================================== */
:root {
  /* Couleurs */
  --color-ink: #0F0C1D;           /* texte sombre   – rgb(15, 12, 29)  */
  --color-accent: #FF8F1F;        /* orange Stefi   – rgb(255, 143, 31) */
  /* ⚠ Accessibilité : #FF8F1F sur blanc = contraste 2,28:1 (WCAG AA exige 3:1 en grand texte,
     4,5:1 en texte courant). Valeur conservée pour fidélité au PSD ; alternative conforme
     à valider avec le designer : #D96C00 (3,45:1) ou #B35900 (4,83:1). */
  --color-bg: #FFFFFF;
  --color-on-accent: #FFFFFF;     /* pictogramme téléphone */

  /* Emblème de fond : #070D23 en dégradé (voir bg-emblem.svg).
     Opacité du calque PSD = 7 % (18/255) ; 6 % en CSS donne le même rendu que la fusion
     Photoshop (écart mesuré par comparaison pixel à pixel avec le composite du PSD). */
  --emblem-opacity: 0.06;

  /* Typographie */
  --font-main: "Gilroy", "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fw-bold: 700;                 /* Gilroy-Bold  */
  --fw-heavy: 900;                /* Gilroy-Heavy */

  /*
    Unité d'échelle « --u » = 1px du PSD.
    - ≥ 1440px : --u vaut exactement 1px (1rem/16) → rendu pixel perfect.
    - < 1440px : --u se réduit proportionnellement à la largeur (100vw / 1440).
    Utilisée à partir du breakpoint tablette ; le mobile a ses propres valeurs.
  */
  --u: min(calc(1rem / 16), calc(100vw / 1440));

  /* Gouttière latérale mobile */
  --gutter: 1rem;
}


/* ==========================================================================
   3. Reset / base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-main);
  font-weight: var(--fw-bold);
  line-height: 1;
  /* Le PSD évite la ligature « fi » (Stefi) via un espace à approche négative :
     on la désactive proprement en CSS. */
  font-variant-ligatures: no-common-ligatures;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
p,
address {
  margin: 0;
}

address {
  font-style: normal;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}


/* ==========================================================================
   4. Bloc .page — layout global + emblème Outsourcia en fond
   Ordre des calques PSD (bas → haut) : emblème < illustration < textes / icônes < logo
   ========================================================================== */
.page {
  position: relative;
  isolation: isolate;               /* contexte d'empilement pour le z-index négatif */
  overflow: clip;                   /* l'emblème déborde de l'artboard (jusqu'à y = 1303) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 2.5rem var(--gutter) 2rem;
  text-align: center;
}

/* Emblème (calque « Vector Smart Object ») : dégradé sombre → transparent, très faible opacité */
.page::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -1rem;
  left: 50%;
  width: 150vw;
  aspect-ratio: 492.488 / 492.222;
  translate: -50% 0;
  background: url("../assets/img/bg-emblem.svg") no-repeat center / contain;
  opacity: var(--emblem-opacity);
  pointer-events: none;
}

.page__main {
  display: contents;                /* le <main> n'impacte pas le flux flex */
}


/* ==========================================================================
   5. Bloc .brand — logo
   ========================================================================== */
.brand__logo {
  width: 11.25rem;                  /* 180px mobile */
}


/* ==========================================================================
   6. Bloc .hero — titre + illustration
   ========================================================================== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero__title {
  margin-top: 2rem;
  font-size: clamp(1.75rem, 8.5vw, 2.75rem);
  font-weight: var(--fw-heavy);
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;        /* PSD : « Tout en capitales » */
  color: var(--color-ink);
  text-wrap: balance;
}

.hero__accent {
  color: var(--color-accent);
}

.hero__illustration {
  display: block;
  margin-top: 1.75rem;
  width: min(88%, 38.6875rem);      /* 88 % : l'ombre décalée (translate) reste dans l'écran */
}

/*
  Le cadre de l'illustration inclut l'ombre portée à droite : dans le PSD le cadre
  est décalé de +44,5px (sur 619px = 7,2 %) pour que la barrière paraisse centrée.
*/
.hero__image {
  width: 100%;
  translate: 7.2% 0;
}


/* ==========================================================================
   7. Bloc .contact — intro + coordonnées
   ========================================================================== */
.contact {
  width: 100%;
  margin-top: 1.75rem;
}

.contact__intro {
  font-size: 1.375rem;              /* 22px mobile */
  font-weight: var(--fw-heavy);
  line-height: 1.15;
  color: var(--color-ink);
  text-wrap: balance;
}

.contact__highlight {
  display: block;
  color: var(--color-accent);
}

.contact__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 1.25rem;               /* 20px mobile */
}

/* Composant réutilisable : [libellé] [icône] [lien] */
.contact__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 0.3em;
  row-gap: 0.35em;
}

.contact__label {
  color: var(--color-accent);
  margin-right: 0.1em;              /* PSD : 14px libellé → icône, 10px icône → lien */
}

.contact__icon {
  flex: none;
  width: 1.116em;                   /* 39px pour un corps de 34,94px */
  height: 1.116em;
  fill: var(--color-accent);
}

.contact__icon-glyph {
  fill: var(--color-on-accent);
}

.contact__link {
  color: var(--color-ink);
  text-decoration: none;
  overflow-wrap: anywhere;          /* l'e-mail ne déborde jamais en mobile */
  border-radius: 2px;
  transition: color 0.2s ease;
}

.contact__link--phone {
  font-size: 0.8958em;              /* PSD : 31,30px vs 34,94px */
  white-space: nowrap;
}

/* États interactifs : ABSENTS du PSD — proposition sobre, à valider avec le designer */
.contact__link:hover {
  color: var(--color-accent);
}

.contact__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}


/* ==========================================================================
   8. Tablette (≥ 768px) — on passe sur l'échelle proportionnelle au PSD (--u)
   ========================================================================== */
@media (min-width: 768px) {
  .page {
    padding: calc(72 * var(--u)) 2rem calc(43 * var(--u));
  }

  .page::before {
    top: calc(-40 * var(--u));
    width: calc(1344 * var(--u));
  }

  .brand__logo {
    width: max(11.25rem, calc(304 * var(--u)));
  }

  .hero__title {
    margin-top: calc(54 * var(--u));
    font-size: calc(78.85 * var(--u));
    line-height: 1.05;              /* le titre peut passer sur 2 lignes en tablette */
  }

  .hero__illustration {
    margin-top: calc(47 * var(--u));
    width: calc(619 * var(--u));
  }

  .contact {
    margin-top: calc(50 * var(--u));
  }

  .contact__intro {
    font-size: max(1.375rem, calc(46.96 * var(--u)));
    line-height: 1;
  }

  .contact__list {
    margin-top: calc(31 * var(--u));
    font-size: max(1.25rem, calc(34.94 * var(--u)));
    gap: 0.5em;
  }
}


/* ==========================================================================
   9. Desktop (≥ 1200px) — coordonnées sur une seule ligne, comme le PSD
   ========================================================================== */
@media (min-width: 1200px) {
  .hero__title {
    line-height: 1;
  }

  .contact__intro {
    font-size: calc(46.96 * var(--u));
  }

  .contact__list {
    flex-direction: row;
    justify-content: center;
    column-gap: 0.75em;             /* PSD : ~29px (encre) entre les deux groupes */
    font-size: calc(34.94 * var(--u));
  }

  .contact__item {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
}


/* ==========================================================================
   10. Préférences utilisateur
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .contact__link {
    transition: none;
  }
}
