/* ============================================
   2iiQuality — style.css
   Variables, reset, typographie, utilitaires
   ============================================ */

:root {
  /* Couleurs */
  --teal:    #028090;
  --deep:    #024E5A;
  --mint:    #7FE3D6;
  --seafoam: #00A896;
  --dark:    #12343B;
  --grey:    #5B6B70;
  --light:   #EAF5F6;
  --paper:   #F4FAFB;
  --white:   #FFFFFF;

  /* Typo */
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(2, 78, 90, 0.08);
  --shadow-lg: 0 12px 40px rgba(2, 78, 90, 0.14);
  --max-width: 1200px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body, h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { color: var(--grey); }

:focus-visible {
  outline: 3px solid var(--seafoam);
  outline-offset: 2px;
}

/* ---------- Layout utilitaires ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}

.section-sm {
  padding: 56px 0;
}

.bg-deep   { background: var(--deep); color: var(--white); }
.bg-deep p { color: rgba(255,255,255,0.78); }
.bg-deep h1, .bg-deep h2, .bg-deep h3 { color: var(--white); }

.bg-teal   { background: var(--teal); color: var(--white); }
.bg-teal p { color: rgba(255,255,255,0.85); }
.bg-teal h1, .bg-teal h2, .bg-teal h3 { color: var(--white); }

.bg-light  { background: var(--light); }
.bg-paper  { background: var(--paper); }
.bg-white  { background: var(--white); }

.text-center { text-align: center; }
.mint { color: var(--mint); }

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

.bg-white .eyebrow,
.bg-light .eyebrow,
.bg-paper .eyebrow {
  color: var(--teal);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head .subtitle {
  font-style: italic;
  margin-top: 12px;
  font-size: 1.05rem;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

/* ---------- Motif cercles en filigrane ---------- */
.circles-bg {
  position: relative;
  overflow: hidden;
}

.circles-bg::before,
.circles-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(127, 227, 214, 0.18);
  pointer-events: none;
}

.circles-bg::before {
  width: 480px;
  height: 480px;
  top: -180px;
  right: -160px;
  animation: circleDrift1 16s ease-in-out infinite;
}

.circles-bg::after {
  width: 320px;
  height: 320px;
  bottom: -140px;
  left: -100px;
  border-color: rgba(2, 128, 144, 0.25);
  animation: circleDrift2 12s ease-in-out infinite;
}

@keyframes circleDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-26px, 22px) scale(1.04); }
}

@keyframes circleDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(20px, -18px) scale(1.05); }
}

.circles-bg .circles-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.circles-bg .circles-decor span {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(127, 227, 214, 0.14);
}

.circles-bg > .container,
.circles-bg > * {
  position: relative;
  z-index: 1;
}

/* ---------- Animations au scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.7s cubic-bezier(.22,.8,.32,1), transform 0.7s cubic-bezier(.22,.8,.32,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------- Animations d'entrée du hero (au chargement) ---------- */
.hero-anim {
  opacity: 0;
  transform: translateY(22px);
  animation: heroFadeUp 0.8s cubic-bezier(.22,.8,.32,1) forwards;
}

.hero-anim-1 { animation-delay: 0.05s; }
.hero-anim-2 { animation-delay: 0.18s; }
.hero-anim-3 { animation-delay: 0.32s; }
.hero-anim-4 { animation-delay: 0.46s; }
.hero-anim-5 { animation-delay: 0.6s; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Cercles décoratifs flottants (hero) ---------- */
.float-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(127, 227, 214, 0.16);
  pointer-events: none;
  z-index: 0;
}

.float-circle--1 { width: 140px; height: 140px; top: 18%; left: 6%; animation: floatY1 7s ease-in-out infinite; }
.float-circle--2 { width: 90px;  height: 90px;  top: 62%; left: 12%; animation: floatY2 9s ease-in-out infinite; border-color: rgba(2,128,144,0.3); }
.float-circle--3 { width: 60px;  height: 60px;  top: 28%; right: 9%; animation: floatY1 8s ease-in-out infinite; }
.float-circle--4 { width: 110px; height: 110px; top: 70%; right: 5%; animation: floatY2 10s ease-in-out infinite; border-color: rgba(2,128,144,0.28); }

@keyframes floatY1 {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}

@keyframes floatY2 {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(16px); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-anim {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .circles-bg::before,
  .circles-bg::after,
  .float-circle {
    animation: none;
  }
  html { scroll-behavior: auto; }
}
