/* =========================================================
   Pixels et Data — feuille de style
   Basée sur la charte graphique (doc/Charte graphique.docx).
   Pour changer l'apparence, modifiez d'abord les variables
   ci-dessous : couleurs, polices, tailles.
   ========================================================= */

/* ---------- Polices de la charte (fichiers dans src/fonts) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../src/fonts/inter.woff2") format("woff2");
  font-weight: 100 900; /* police variable : tous les poids */
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../src/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../src/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../src/fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../src/fonts/ibm-plex-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Couleurs de la charte */
  --primary: #0F4C5C;       /* bleu pétrole — couleur principale */
  --secondary: #00A8E8;     /* bleu cyan — couleur secondaire */
  --accent: #2EC4B6;        /* turquoise — accent */
  --text: #2D3748;          /* gris anthracite — texte */
  --bg: #F7F9FB;            /* gris très clair — fond */

  /* Couleurs dérivées */
  --surface: #FFFFFF;       /* fond des cartes */
  --text-muted: #5B6770;    /* texte secondaire (gris de la variante haut de gamme) */
  --border: #E1E7ED;        /* lignes fines */
  --primary-dark: #102A43;  /* bleu nuit (variante haut de gamme) */

  /* Polices de la charte */
  --font-title: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-label: "IBM Plex Sans", system-ui, sans-serif;

  /* Dimensions */
  --container: 1100px;
  --radius: 8px;            /* coins légèrement arrondis (charte) */
  --header-height: 72px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height); /* le menu fixe ne cache pas les titres */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-dark);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 3rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* Petit libellé au-dessus des titres (comme la signature du logo) */
.tag {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* Trait turquoise sous le libellé, rappel du logo */
.tag::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: 0.6rem;
  background: var(--accent);
}

/* ---------- Icônes (Lucide, traits fins, monochromes) ---------- */
.icon,
.icon-inline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.icon-inline {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 500;
  border: 1px solid var(--primary);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-light {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--primary);
}

.btn-light:hover {
  background: var(--bg);
  border-color: var(--bg);
}

.btn-small {
  padding: 0.45rem 1.1rem;
}

/* ---------- En-tête / menu ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(247, 249, 251, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.logo img {
  width: 44px;
  height: auto;
}

.logo-et {
  color: var(--secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a:not(.btn) {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:not(.btn):hover,
.nav-links a.active {
  color: var(--primary);
}

/* Bouton burger (mobile uniquement) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--primary-dark);
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- Accueil ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 40px) 0 60px;
  /* matrice de points discrète (univers visuel de la charte) */
  background-image: radial-gradient(rgba(15, 76, 92, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  margin-bottom: 1.5rem;
}

.highlight {
  color: var(--primary);
  /* soulignement turquoise fin */
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 100% 3px;
  padding-bottom: 2px;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-logo img {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

/* ---------- Sections ---------- */
.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-dark {
  background: var(--primary);
  color: #FFFFFF;
}

.section-dark h2 {
  color: #FFFFFF;
}

.section-dark .tag {
  color: #FFFFFF;
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ---------- Cartes activités ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--secondary);
}

/* Petite catégorie au-dessus des titres de cartes */
.card-kicker {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.card > p:not(.card-kicker) {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Étiquettes de technologies */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  font-family: var(--font-label);
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ---------- Réalisations ---------- */
.project {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.project:hover {
  border-color: var(--secondary);
}

/* Emplacement d'image : motif de points en attendant les captures */
.project-img {
  aspect-ratio: 16 / 9;
 border-bottom: 1px solid var(--border);
  /*background-color: #EEF3F6;
 background-image: radial-gradient(rgba(15, 76, 92, 0.18) 1.5px, transparent 1.5px);*/
  background-size: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-label);
  font-size: 0.85rem;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-body > p:not(.card-kicker) {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-link {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.project-link:hover {
  color: var(--primary-dark);
}

/* ---------- À propos ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.about-photo {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: #EEF3F6;
  background-image: radial-gradient(rgba(15, 76, 92, 0.18) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-label);
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-text > p:not(.tag) {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stats strong {
  display: block;
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--primary);
}

.stats span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
}

.contact .tag::after {
  margin-left: auto;
  margin-right: auto;
}

.contact h2 {
  margin-bottom: 1rem;
}

.contact > p:not(.tag) {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.socials a {
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-label);
  font-weight: 500;
}

.socials a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* ---------- Pied de page ---------- */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 2rem 0;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.legal summary {
  cursor: pointer;
}

.legal summary:hover {
  color: #FFFFFF;
}

.legal p {
  margin-top: 0.8rem;
  line-height: 1.8;
}

/* ---------- Animation d'apparition au défilement ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s, transform 0.6s;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Respecte le réglage "réduire les animations" du système */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  /* burger → croix */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    order: -1; /* logo au-dessus du texte sur mobile */
  }

  .hero-logo img {
    max-width: 260px;
  }

  .section {
    padding: 72px 0;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-photo {
    max-width: 260px;
  }
}
