/* Institut Romand de Formation — feuille de style principale */

:root {
  --blue: #00569D;
  --blue-dark: #003A6B;
  --ink: #121417;
  --ink-soft: #4B5560;
  --paper: #FFFFFF;
  --paper-alt: #F5F7FA;
  --border: #E1E5EA;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(17, 23, 33, 0.06);
  --font-body: "Source Sans 3", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 16px;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 16px; color: var(--ink-soft); }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 10px;
}

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

.placeholder-note {
  display: inline-block;
  font-size: 0.82rem;
  font-style: italic;
  color: #8A6D00;
  background: #FFF6DA;
  border: 1px solid #F2E1A0;
  border-radius: 6px;
  padding: 3px 10px;
  margin: 4px 0;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { border-color: var(--blue); color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-small { padding: 10px 20px; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  margin-right: auto;
}
.logo span { color: var(--blue); }
.main-nav { display: flex; gap: 24px; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { color: var(--blue); text-decoration: none; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 64px;
  text-align: center;
  background: linear-gradient(180deg, var(--paper-alt) 0%, var(--paper) 100%);
}
.hero .eyebrow { display: block; }
.hero h1 { max-width: 780px; margin-left: auto; margin-right: auto; }
.lead {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 1.15rem;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Hero cards ---------- */
.hero-cards { padding: 0 0 80px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.hero-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(17, 23, 33, 0.1);
}
.hero-card h3 { color: var(--blue); }
.link-arrow { font-weight: 700; color: var(--blue); font-size: 0.9rem; }

/* ---------- Manifeste ---------- */
.manifesto {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #001424 100%);
  padding: 100px 0;
  text-align: center;
}
.manifesto-text {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

/* ---------- Sections génériques ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--paper-alt); }
.section-note { max-width: 620px; font-size: 1.05rem; }

/* ---------- Formation ---------- */
.formation-main {
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 32px;
}
.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--ink);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}
.formation-grid { margin-top: 8px; }
.formation-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.formation-card h4 { color: var(--blue); }

/* ---------- Prérequis ---------- */
.prereq-grid { margin: 24px 0; }
.equiv-note {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 8px;
}

/* ---------- Étapes ---------- */
.steps { display: flex; flex-direction: column; gap: 24px; max-width: 720px; }
.steps li { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps h4 { margin-bottom: 4px; }
.steps p { margin: 0; }

/* ---------- Info cards (tarifs) ---------- */
.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

/* ---------- Photo pleine largeur ---------- */
.feature-photo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}
.feature-photo-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #dbe7f2 0%, #a9c4dd 55%, var(--blue-dark) 100%);
}
.road {
  position: absolute;
  bottom: -10%;
  left: 50%;
  width: 60%;
  height: 90%;
  background: #2b2f36;
  clip-path: polygon(38% 0%, 62% 0%, 100% 100%, 0% 100%);
  transform: translateX(-50%);
}
.road-line {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 6px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    #F2B705 0, #F2B705 8%,
    transparent 8%, transparent 16%
  );
}
.feature-photo-text {
  padding: 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.photo-note { font-size: 0.85rem; font-style: italic; color: #8A6D00; }

/* ---------- CTA / Inscription ---------- */
.cta-section { background: var(--paper-alt); }
.inscription-form {
  max-width: 620px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.hidden-field { position: absolute; left: -9999px; }
.form-note { font-size: 0.82rem; margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: #0E1420; color: #C7CDD6; padding-top: 64px; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo { color: #fff; font-size: 1.1rem; }
.footer-inner h5 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-inner a { display: block; color: #C7CDD6; margin-bottom: 8px; }
.footer-inner a:hover { color: #fff; }
.site-footer .placeholder-note { background: transparent; border-color: rgba(255,255,255,0.2); color: #E8C766; }
.footer-bottom { padding: 20px 24px; font-size: 0.82rem; color: #7C8494; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .feature-photo { grid-template-columns: 1fr; }
  .feature-photo-visual { min-height: 260px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--ink); }
  .header-inner .btn-small { display: none; }
  body.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
  }
  .form-row { grid-template-columns: 1fr; }
}
