/*--------------------------------------------------------------
# Page Espace candidat (/candidat)
# Mobile-first. Toutes les couleurs derivent des variables du
# theme definies dans css/style.css (--color-primary, etc.).
# Aucune couleur de la maquette n'est reprise en dur.
--------------------------------------------------------------*/

.cnd {
  /* Fond "couleur principale a 10%".
     La 1re declaration sert de repli sans color-mix. */
  --cnd-tint: var(--color-primary-light);
  --cnd-tint: color-mix(in srgb, var(--color-primary) 10%, transparent);
  /* Gris neutre (fond sous les images, survol du bouton secondaire),
     derive du texte du theme. */
  --cnd-ph-bg: #eef1f3;
  --cnd-ph-bg: color-mix(in srgb, var(--color-secondary) 8%, #fff);
  --cnd-radius-card: 24px;
  --cnd-shadow: var(--shadow-soft);
  --cnd-shadow-sm: 0 10px 24px rgba(31, 74, 80, 0.10);
  --cnd-shadow-hover: 0 18px 36px rgba(31, 74, 80, 0.16);
  color: var(--color-muted);
}

/* Le header est fixe (64px) : on decale les ancres. */
.cnd [id] {
  scroll-margin-top: 88px;
}

.cnd .cnd-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* style.css centre tous les titres du site : on repasse a gauche ici. */
.cnd h1,
.cnd h2,
.cnd h3 {
  color: var(--color-secondary);
  font-family: "Montserrat", sans-serif;
  text-align: left;
}

/*--------------------------------------------------------------
# Elements partages
--------------------------------------------------------------*/

.cnd-eyebrow {
  display: block;
  margin: 0 0 12px;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
}

.cnd-lead {
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1.65;
}

/* En-tete de section centre */
.cnd-head {
  max-width: 670px;
  margin: 0 auto 40px;
  text-align: center;
}

.cnd-head h2 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

/* Carte qui encadre un visuel : 12px de marge interieure. */
.cnd-figure {
  margin: 0;
  padding: 12px;
  border-radius: var(--cnd-radius-card);
  background: #fff;
  box-shadow: var(--cnd-shadow);
}

.cnd-figure-media {
  overflow: hidden;
  border-radius: 16px;
  background: var(--cnd-ph-bg);
}

.cnd-figure-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pastille d'icone : carre arrondi 48px, fond teinte */
.cnd-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--cnd-tint);
  color: var(--color-primary);
  font-size: 24px;
  line-height: 1;
}

/*--------------------------------------------------------------
# Boutons (hauteur 44px, texte sur une seule ligne)
--------------------------------------------------------------*/

.cnd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease, opacity 180ms ease;
}

.cnd-btn:hover,
.cnd-btn:focus {
  text-decoration: none;
}

.cnd-btn:focus-visible,
.cnd-link:focus-visible {
  outline: 3px solid var(--color-primary-darker);
  outline-offset: 3px;
}

.cnd-btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}

.cnd-btn-primary:hover,
.cnd-btn-primary:focus {
  opacity: 0.9;
  color: #fff;
}

.cnd-btn-secondary {
  background-color: #fff;
  color: var(--color-secondary);
  box-shadow: var(--cnd-shadow-sm);
}

.cnd-btn-secondary:hover,
.cnd-btn-secondary:focus {
  background-color: var(--cnd-ph-bg);
  color: var(--color-secondary);
}

.cnd-btn-white {
  background-color: #fff;
  color: var(--color-secondary);
}

.cnd-btn-white:hover,
.cnd-btn-white:focus {
  opacity: 0.9;
  color: var(--color-secondary);
}

/* Lien texte avec fleche */
.cnd-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.cnd-link:hover,
.cnd-link:focus {
  color: var(--color-primary);
  opacity: 0.8;
  text-decoration: none;
}

/*--------------------------------------------------------------
# 1. Hero
--------------------------------------------------------------*/

.cnd-hero {
  padding: 40px 0 56px;
  background: var(--color-bg-soft);
}

.cnd-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.cnd-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--cnd-shadow-sm);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
}

.cnd-title {
  margin: 0 0 20px;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.12;
}

.cnd-title .cnd-title-accent {
  color: var(--color-primary);
}

.cnd-hero .cnd-lead {
  margin-bottom: 28px;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}

.cnd-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

/* 3 mentions discretes */
.cnd-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cnd-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 14px;
}

.cnd-facts i {
  color: var(--color-primary);
  font-size: 16px;
}

/* Colonne visuelle.
   La capture est au format telephone (852 x 1846, tres allonge) :
   on limite sa largeur pour que sa hauteur reste proche de celle
   de la colonne de texte. */
.cnd-hero-visual {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin-inline: auto;
}

/* Grande capture : ratio ecran de telephone (852 x 1846) */
.cnd-hero-media {
  aspect-ratio: 852 / 1846;
}

/* Petite capture superposee, en bas a gauche, debordant de 24px.
   Le contour epais reprend le fond de section pour la detacher. */
.cnd-hero-inset {
  position: absolute;
  left: -24px;
  bottom: -24px;
  width: 132px;
  height: 172px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--cnd-ph-bg);
  box-shadow: 0 0 0 6px var(--color-bg-soft), 0 18px 32px rgba(31, 74, 80, 0.22);
}

.cnd-hero-inset img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/*--------------------------------------------------------------
# 2. Pour qui ?
--------------------------------------------------------------*/

.cnd-who {
  padding: 64px 0;
  background: #fff;
}

.cnd-who-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.cnd-who-card {
  padding: 28px;
  border-radius: var(--cnd-radius-card);
  background: #fff;
  box-shadow: var(--cnd-shadow-sm);
}

.cnd-who-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.cnd-who-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

/*--------------------------------------------------------------
# 3. Vos outils
--------------------------------------------------------------*/

.cnd-tools {
  padding: 64px 0;
  background: var(--color-bg-soft);
}

.cnd-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.cnd-tool {
  padding: 24px;
  border-radius: var(--cnd-radius-card);
  background: #fff;
  box-shadow: var(--cnd-shadow-sm);
  transition: box-shadow 180ms ease;
}

.cnd-tool:hover {
  box-shadow: var(--cnd-shadow-hover);
}

.cnd-tool h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.cnd-tool p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

/*--------------------------------------------------------------
# 4. Controle
--------------------------------------------------------------*/

.cnd-control {
  padding: 64px 0;
  background: #fff;
}

.cnd-control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

/* Sur mobile l'image passe sous le texte */
.cnd-control-figure {
  order: 2;
  background: var(--cnd-tint);
}

.cnd-control-content {
  order: 1;
}

/* Capture CVtheque : ratio 1689 x 931 (~1,81:1) */
.cnd-control-media {
  aspect-ratio: 1689 / 931;
}

.cnd-control-content h2 {
  margin: 0 0 24px;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
}

.cnd-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.cnd-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--color-secondary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.cnd-list i {
  flex: none;
  margin-top: 2px;
  color: var(--color-primary);
  font-size: 20px;
  line-height: 1.4;
}

/*--------------------------------------------------------------
# 5. Comment ca marche
--------------------------------------------------------------*/

.cnd-steps {
  padding: 64px 0;
  background: var(--color-bg-soft);
}

.cnd-steps-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.cnd-steps-head h2 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}

.cnd-steps-head .cnd-lead {
  max-width: 448px;
}

.cnd-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.cnd-step {
  padding: 24px;
  border-radius: var(--cnd-radius-card);
  background: #fff;
  box-shadow: var(--cnd-shadow-sm);
}

.cnd-step-num {
  display: block;
  margin-bottom: 20px;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.cnd-step h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.cnd-step h3 i {
  flex: none;
  color: var(--color-primary);
  font-size: 20px;
}

.cnd-step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

/*--------------------------------------------------------------
# 6. CTA final
--------------------------------------------------------------*/

.cnd-cta {
  padding: 64px 0 80px;
  background: #fff;
}

.cnd-cta-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
}

.cnd-cta h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}

.cnd-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.6;
}

.cnd-cta-action {
  justify-self: start;
}

/*--------------------------------------------------------------
# Tablette / desktop
--------------------------------------------------------------*/

@media (min-width: 768px) {
  .cnd-who-grid,
  .cnd-tools-grid,
  .cnd-steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cnd-steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cnd-cta-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 56px;
  }

  .cnd-cta-action {
    justify-self: end;
  }
}

@media (min-width: 992px) {
  .cnd-hero {
    padding: 56px 0 88px;
  }

  .cnd-hero-grid {
    grid-template-columns: 1fr 0.9fr;
    gap: 56px;
  }

  .cnd-hero-visual {
    max-width: 300px;
  }

  .cnd-who,
  .cnd-tools,
  .cnd-control,
  .cnd-steps {
    padding: 88px 0;
  }

  .cnd-who-grid,
  .cnd-tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cnd-control-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
  }

  /* Sur desktop l'image repasse a gauche */
  .cnd-control-figure {
    order: 1;
  }

  .cnd-control-content {
    order: 2;
  }

  .cnd-steps-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 40px;
  }

  .cnd-steps-head .cnd-lead {
    justify-self: end;
  }

  .cnd-cta {
    padding: 88px 0 104px;
  }
}

/* La capture superposee n'apparait qu'a partir du desktop */
@media (max-width: 991.98px) {
  .cnd-hero-inset {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cnd-btn,
  .cnd-tool,
  .cnd-link {
    transition: none;
  }
}
