/* =====================================================================
   Europachape — Feuille de styles principale
   Design moderne, sobre et professionnel. Palette dérivée du logo.
   ===================================================================== */

/* ----- 1. Design tokens -------------------------------------------- */
:root {
  /* Couleurs de marque (issues du logo) */
  --brand:        #15528a;
  --brand-dark:   #0a395e;
  --brand-darker: #072a46;
  --accent:       #0087ae;
  --accent-light: #4bb6d3;

  /* Neutres */
  --ink:        #1c2733;
  --ink-soft:   #4a5763;
  --line:       #e3e8ee;
  --surface:    #ffffff;
  --surface-2:  #f5f8fc;
  --surface-3:  #eef3f9;

  /* Sémantique */
  --ok:    #1f8a52;
  --ok-bg: #e7f6ee;
  --err:   #c0392b;
  --err-bg:#fcebe9;

  /* Typo */
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  /* Mesures */
  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 10px 30px rgba(10, 57, 94, .10);
  --shadow-sm: 0 4px 14px rgba(10, 57, 94, .08);
  --maxw:      1180px;
  --gap:       clamp(1.5rem, 4vw, 3rem);
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.18; color: var(--brand-dark); font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { color: var(--ink-soft); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Lien d'évitement (accessibilité clavier) */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand-dark); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ----- 3. Layout utilitaires --------------------------------------- */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--tint { background: var(--surface-2); }
.section__head { max-width: 720px; margin-bottom: 2.75rem; }
.section__head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .12em;
  font-size: .8rem; font-weight: 700; color: var(--accent); margin-bottom: .6rem;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.clearfix::after { content: ""; display: table; clear: both; }

/* ----- 4. Boutons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .9rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #0078a0; color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--dark { background: var(--brand-dark); color: #fff; }
.btn--dark:hover { background: var(--brand-darker); color: #fff; }
.btn--block { width: 100%; justify-content: center; }

/* ----- 5. En-tête / navigation ------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .5rem; background: #0b61aa; padding: .3rem .95rem .3rem .35rem; border-radius: 10px; }
.brand:hover { text-decoration: none; background: #0a5798; }
.brand img { height: 38px; width: auto; border-radius: 6px; }
.brand__name { font-weight: 800; color: #fff; font-size: 1.2rem; letter-spacing: .01em; }
.nav__links { display: flex; align-items: center; gap: .35rem; list-style: none; padding: 0; }
.nav__links a:not(.btn) {
  display: block; padding: .55rem .85rem; border-radius: 8px; color: var(--ink);
  font-weight: 600; font-size: .97rem;
}
.nav__links a:not(.btn):hover { background: var(--surface-3); text-decoration: none; }
.nav__links a:not(.btn)[aria-current="page"] { color: var(--brand); background: var(--surface-3); }
.nav__cta { margin-left: .4rem; }
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
  color: var(--brand-dark);
}
.nav__toggle svg { width: 28px; height: 28px; }

@media (max-width: 880px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: .75rem 1.25rem 1.25rem; box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform .25s ease; visibility: hidden;
  }
  .nav__links.open { transform: translateY(0); visibility: visible; }
  .nav__links a:not(.btn) { padding: .85rem .5rem; border-bottom: 1px solid var(--line); }
  .nav__cta { margin: .75rem 0 0; }
  .nav__cta .btn { width: 100%; justify-content: center; }
}

/* ----- 6. Hero ----------------------------------------------------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, var(--brand-darker), var(--brand) 90%);
}
.hero__bg {
  position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%;
  opacity: .22; mix-blend-mode: luminosity;
}
.hero__inner {
  position: relative; display: grid; gap: 1.5rem;
  padding: clamp(4rem, 11vw, 8rem) 0; max-width: 760px;
}
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.92); font-size: 1.2rem; max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .6rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.5rem; }
.hero__badge { display: flex; align-items: center; gap: .5rem; font-size: .95rem; color: rgba(255,255,255,.92); }
.hero__badge svg { width: 22px; height: 22px; flex: none; color: var(--accent-light); }

/* ----- 7. Grilles & cartes ----------------------------------------- */
.grid { display: grid; gap: 1.75rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-3); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__body h3 a { color: var(--brand-dark); }
.card__meta { font-size: .85rem; color: var(--accent); font-weight: 600; }
.card__foot { margin-top: auto; padding-top: .6rem; font-weight: 600; }

/* Carte service (avec icône) */
.service { padding: 1.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.service__icon {
  width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--accent); margin-bottom: 1rem;
}
.service__icon svg { width: 28px; height: 28px; }
.service h3 { margin-bottom: .4rem; }

/* ----- 8. Section "split" (texte + image) -------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

/* ----- 9. Listes à puces "check" ----------------------------------- */
.checklist { list-style: none; padding: 0; display: grid; gap: .7rem; }
.checklist li { position: relative; padding-left: 2rem; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .15rem; width: 1.3rem; height: 1.3rem;
  background: var(--ok-bg);
  border-radius: 50%;
}
.checklist li::after {
  content: ""; position: absolute; left: .42rem; top: .42rem; width: .45rem; height: .25rem;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}

/* ----- 10. Stats --------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat__num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--brand); line-height: 1; }
.stat__label { color: var(--ink-soft); font-size: .95rem; margin-top: .35rem; }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; } }

/* ----- 11. Bandeau d'appel à l'action ------------------------------ */
.cta-band {
  background: linear-gradient(120deg, var(--brand), var(--accent));
  color: #fff; border-radius: var(--radius); padding: clamp(2.5rem, 6vw, 4rem);
  text-align: center; box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 55ch; margin: .6rem auto 1.6rem; }

/* ----- 12. Galerie (page détail référence) ------------------------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .3s ease; }
.gallery a:hover img { transform: scale(1.06); }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ----- 13. Formulaires --------------------------------------------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.field .req { color: var(--err); }
.input, .textarea, .select {
  font: inherit; color: var(--ink); width: 100%;
  padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,135,174,.15);
}
.textarea { min-height: 150px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

/* ----- 14. Alertes ------------------------------------------------- */
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-weight: 500; }
.alert--ok  { background: var(--ok-bg);  color: #14653a; border: 1px solid #bfe4cf; }
.alert--err { background: var(--err-bg); color: #962219; border: 1px solid #f3c7c1; }

/* ----- 15. Coordonnées (page contact) ------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; display: grid; gap: 1.2rem; }
.info-list li { display: flex; gap: .9rem; align-items: flex-start; }
.info-list svg { width: 24px; height: 24px; color: var(--accent); flex: none; margin-top: .15rem; }
.info-list strong { display: block; color: var(--ink); }
.info-list span, .info-list a { color: var(--ink-soft); }
.map-embed { border: 0; width: 100%; height: 320px; border-radius: var(--radius); margin-top: 1.5rem; }

/* ----- 16. Pied de page -------------------------------------------- */
.site-footer { background: var(--brand-darker); color: rgba(255,255,255,.78); margin-top: 0; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-brand img { height: 42px; margin-bottom: 1rem; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 1.25rem 0;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .88rem;
}
.socials { display: flex; gap: .6rem; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); }
.socials a:hover { background: var(--accent); }
.socials svg { width: 18px; height: 18px; }

/* ----- 17. Page intérieure (en-tête de page) ----------------------- */
.page-hero {
  background: linear-gradient(120deg, var(--brand-darker), var(--brand));
  color: #fff; padding: clamp(3rem, 7vw, 5rem) 0;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.9); max-width: 60ch; margin-top: .6rem; }
.breadcrumb { font-size: .9rem; color: rgba(255,255,255,.7); margin-bottom: .8rem; }
.breadcrumb a { color: rgba(255,255,255,.85); }

/* ----- 18. Divers -------------------------------------------------- */
.text-content p { margin-bottom: 1rem; }
.text-content h2, .text-content h3 { margin: 1.5rem 0 .6rem; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}