/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* Design system */
:root {
  /* Nuances de bleu clair (thème clair) */
  --bg: #eaf4ff;          /* bleu très clair en fond */
  --bg-alt: #f4f9ff;      /* variante légèrement différente */
  --surface: #ffffff;     /* surfaces (inputs, menus) */
  --card: #ffffff;        /* cartes */
  --text: #0b2540;        /* texte principal sombre bleuté */
  --muted: #4e6e95;       /* texte secondaire */
  --primary: #2d7ff9;     /* bleu principal */
  --primary-600: #1e66d0; /* bleu soutenu */
  --accent: #7bd3ff;      /* accent cyan clair */
  --success: #2ecc71;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 14px;
  --radius-sm: 10px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Header */
/* En-tête inspiré design premium (fond translucide puis solide au scroll) */
.site-header {
  position: sticky;
  top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.6));
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.site-header.scrolled {
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}
.nav-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; letter-spacing: .5px; }
.brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: #fff; padding: 3px; }

.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; position: relative; }
.nav a:hover { color: var(--text); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: currentColor; opacity: 0; transform: scaleX(.6); transition: opacity .2s ease, transform .2s ease; }
.nav a:hover::after { opacity: 1; transform: scaleX(1); }
/* Lien de langue avec drapeau (emoji) */
.nav a.lang-switch { display: inline-flex; align-items: center; gap: 6px; }
.nav a.lang-switch .flag-emoji { font-size: 18px; line-height: 1; }
/* Image-based flag icon fallback (for environments without emoji flags) */
.nav a.lang-switch .flag-icon {
  width: 18px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset;
  object-fit: cover;
}

.nav-toggle { display: none; background: transparent; border: 0; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .2s ease; }

/* Hero */
.hero { position: relative; isolation: isolate; padding: 96px 0 72px; background:
  radial-gradient(1200px 600px at 80% -100px, rgba(77,163,255,.20), transparent),
  radial-gradient(600px 400px at 0% 0%, rgba(130,224,255,.15), transparent);
}
.hero-inner { text-align: center; }
.hero h1 { font-size: clamp(28px, 4.5vw, 48px); line-height: 1.1; margin: 0 0 12px; }
.hero p { color: var(--muted); font-size: clamp(16px, 2.5vw, 18px); margin: 0 auto 24px; max-width: 820px; }
.cta-group { display: inline-flex; gap: 12px; flex-wrap: wrap; }

.btn { display: inline-block; padding: 12px 18px; border-radius: 999px; border: 1px solid rgba(0,0,0,.12); color: var(--text); text-decoration: none; font-weight: 600; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--accent)); border: none; box-shadow: var(--shadow); color: #fff; }
.btn.ghost { background: transparent; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid color-mix(in oklab, var(--primary) 40%, white); outline-offset: 2px; }

/* Sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.card { background: var(--card); border: 1px solid rgba(0,0,0,.06); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.brand-card { display:flex; align-items:center; justify-content:center; }
.brand-card img { width: 100%; max-width: 320px; border-radius: 12px; background:#fff; padding:10px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.cards .card h3 { margin-top: 0; }
.cards .card p { color: var(--muted); }

/* Titres avec icônes */
.with-icon { display: inline-flex; align-items: center; gap: 10px; }
.icon-circle { display:inline-flex; width: 28px; height: 28px; border-radius: 999px; align-items:center; justify-content:center;
  background: color-mix(in oklab, var(--primary) 12%, white); color: var(--primary-600); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.with-icon svg { display:block; }

/* Grille média pour illustrations/photos */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.media-grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center; border-radius: 12px; border: 1px solid rgba(0,0,0,.06); background: #fff; box-shadow: var(--shadow); }

/* Utility: force an <img> to crop to its container */
.img-cover { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* Grille de logos pour les références/clients */
.logo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: center; margin-top: 18px; }
.logo-grid img { width: 100%; max-width: 140px; justify-self: center; filter: grayscale(100%); opacity: .8; transition: filter .2s ease, opacity .2s ease, transform .2s ease; background: #fff; border-radius: 10px; padding: 10px; border: 1px solid rgba(0,0,0,.06); box-shadow: var(--shadow); }
.logo-grid img:hover { filter: grayscale(0%); opacity: 1; transform: translateY(-2px); }

/* Texte atténué utilitaire */
.muted { color: var(--muted); }

.list-check { list-style: none; padding: 0; margin: 14px 0 0; }
.list-check li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.list-check li::before { content: "✔"; color: var(--success); position: absolute; left: 0; }

.pill-list { display:flex; flex-wrap:wrap; gap:10px; margin: 14px 0 26px; }
.pill { background: color-mix(in oklab, var(--primary) 10%, white); border: 1px solid color-mix(in oklab, var(--primary) 30%, transparent); color: var(--text); padding: 8px 12px; border-radius: 999px; font-size: 14px; }

.benefits .benefit { background: var(--surface); border-radius: var(--radius-sm); padding: 16px; border: 1px solid rgba(0,0,0,.06); }
.benefits p { color: var(--muted); margin: 6px 0 0; }

/* Listes ordonnées dans les cartes/sections */
.card ol { margin: 10px 0 0 18px; }
.card ol li { margin-bottom: 8px; }

/* Contact */
.contact-list { list-style:none; padding:0; color: var(--muted); }
.contact-form { display: grid; gap: 12px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; }
.contact-form input,
.contact-form textarea { background: var(--surface); border: 1px solid rgba(0,0,0,.12); border-radius: 10px; padding: 12px; color: var(--text); }
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }

/* Footer */
.site-footer { border-top: 1px solid rgba(0,0,0,.06); background: var(--bg-alt); }
.footer-inner { display:flex; align-items:center; justify-content:space-between; padding: 20px 0; }
.to-top { color: var(--muted); text-decoration:none; }
.to-top:hover { color: var(--text); }

/* Respect des préférences d’animation réduite */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Animations — apparitions progressives & ambiance héro */
/* État initial caché et léger décalage vers le bas */
.reveal-init { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; will-change: opacity, transform; }
.reveal-in { opacity: 1; transform: none; }

/* Permet un décalage progressif (stagger) contrôlé en JS */
.reveal-init { transition-delay: var(--reveal-delay, 0ms); }

/* Animation douce de flottement sur les images de la section héro (ambiance) */
@keyframes floatY {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}
.hero .media-grid img { animation: floatY 10s ease-in-out infinite alternate; }

/* Responsive */
@media (max-width: 900px){
  .grid-2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; right: 4%; top: 62px; background: var(--surface); border: 1px solid rgba(0,0,0,.06); padding: 14px; border-radius: 12px; display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 10px; }
}

@media (min-width: 901px) and (max-width: 1200px){
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

