/* ============================================================
   ISCN · Pages secondaires
   Composants additionnels (formulaires, layouts longs, etc.)
   À charger APRÈS styles.css
   ============================================================ */

/* ============================================================
   Page Hero (réduit pour pages internes)
   ============================================================ */
.page-hero {
  padding: 7rem 0 4rem;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 50%; height: 100%;
  background: radial-gradient(ellipse at right top, rgba(145, 182, 198, 0.2), transparent 60%);
  pointer-events: none;
}
.page-hero-content { position: relative; z-index: 1; max-width: 800px; }
.page-hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.page-hero-eyebrow::before {
  content: ""; width: 30px; height: 2px; background: var(--coral);
}
.page-hero h1 {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 92;
  margin-bottom: 1.5rem;
}
.page-hero h1 em { font-style: italic; color: var(--coral); font-weight: 600; }
.page-hero .lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); }

/* Breadcrumbs */
.breadcrumbs {
  display: flex; gap: 0.5rem; align-items: center;
  font-size: 0.85rem;
  color: var(--grey-700);
  margin-bottom: 1.5rem;
}
.breadcrumbs a { transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--coral); }
.breadcrumbs .sep { opacity: 0.4; }
.breadcrumbs .current { color: var(--ink); font-weight: 500; }

/* ============================================================
   Tableau croisé compétences/évaluations
   ============================================================ */
.bloc-competences {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.bloc-competences-header {
  background: var(--ink);
  color: var(--cream);
  padding: 1.5rem 2rem;
  display: flex; align-items: center; gap: 1.2rem;
}
.bloc-competences-header .num {
  width: 50px; height: 50px;
  background: var(--coral);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.1rem;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.bloc-competences-header h3 {
  color: var(--cream);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  margin: 0;
  font-weight: 700;
  font-variation-settings: "wdth" 92;
}
.bloc-competences-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.bloc-competences-body > div {
  padding: 2rem;
  border-right: 1px solid rgba(6, 58, 82, 0.15);
}
.bloc-competences-body > div:last-child { border-right: none; }
.bloc-competences-body h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1.2rem;
}
.bloc-competences-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bloc-competences-body ul li {
  padding: 0.6rem 0 0.6rem 1.5rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--grey-700);
  border-bottom: 1px solid rgba(6, 58, 82, 0.08);
  line-height: 1.45;
}
.bloc-competences-body ul li:last-child { border-bottom: none; }
.bloc-competences-body ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0.6rem;
  color: var(--coral);
  font-weight: 600;
}
.eval-modalites {
  background: var(--cream);
  padding: 1.5rem;
  border-radius: 6px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--grey-700);
}
.eval-modalites strong { color: var(--ink); display: block; margin-bottom: 0.4rem; font-weight: 600; }

/* ============================================================
   Modules pédagogiques
   ============================================================ */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.module-card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 1.8rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.module-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.module-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--coral);
  margin-bottom: 0.8rem;
}
.module-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.module-hours {
  display: inline-block;
  background: var(--cream);
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.8rem;
  letter-spacing: 0.04em;
}
.module-card p { font-size: 0.92rem; color: var(--grey-700); line-height: 1.5; }

/* ============================================================
   Formulaires
   ============================================================ */
.form-section {
  background: var(--cream);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.form-wrapper {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: clamp(2rem, 4vw, 3rem);
}
.form-wrapper h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}
.form-wrapper h2 em { font-style: italic; color: var(--coral); font-weight: 600; }
.form-wrapper > p { color: var(--grey-700); margin-bottom: 2rem; font-size: 1rem; }

.form-progress {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(6, 58, 82, 0.15);
}
.form-step-dot {
  width: 30px; height: 30px;
  background: rgba(6, 58, 82, 0.1);
  color: var(--ink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.3s, color 0.3s;
}
.form-step-dot.active { background: var(--ink); color: var(--cream); }
.form-step-dot.done { background: var(--coral); color: var(--cream); }
.form-step-line {
  flex: 1; height: 2px;
  background: rgba(6, 58, 82, 0.1);
  transition: background 0.3s;
}
.form-step-line.done { background: var(--coral); }

.form-fieldset { margin-bottom: 1.5rem; }
.form-fieldset legend {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1rem;
  font-variation-settings: "wdth" 95;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-row.full { grid-template-columns: 1fr; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
.form-field label .required { color: var(--coral); }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field input[type="number"],
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(6, 58, 82, 0.2);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--cream);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field .help {
  font-size: 0.78rem;
  color: var(--grey-700);
  opacity: 0.7;
  font-style: italic;
}

.form-field-file {
  background: var(--cream);
  border: 2px dashed rgba(6, 58, 82, 0.3);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.form-field-file:hover { border-color: var(--ink); background: var(--white); }
.form-field-file input[type="file"] { display: none; }
.form-field-file .file-icon { font-size: 1.8rem; margin-bottom: 0.5rem; display: block; }
.form-field-file .file-text { font-size: 0.92rem; color: var(--ink); font-weight: 500; }
.form-field-file .file-hint { font-size: 0.78rem; color: var(--grey-700); margin-top: 0.3rem; }

.form-checkbox { display: flex; gap: 0.7rem; align-items: flex-start; }
.form-checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--ink);
  flex-shrink: 0;
}
.form-checkbox label { font-size: 0.88rem; color: var(--grey-700); line-height: 1.45; }
.form-checkbox a { color: var(--ink); text-decoration: underline; }

.form-actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(6, 58, 82, 0.15);
}
.form-actions .btn { flex: 1 1 auto; justify-content: center; }
.form-actions .btn-secondary { flex: 0 0 auto; }

/* ============================================================
   Conteneur articles longs (page formation, pédagogie)
   ============================================================ */
.article-section { background: var(--cream); padding: clamp(4rem, 8vw, 6rem) 0; border-bottom: 2px solid var(--ink); }
.article-section.alt { background: var(--white); }
.article-section.dark { background: var(--ink); color: var(--cream); }
.article-section.dark h2,
.article-section.dark h3 { color: var(--cream); }
.article-section.dark .lead { color: rgba(250, 238, 223, 0.85); }
.article-section.dark .section-tag { color: var(--cream); }
.article-section.dark .section-tag::before { background: var(--dust); }

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}
.article-layout.two-col {
  grid-template-columns: 0.4fr 0.6fr;
  max-width: var(--container);
}
.article-layout.two-col-reverse {
  grid-template-columns: 0.6fr 0.4fr;
  max-width: var(--container);
}

.article-text h2 { text-transform: uppercase; margin-bottom: 1.5rem; }
.article-text h2 em { font-style: italic; color: var(--coral); font-weight: 600; }
.article-text p { font-size: 1.02rem; color: var(--grey-700); line-height: 1.65; margin-bottom: 1rem; max-width: 65ch; }
.article-text ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}
.article-text ul li {
  padding: 0.5rem 0 0.5rem 1.8rem;
  font-size: 1rem;
  color: var(--grey-700);
  position: relative;
  line-height: 1.5;
}
.article-text ul li::before {
  content: "→";
  position: absolute; left: 0; top: 0.5rem;
  color: var(--coral);
  font-weight: 600;
}

.article-photo {
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.article-photo.wide { aspect-ratio: 16/10; }
.article-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Sticky sidebar */
.article-sidebar { position: sticky; top: 100px; }

/* ============================================================
   Tables comparatives (financement, salaires détaillés)
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}
.data-table th, .data-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid rgba(6, 58, 82, 0.15);
}
.data-table th {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: none;
}
.data-table td {
  font-size: 0.95rem;
  color: var(--grey-700);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: rgba(145, 182, 198, 0.1); }
.data-table td:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}
.data-table .highlight {
  color: var(--coral);
  font-weight: 700;
}

/* ============================================================
   Confirmation page (après envoi formulaire)
   ============================================================ */
.confirmation {
  text-align: center;
  padding: 4rem 2rem;
}
.confirmation-icon {
  width: 80px; height: 80px;
  background: var(--coral);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 2rem;
  color: var(--cream);
  font-size: 2.5rem;
  font-weight: 800;
}
.confirmation h2 { margin-bottom: 1rem; }
.confirmation p { max-width: 50ch; margin: 0 auto 1rem; color: var(--grey-700); }

/* ============================================================
   Page Mentions légales / RGPD / Accessibilité (article doc)
   ============================================================ */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(3rem, 5vw, 5rem) 0;
}
.legal-content h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  text-transform: uppercase;
  margin: 2.5rem 0 1rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.8rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  margin: 2rem 0 0.8rem;
  color: var(--coral);
}
.legal-content p {
  font-size: 0.97rem;
  color: var(--grey-700);
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: none;
}
.legal-content ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.legal-content ul li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  font-size: 0.97rem;
  color: var(--grey-700);
  line-height: 1.6;
}
.legal-content ul li::before {
  content: "•";
  position: absolute; left: 0;
  color: var(--coral);
  font-weight: 700;
}
.legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content a { color: var(--ink); text-decoration: underline; transition: color 0.2s; }
.legal-content a:hover { color: var(--coral); }

.legal-toc {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}
.legal-toc h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1rem;
}
.legal-toc ol {
  list-style: decimal;
  padding-left: 1.5rem;
  display: grid;
  gap: 0.4rem;
}
.legal-toc ol li { font-size: 0.95rem; line-height: 1.4; }
.legal-toc ol li a { color: var(--ink); text-decoration: none; transition: color 0.2s; }
.legal-toc ol li a:hover { color: var(--coral); text-decoration: underline; }

/* ============================================================
   Map placeholder (page contact)
   ============================================================ */
.map-wrapper {
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--dust);
  position: relative;
}
.map-wrapper iframe {
  width: 100%; height: 100%; border: 0; display: block;
}

/* ============================================================
   Sticky sidebar (page formation)
   ============================================================ */
.sticky-card {
  position: sticky; top: 100px;
  background: var(--ink);
  color: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 2rem;
}
.sticky-card .section-tag { color: var(--cream); margin-bottom: 1rem; }
.sticky-card .section-tag::before { background: var(--coral); }
.sticky-card h3 {
  color: var(--cream);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.sticky-card p {
  color: rgba(250, 238, 223, 0.85);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.sticky-card .btn {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* ============================================================
   Responsive overrides
   ============================================================ */
@media (max-width: 1100px) {
  .bloc-competences-body { grid-template-columns: 1fr; }
  .bloc-competences-body > div { border-right: none; border-bottom: 1px solid rgba(6, 58, 82, 0.15); }
  .bloc-competences-body > div:last-child { border-bottom: none; }
  .modules-grid { grid-template-columns: 1fr; }
  .article-layout.two-col, .article-layout.two-col-reverse { grid-template-columns: 1fr; }
  .article-sidebar, .sticky-card { position: static; }
}
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
}
