/*
Theme Name: Kadence Digitalize Child
Template: kadence
Version: 1.0
Description: Thème enfant Kadence pour digitalize.tn — DSCF formation tech et conseil digital
Author: DSCF
Text Domain: kadence-digitalize
*/

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.site-main, #main, .content-area,
.wp-site-blocks, #primary {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Force suppression espaces Kadence */
body.home #main,
body.home .site-main,
body.home #primary,
body.home .entry-content,
body.home .page-content {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
body.home .dscf-hero {
  margin-top: 0 !important;
}

:root {
  --blue-dark:    #0A2540;
  --blue-mid:     #1A56DB;
  --blue-light:   #EBF5FF;
  --blue-accent:  #3B82F6;
  --text-main:    #0A2540;
  --text-muted:   #6B7280;
  --surface:      #F9FAFB;
  --border:       #E5E7EB;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-main);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =========================================================
   CONTAINER
   ========================================================= */
.dscf-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   MASQUER LE HEADER KADENCE SUR LA PAGE D'ACCUEIL
   La classe .home est ajoutée par WordPress sur <body>
   ========================================================= */
.home #masthead,
.home .site-header,
.home .kadence-sticky-header,
.home header.site-header,
.home .wp-block-template-part[class*="header"] {
  display: none !important;
}

/* Annuler le padding-top que Kadence ajoute pour compenser son header sticky */
.home .content-area,
.home #primary,
.home .site-content,
.home #content,
.home body > .hfeed {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.dscf-nav {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dscf-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}

.dscf-nav__logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dscf-nav__logo-text { color: var(--blue-dark); }
.dscf-nav__logo-tld  { color: var(--blue-mid); }

.dscf-nav__logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.dscf-nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.dscf-nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s;
}

.dscf-nav__links a:hover { color: var(--blue-mid); }

.dscf-nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.dscf-nav__contact {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s;
}

.dscf-nav__contact:hover { color: var(--blue-mid); }

.dscf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  cursor: pointer;
  transition: opacity .2s, background .2s, color .2s, border-color .2s;
  border: 1.5px solid transparent;
  white-space: nowrap;
  line-height: 1;
}

.dscf-btn--primary {
  background: var(--blue-mid);
  color: #fff;
  border-color: var(--blue-mid);
}

.dscf-btn--primary:hover { opacity: .88; }

.dscf-btn--outline {
  background: transparent;
  color: var(--blue-mid);
  border-color: var(--blue-mid);
}

.dscf-btn--outline:hover {
  background: var(--blue-light);
}

.dscf-btn--white {
  background: #fff;
  color: var(--blue-mid);
  border-color: #fff;
}

.dscf-btn--white:hover { opacity: .9; }

/* =========================================================
   HERO
   ========================================================= */
.dscf-hero {
  padding: 48px 0;
  overflow: hidden;
}

.dscf-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

/* Hero Left */
.dscf-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blue-light);
  color: var(--blue-mid);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.dscf-hero__badge svg { flex-shrink: 0; }

.dscf-hero__h1 {
  font-size: 38px;
  font-weight: 500;
  color: var(--blue-dark);
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.dscf-hero__h1 span { color: var(--blue-mid); }

.dscf-hero__desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 480px;
}

.dscf-hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.dscf-hero__trust {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dscf-hero__trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-mid);
  flex-shrink: 0;
}

.dscf-hero__trust-sep {
  color: var(--border);
}

/* Hero Right */
.dscf-hero__right {
  position: relative;
}

.dscf-hero__card-main {
  background: var(--blue-dark);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}

.dscf-hero__card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.25);
  color: #93C5FD;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.dscf-hero__card-title {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}

.dscf-hero__card-sub {
  color: #93C5FD;
  font-size: 13px;
  margin-bottom: 24px;
}

.dscf-progress-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dscf-progress-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.dscf-progress-item__label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 500;
}

.dscf-progress-item__pct {
  color: #93C5FD;
  font-size: 12px;
  font-weight: 600;
}

.dscf-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.dscf-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

/* Floating card */
.dscf-hero__card-float {
  position: absolute;
  bottom: -20px;
  right: -16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(10, 37, 64, 0.1);
  min-width: 200px;
}

.dscf-hero__card-float-icon {
  width: 36px;
  height: 36px;
  background: var(--blue-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--blue-mid);
}

.dscf-hero__card-float-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
}

.dscf-hero__card-float-text span {
  font-size: 11px;
  color: var(--text-muted);
}

/* =========================================================
   DIVIDER
   ========================================================= */
.dscf-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* =========================================================
   SECTION COMMON
   ========================================================= */
.dscf-section {
  padding: 40px 0;
}

.dscf-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.dscf-section__title {
  font-size: 28px;
  font-weight: 600;
  color: var(--blue-dark);
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.dscf-section__sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 36px;
}

/* =========================================================
   FORMATIONS GRID
   ========================================================= */
.dscf-formations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.dscf-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dscf-form-card:hover {
  border-color: var(--blue-mid);
  box-shadow: 0 2px 12px rgba(26, 86, 219, 0.08);
}

.dscf-form-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dscf-form-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dscf-form-card__badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid var(--border);
}

.dscf-form-card__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--blue-dark);
}

.dscf-form-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.dscf-form-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.dscf-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dscf-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.dscf-pill--blue  { background: var(--blue-light); color: var(--blue-mid); }
.dscf-pill--red   { background: #FFF1F2; color: #DC2626; }
.dscf-pill--violet{ background: #F5F3FF; color: #7C3AED; }
.dscf-pill--green { background: #ECFDF5; color: #059669; }
.dscf-pill--orange{ background: #FFF7ED; color: #D97706; }
.dscf-pill--teal  { background: #F0FDFA; color: #0D9488; }

.dscf-form-card__arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color .2s, transform .2s;
}

.dscf-form-card:hover .dscf-form-card__arrow {
  color: var(--blue-mid);
  transform: translateX(3px);
}

.dscf-formations-more {
  text-align: center;
  padding: 24px 0 0 0;
}

.dscf-formations-more a {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-mid);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity .2s;
}

.dscf-formations-more a:hover { opacity: .75; }

/* =========================================================
   CERTIFICATIONS
   ========================================================= */
.dscf-certs {
  background: var(--blue-dark);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 0 0 32px 0;
}

.dscf-certs .dscf-eyebrow { color: #60A5FA; }
.dscf-certs .dscf-section__title { color: #fff; }
.dscf-certs .dscf-section__sub { color: #93C5FD; }

.dscf-certs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.dscf-cert-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background .2s;
}

.dscf-cert-item:hover { background: rgba(255, 255, 255, 0.1); }

.dscf-cert-item__icon {
  color: #60A5FA;
  margin-bottom: 4px;
}

.dscf-cert-item__name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.dscf-cert-item__sub {
  font-size: 12px;
  color: #93C5FD;
}

.dscf-certs__note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #93C5FD;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}

.dscf-certs__note svg { flex-shrink: 0; }

/* =========================================================
   CODEDUEL
   ========================================================= */
.dscf-codeduel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 0 0 32px 0;
}

.dscf-codeduel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.dscf-codeduel__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.dscf-codeduel__title {
  font-size: 26px;
  font-weight: 600;
  color: var(--blue-dark);
  letter-spacing: -0.3px;
  margin-bottom: 14px;
  line-height: 1.3;
}

.dscf-codeduel__desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 22px;
}

.dscf-codeduel__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.dscf-codeduel__pill {
  font-size: 12px;
  font-weight: 600;
  background: var(--blue-light);
  color: var(--blue-mid);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(26, 86, 219, 0.2);
}

/* CodeDuel right card */
.dscf-cd-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.dscf-cd-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.dscf-cd-card__header-icon {
  color: var(--blue-mid);
}

.dscf-cd-card__header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-dark);
}

.dscf-skill-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.dscf-skill-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.dscf-skill-row__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.dscf-skill-row__pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.dscf-skill-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.dscf-skill-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-mid), #60A5FA);
}

.dscf-cd-card__note {
  font-size: 12px;
  color: var(--text-muted);
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  line-height: 1.5;
}

/* =========================================================
   CTA FINAL
   ========================================================= */
.dscf-cta {
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark));
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  margin: 32px 0 56px;
}

.dscf-cta__title {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.dscf-cta__sub {
  font-size: 15px;
  color: #93C5FD;
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* =========================================================
   FOOTER CUSTOM
   ========================================================= */
.dscf-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 48px;
}

.dscf-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.dscf-footer__inner a {
  color: var(--text-muted);
  text-decoration: none;
}

.dscf-footer__inner a:hover {
  color: var(--blue-mid);
}

/* =========================================================
   PAGE FORMATIONS
   ========================================================= */

/* Hero de page */
.dscf-page-hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.dscf-page-hero__title {
  font-size: 34px;
  font-weight: 600;
  color: var(--blue-dark);
  letter-spacing: -0.4px;
  margin-bottom: 12px;
  line-height: 1.25;
}

.dscf-page-hero__sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 600px;
}

/* Grille 8 formations */
.dscf-formations-full-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 56px;
}

/* Pills technologies dans les cards */
.dscf-form-card__techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 8px;
}

/* Pill indigo */
.dscf-pill--indigo { background: #EEF2FF; color: #4F46E5; }

/* Section "Toutes nos formations incluent" */
.dscf-form-includes {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
  margin-bottom: 40px;
}

.dscf-form-includes__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dscf-form-includes__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.dscf-form-includes__icon {
  width: 40px;
  height: 40px;
  background: var(--blue-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dscf-form-includes__item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-dark);
  margin-bottom: 3px;
}

.dscf-form-includes__item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* CTA final formations */
.dscf-form-cta {
  background: var(--blue-dark);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin-bottom: 56px;
}

.dscf-form-cta__title {
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.dscf-form-cta__sub {
  font-size: 15px;
  color: #93C5FD;
  margin-bottom: 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.dscf-form-cta__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.dscf-btn--outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
}

.dscf-btn--outline-white:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.7);
}

/* Responsive formations */
@media (max-width: 768px) {
  .dscf-formations-full-grid { grid-template-columns: 1fr; }
  .dscf-form-includes__grid  { grid-template-columns: 1fr; }
  .dscf-form-cta { padding: 32px 20px; }
  .dscf-page-hero__title { font-size: 26px; }
}

/* =========================================================
   PAGE GÉNÉRIQUE (page.php)
   ========================================================= */
.dscf-page-content {
  padding: 60px 0;
}

.dscf-page-title {
  font-size: 32px;
  font-weight: 500;
  color: var(--blue-dark);
  margin-bottom: 32px;
}

.dscf-page-body {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* =========================================================
   RESPONSIVE — 768px
   ========================================================= */
@media (max-width: 768px) {

  /* Nav */
  .dscf-nav__links { display: none; }

  .dscf-nav__inner {
    justify-content: space-between;
  }

  /* Hero */
  .dscf-hero { padding: 40px 0 60px; }
  .dscf-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .dscf-hero__h1 { font-size: 28px; }
  .dscf-hero__card-float { position: static; margin-top: 16px; display: inline-flex; }

  /* Formations */
  .dscf-formations-grid { grid-template-columns: 1fr; }

  /* Certs */
  .dscf-certs { padding: 28px 20px; }
  .dscf-certs-grid { grid-template-columns: 1fr 1fr; }

  /* CodeDuel */
  .dscf-codeduel { padding: 28px 20px; }
  .dscf-codeduel__grid { grid-template-columns: 1fr; gap: 28px; }

  /* CTA */
  .dscf-cta { padding: 36px 20px; }
  .dscf-cta__title { font-size: 22px; }
}

@media (max-width: 480px) {
  .dscf-certs-grid { grid-template-columns: 1fr; }
  .dscf-hero__cta { flex-direction: column; }
  .dscf-hero__cta .dscf-btn { width: 100%; justify-content: center; }
}
