/* ==========================================================================
   Christ the King Technical Institute — feuille de style publique
   Les couleurs de marque sont injectées en :root par views/partials/head.ejs
   ========================================================================== */

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

:root {
  --navy: #0f2a47;
  --navy-dark: #0a1e34;
  --gold: #c9a227;
  --teal: #2e8b84;
  --cream: #f7f5f0;
  --ink: #1c2330;

  --muted: #5a6577;
  --line: #e3e0d8;
  --white: #ffffff;

  --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-serif: Georgia, "Times New Roman", "Iowan Old Style", serif;

  --radius: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 42, 71, .06), 0 2px 8px rgba(15, 42, 71, .06);
  --shadow-md: 0 4px 12px rgba(15, 42, 71, .08), 0 16px 40px rgba(15, 42, 71, .1);
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, .4vw + .95rem, 1.0625rem);
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.15rem, 4.4vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 2.9vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1.4vw, 1.4rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.25rem; }

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

/* --- Utilitaires ---------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container.narrow { max-width: 780px; }
.center { text-align: center; }
.center-row { justify-content: center; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: var(--white);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: var(--white); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.lead { font-size: 1.15em; color: #33405a; }
.prose { max-width: 68ch; }

.badge {
  display: inline-block;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal);
  background: rgba(46, 139, 132, .1);
  border-radius: 999px;
  padding: .3rem .75rem;
  margin: 0 0 .75rem;
}

/* --- Boutons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-sans);
  font-weight: 600; font-size: .975rem;
  line-height: 1;
  padding: .95rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: .6rem 1.15rem; font-size: .875rem; }
.btn-lg { padding: 1.05rem 2.25rem; font-size: 1.0625rem; }

.btn-gold { background: var(--gold); color: #2a2103; box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: #d8b13a; color: #2a2103; box-shadow: var(--shadow-md); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-dark); color: var(--white); }

.btn-ghost { border-color: currentColor; color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

.hero .btn-ghost { color: var(--white); }
.hero .btn-ghost:hover { background: var(--white); border-color: var(--white); color: var(--navy); }

.btn-row { display: flex; flex-wrap: wrap; gap: .875rem; margin-top: 1.75rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 600; text-decoration: none;
  color: var(--teal);
  margin-top: .5rem;
}
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* --- En-tête ------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  min-height: 78px;
}

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy); }
.brand-logo { width: 58px; height: 58px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.4rem; letter-spacing: .02em; }
.brand-full { font-size: .70rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  font-weight: 600; font-size: .975rem;
  text-decoration: none; color: var(--navy);
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--teal); border-bottom-color: var(--teal); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }
.nav-cta { text-decoration: none; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: var(--navy);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* --- Héros --------------------------------------------------------------- */

.hero {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(1200px 500px at 88% -10%, rgba(46, 139, 132, .38), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(201, 162, 39, .22), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("../img/pattern-grid.svg");
  background-size: 44px 44px;
  opacity: .5;
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 { color: var(--white); }
.hero p { color: rgba(255, 255, 255, .86); }
.hero .lead { color: rgba(255, 255, 255, .95); font-size: 1.2em; }

.hero .motto {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin-top: 1.6rem;
}
.hero-closing { font-style: italic; }

.hero-media img {
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  background: rgba(255, 255, 255, .04);
}

/* --- Bandeau de points forts -------------------------------------------- */

.features { background: var(--cream); border-bottom: 1px solid var(--line); }

.feature-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  transform: translateY(-2.5rem);
}

.feature-card {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}
.feature-card p { margin: 0; font-weight: 500; }

.feature-number {
  flex: none;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--navy); color: var(--gold);
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700;
}

/* --- Sections ------------------------------------------------------------ */

.section { padding: clamp(3.25rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--cream); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); font-size: 1.1em; margin: 0; }

.page-hero {
  background: linear-gradient(150deg, var(--cream) 0%, #ecece5 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}
.page-hero-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

.minimal-page { padding-block: clamp(4rem, 10vw, 8rem); }

/* --- Cartes -------------------------------------------------------------- */

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

.card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-media { background: var(--cream); aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 1.75rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .5rem; }
.card-body .link-arrow, .card-body .btn { margin-top: auto; align-self: flex-start; }

.check-list { list-style: none; padding: 0; margin: 1rem 0 1.25rem; }
.check-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: .4rem;
  font-size: .95em;
  color: #3d4759;
}
.check-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--teal); font-weight: 700;
}

/* --- Blocs en deux colonnes --------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; }

.split-service { padding-block: clamp(2rem, 4vw, 3.25rem); }
.split-service + .split-service { border-top: 1px solid var(--line); }
.split-reverse .split-media { order: 2; }

.value-list { list-style: none; padding: 0; margin: 1.75rem 0; display: grid; gap: 1.1rem; }
.value-list h3 { margin: 0 0 .2rem; font-size: 1.1rem; }
.value-list p { margin: 0; color: var(--muted); font-size: .975em; }
.value-list li { border-left: 3px solid var(--gold); padding-left: 1rem; }

.value-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.value-index {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: .6rem;
}
.value-card h3 { margin-bottom: .35rem; }
.value-card p { margin: 0; color: var(--muted); font-size: .975em; }

/* --- Bandeau de chiffres ------------------------------------------------ */

.stats-band { background: var(--navy); color: var(--white); padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; text-align: center; }
.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  color: var(--gold);
  margin: 0 0 .2rem;
  line-height: 1.1;
}
.stat-label { margin: 0; font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }

/* --- Bandeau d'appel à l'action ---------------------------------------- */

.cta-band {
  background: linear-gradient(120deg, var(--teal) 0%, #216f6a 55%, var(--navy) 100%);
  color: var(--white);
  padding: clamp(2.75rem, 6vw, 4.25rem) 0;
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.cta-inner h2 { color: var(--white); margin-bottom: .35rem; }
.cta-inner p { margin: 0; color: rgba(255,255,255,.9); max-width: 60ch; }

/* --- Page Contact ------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}

.contact-form { margin-top: 1.75rem; }
.field { margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

label { display: block; font-weight: 600; font-size: .925rem; margin-bottom: .4rem; color: var(--navy); }
label .optional { font-weight: 400; color: var(--muted); }
label span[aria-hidden] { color: #b3261e; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="url"], input[type="color"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: .8rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 139, 132, .15);
  outline: none;
}
textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
input[type="color"] { padding: .25rem; height: 46px; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--muted); margin: .9rem 0 0; }

.alert { border-radius: 10px; padding: 1rem 1.25rem; margin: 1.25rem 0; }
.alert ul { margin: .5rem 0 0; }
.alert-success { background: #e7f5ee; border: 1px solid #a9d8bf; color: #1c5c3b; }
.alert-error { background: #fdeceb; border: 1px solid #f1b6b2; color: #8c221c; }

.contact-info { background: var(--cream); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2rem); }
.info-block + .info-block { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.info-block h3 { font-family: var(--font-sans); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.info-block address { font-style: normal; }
.info-block address span { display: block; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin-bottom: .25rem; }

.hours { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; }
.hours dt { font-weight: 600; color: var(--navy); }
.hours dd { margin: 0; color: var(--muted); }

.map-embed { position: relative; padding-top: 66%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Pied de page ------------------------------------------------------- */

.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.78); padding-top: clamp(2.75rem, 6vw, 4rem); }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 2.5rem;
}
.brand-footer { color: var(--white); margin-bottom: 1rem; }
.brand-footer .brand-text strong { color: var(--white); }
.footer-about p { font-size: .95em; }
.footer-motto { font-family: var(--font-serif); color: var(--gold); font-size: 1.05rem; margin-top: 1rem; }

.footer-col h2 {
  font-family: var(--font-sans);
  font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .9rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .45rem; }
.footer-col address { font-style: normal; font-size: .95em; }
.footer-col address span, .footer-col address a { display: block; margin-bottom: .25rem; }
.footer-social { display: flex; gap: 1rem; margin-top: 1rem; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.14);
  padding-block: 1.35rem;
  font-size: .875rem;
}
.footer-bottom p { margin: 0; }

/* --- Adaptatif ---------------------------------------------------------- */

@media (max-width: 1020px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-list { grid-template-columns: 1fr; transform: translateY(-1.75rem); }
}

@media (max-width: 900px) {
  .hero-grid,
  .page-hero-grid,
  .split,
  .contact-layout { grid-template-columns: 1fr; }
  .hero-media, .page-hero-media { order: -1; }
  .split-reverse .split-media { order: 0; }
  .contact-info { order: 2; }
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: .5rem var(--gutter) 1.5rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a { display: block; padding: .9rem 0; border-bottom: 0; }
  .nav-cta { margin-top: 1.25rem; align-self: flex-start; }
  .field-row { grid-template-columns: 1fr; }
  .brand-full { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .btn:hover, .card:hover { transform: none; }
}

@media print {
  .site-header, .site-footer, .cta-band, .btn-row, .nav-toggle { display: none !important; }
  body { color: #000; }
}
