/* ==========================================================================
   LP Claranet × Red Hat — « Cloud et virtualisation : reprendre le contrôle
   de son infrastructure ». Charte alignée sur le guide PDF.
   Feuille autonome (ne dépend pas de styles.css).
   ========================================================================== */
:root {
  --paper: #F5F3EE;
  --band: #EAE5DC;
  --red: #A8312A;
  --red-dark: #8C2721;
  --red-soft: #F2E2DE;
  --ink: #1A1B1F;
  --text: #2B2B2E;
  --muted: #6A6A6E;
  --rule: #D8D3C9;
  --card: #FFFFFF;
  --ok: #2E7D4F;
  --serif: 'Caladea', Cambria, Georgia, serif;
  --sans: 'Carlito', Calibri, 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--red);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.red-rule { width: 110px; height: 4px; background: var(--red); border: 0; margin: 26px 0; }

/* Barre rouge du haut (comme les pages intérieures du guide) */
.top-bar { height: 6px; background: var(--red); }

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.nav-partners { display: flex; align-items: center; gap: 18px; }
.nav-partners .cross { color: var(--muted); font-size: 18px; line-height: 1; }
.nav img { height: 34px; width: auto; }
.nav .logo-it4b img { height: 30px; }
.logo-fallback {
  display: none;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.logo-missing img { display: none; }
.logo-missing .logo-fallback { display: inline; }

/* ---------- Hero ---------- */
.hero { background: var(--band); padding: 56px 0 72px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 54px;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.hero-lead {
  max-width: 640px;
  margin: 0;
  color: #3A3A3E;
  font-size: 20px;
  line-height: 1.55;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border: 0;
  border-radius: 2px;
  background: var(--red);
  color: #fff;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn:disabled { opacity: .7; cursor: wait; transform: none; }
.hero .btn { margin-top: 32px; }

/* Mockup de couverture du guide */
.cover {
  aspect-ratio: 210 / 297;
  background: var(--paper);
  box-shadow: 0 24px 50px rgba(26, 27, 31, .18), 0 2px 6px rgba(26, 27, 31, .08);
  display: flex;
  flex-direction: column;
  transform: rotate(2deg);
}
.cover-top {
  background: var(--band);
  border-bottom: 1px solid var(--rule);
  height: 34%;
  padding: 9% 9% 0;
  display: grid;
  grid-template-columns: 1fr auto 1.15fr;
  gap: 8%;
  align-items: start;
}
.cover-squares { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.cover-squares i { aspect-ratio: 1; border: 1px solid var(--ink); }
.cover-squares i.f { background: var(--ink); }
.cover-arrow { width: 22px; height: 1px; background: var(--red); margin-top: 32px; position: relative; }
.cover-arrow::after {
  content: ""; position: absolute; right: -1px; top: -3px;
  border-left: 6px solid var(--red); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent;
}
.cover-stack { display: flex; flex-direction: column; gap: 5px; }
.cover-dots { display: flex; gap: 3px; }
.cover-dots i { flex: 1; aspect-ratio: 1; border-radius: 50%; background: var(--red); }
.cover-dots i.o { background: transparent; border: 1px solid var(--red); }
.cover-box { height: 13px; border: 1px solid var(--ink); }
.cover-bar { height: 11px; background: var(--ink); }
.cover-bar.r { background: var(--red); }
.cover-body { padding: 10% 9% 9%; display: flex; flex-direction: column; flex: 1; }
.cover-body small {
  color: var(--red); font-size: 7px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.cover-body strong {
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.12;
}
.cover-body .cover-rule { width: 36px; height: 3px; background: var(--red); margin-top: 14px; }
.cover-body .cover-brands {
  margin-top: auto;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- Bloc contenu + formulaire ---------- */
.main-block { padding: 72px 0 80px; }
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
  gap: 56px;
  align-items: start;
}
.section-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
}
.benefits { list-style: none; margin: 22px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.benefits li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
}
.benefits strong { color: var(--ink); }
.icon-circle {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-size: 17px;
}

.method {
  margin: 36px 0 0;
  padding: 28px 30px;
  background: var(--band);
}
.method-figures { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-bottom: 14px; }
/* Chiffre et libellé alignés : le texte sur deux lignes occupe la hauteur du chiffre */
.method-figure { display: flex; align-items: center; gap: 12px; }
.method-figure b {
  color: var(--red);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 50px;
  line-height: .78;
  padding-top: 4px;
}
.method-figure span { color: var(--ink); font-weight: 700; font-size: 16px; line-height: 1.2; }
.method p { margin: 0; color: var(--text); font-size: 17px; }

/* ---------- Formulaire ---------- */
.form-section { scroll-margin-top: 20px; }
.form-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 5px solid var(--red);
  padding: 38px 34px 34px;
}
.form-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
}
.form-card .form-intro { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.form-sponsors {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 26px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.registration-content { display: flex; flex-direction: column; gap: 14px; }
.double { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-container { position: relative; }
.candidature-form input[type="text"],
.candidature-form input[type="email"],
.candidature-form input[type="tel"],
.candidature-form select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #CFC9BE;
  border-radius: 2px;
  background: #FBFAF7;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.candidature-form input::placeholder { color: #8E8C88; }
.candidature-form select {
  padding-right: 42px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background: #FBFAF7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236A6A6E' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.candidature-form select:invalid { color: #8E8C88; }
.candidature-form select option { color: var(--ink); }
.candidature-form input:focus,
.candidature-form select:focus {
  outline: none;
  border-color: var(--ink);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(26, 27, 31, .08);
}
.candidature-form .valid { border-color: var(--ok) !important; }
.candidature-form .invalid {
  border-color: var(--red) !important;
  background-color: #FFF8F7 !important;
  box-shadow: 0 0 0 3px rgba(168, 49, 42, .12) !important;
}
.error-message {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--red);
  font-size: 14px;
}
.error-message.show { display: flex; }

/* Consentement */
.privacy-label {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.55;
}
.privacy-label input { position: absolute; opacity: 0; width: 0; height: 0; }
.privacy-label .checkmark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 1.5px solid #9C978D;
  border-radius: 2px;
  background: #fff;
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.privacy-label input:checked + .checkmark { background: var(--red); border-color: var(--red); }
.privacy-label input:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.privacy-label input:focus-visible + .checkmark { box-shadow: 0 0 0 3px rgba(168, 49, 42, .25); }
.privacy-text { flex: 1; }
.privacy-text p { margin: 0; color: var(--text); }
.privacy-label .error {
  display: none;
  gap: 6px;
  margin-top: 8px;
  color: var(--red);
  font-size: 13px;
}
.privacy-label.invalid .checkmark { border-color: var(--red); }
.privacy-label.invalid .error { display: flex; }

.data-notice { margin: 0; color: var(--muted); font-size: 13px; font-style: italic; line-height: 1.55; }
#connexion .btn { width: 100%; margin-top: 6px; }
#form_submit_error { display: none; align-items: center; gap: 6px; color: var(--red); font-size: 14px; }

/* ---------- Sommaire ---------- */
.toc { padding: 0 0 80px; }
.toc-inner { border-top: 2px solid var(--ink); padding-top: 40px; }
.toc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 30px; margin-bottom: 26px; }
.toc-head p { margin: 0; color: var(--muted); max-width: 520px; }
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
}
.toc-list li {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-size: 17px;
}
.toc-list li b {
  flex: 0 0 34px;
  color: var(--red);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
}

/* ---------- CTA final ---------- */
.final-cta { background: var(--ink); color: #fff; padding: 64px 0; }
.final-cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.final-cta h2 {
  margin: 0;
  max-width: 680px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.25;
}
.final-cta .eyebrow { color: #E39A92; margin-bottom: 12px; }

/* ---------- Footer ---------- */
footer { padding: 26px 0; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; text-align: center; }
footer a { color: var(--muted); }

/* ---------- Popup succès ---------- */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(26, 27, 31, .6);
  opacity: 0;
  transition: opacity .3s ease;
}
.success-overlay.show { opacity: 1; }
.success-popup {
  max-width: 480px;
  width: 100%;
  background: var(--paper);
  border-top: 5px solid var(--red);
  padding: 40px 34px 32px;
  text-align: center;
  transform: translateY(14px);
  transition: transform .3s ease;
}
.success-overlay.show .success-popup { transform: none; }
.success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-size: 26px;
}
.success-popup h3 { margin: 0 0 12px; color: var(--ink); font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; }
.success-popup p { margin: 0 0 22px; color: var(--text); font-size: 16px; }
.success-popup .btn { margin-bottom: 14px; }
.close-popup {
  display: block;
  margin: 0 auto;
  padding: 8px 16px;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; }
  .hero h1 { font-size: 44px; }
  .main-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 36px 0 52px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .cover { max-width: 230px; margin: 0 auto; }
  .hero h1 { font-size: 34px; }
  .hero-lead { font-size: 18px; }
  .section-title { font-size: 30px; }
  .main-block { padding: 48px 0 56px; }
  .form-card { padding: 30px 20px 26px; }
  .double { grid-template-columns: 1fr; }
  .toc-list { grid-template-columns: 1fr; }
  .final-cta h2 { font-size: 26px; }
  .nav img { height: 26px; }
  .nav .logo-it4b img { height: 24px; }
  .method-figure b { font-size: 42px; }
}
