/*
Theme Name:  Diploma Éducation
Theme URI:   https://diploma-education.fr
Author:      Diploma Éducation
Description: Thème officiel du groupe Diploma Éducation — sobre, élégant, dark luxury.
Version:     1.0.0
License:     Proprietary
Text Domain: diploma-education
Tags:        dark, education, custom-header, full-width-template
*/

/* ================================================================
   VARIABLES & RESET GLOBAL
   ================================================================ */

:root {
  --de-dark:       #0A0F1E;
  --de-dark-2:     #0D1428;
  --de-dark-3:     #111830;
  --de-steel:      #86A59D;
  --de-warm:       #9B8A6D;
  --de-light:      #AAC3BB;
  --de-white:      #FFFFFF;
  --de-off-white:  #F0EDE8;
  --de-muted:      rgba(255,255,255,0.58);
  --de-muted-2:    rgba(255,255,255,0.35);
  --de-border:     rgba(170,195,187,0.20);
  --de-border-2:   rgba(170,195,187,0.40);
  --de-card-bg:    rgba(255,255,255,0.035);
  --de-card-hover: rgba(255,255,255,0.065);
  --de-font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --de-font-sans:  'DM Sans', system-ui, sans-serif;
  --de-nav-h:      76px;
  --de-radius:     12px;
  --de-radius-lg:  18px;
  --de-radius-pill: 100px;
  --de-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--de-dark);
  color: var(--de-white);
  font-family: var(--de-font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typographie de base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--de-font-serif);
  font-weight: 700;
  line-height: 1.15;
  color: var(--de-white);
}

p { color: var(--de-muted); line-height: 1.75; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--de-transition);
}

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }


/* ================================================================
   OVERRIDE THÈME PARENT / RESET FORCÉ
   Neutralise tout header, footer, nav injecté par un thème actif
   ================================================================ */

/* Fond sombre forcé sur tout le body */
html, body {
  background-color: #0A0F1E !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Masquer header/footer/nav du thème parent s'ils existent */
.site-header:not(.de-nav),
.site-footer:not(.de-footer),
#masthead,
#colophon,
#site-navigation,
.primary-navigation,
.nav-primary,
.ast-header-wrap,
.main-header-bar,
.generate-header,
.fl-builder-bar,
header.entry-header:not(.de-inner-hero),
.wp-block-template-part[class*="header"],
.wp-site-blocks > header {
  display: none !important;
}

/* Retirer les paddings/margins que les thèmes ajoutent au contenu */
.site-content,
.site-main,
#content,
#primary,
.content-area,
.wp-site-blocks,
.entry-content > *:first-child,
.hfeed {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* S'assurer que notre hero plein écran n'est pas rogné */
.de-home-hero,
.de-inner-hero {
  margin-top: 0 !important;
}

/* Neutraliser les body padding des thèmes (Twenty*, Astra, GP, etc.) */
body.de-front-page,
body.de-page {
  padding-top: 0 !important;
}

/* ================================================================
   NAVIGATION
   ================================================================ */

.de-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--de-nav-h);
  display: flex;
  align-items: center;
  padding: 0 48px;
  transition: background var(--de-transition), backdrop-filter var(--de-transition), border-color var(--de-transition);
}

.de-nav.scrolled {
  background: rgba(10,15,30,0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--de-border);
}

.de-nav__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

/* Logo nav — taille fixe, ne se réduit pas */
.de-nav__logo {
  flex-shrink: 0;
  margin-right: 48px;
}

.de-nav__logo img,
.de-nav__logo .custom-logo {
  height: 38px !important;
  width: auto !important;
  display: block;
  filter: brightness(0) invert(1);
}

/* Zone menu prend l'espace central */
.de-nav__menu-wrap {
  flex: 1;
}

/* Menu principal */
.de-nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.de-nav__menu > li {
  position: relative;
}

.de-nav__menu > li > a {
  display: block;
  padding: 9px 22px;
  font-family: var(--de-font-sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--de-muted);
  border-radius: var(--de-radius-pill);
  transition: color var(--de-transition), background var(--de-transition);
}

.de-nav__menu > li > a:hover,
.de-nav__menu > li.current-menu-item > a,
.de-nav__menu > li.current-menu-parent > a {
  color: var(--de-white);
  background: rgba(255,255,255,0.06);
}

/* Flèche dropdown */
.de-nav__menu > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.6;
}

.de-nav__menu .sub-menu {
  position: fixed;   /* fixed = indépendant de tout parent */
  top: 0;
  left: 0;
  min-width: 240px;
  background: rgba(13,20,40,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--de-border);
  border-radius: var(--de-radius);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--de-transition);
  z-index: 2000;
}

.de-nav__menu > li.de-open .sub-menu {
  opacity: 1;
  pointer-events: all;
}

.de-nav__menu .sub-menu li a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--de-muted);
  border-radius: 8px;
  transition: color var(--de-transition), background var(--de-transition);
}

.de-nav__menu .sub-menu li a:hover {
  color: var(--de-white);
  background: rgba(255,255,255,0.06);
}

/* CTA nav */
.de-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--de-white);
  border: 1px solid var(--de-border-2);
  border-radius: var(--de-radius-pill);
  background: rgba(134,165,157,0.10);
  transition: background var(--de-transition), border-color var(--de-transition);
  white-space: nowrap;
}

.de-nav__cta:hover {
  background: rgba(134,165,157,0.22);
  border-color: var(--de-steel);
  color: var(--de-white);
}

/* Burger mobile */
.de-nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.de-nav__burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--de-white);
  transition: transform var(--de-transition), opacity var(--de-transition);
}

.de-nav__burger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.de-nav__burger.active span:nth-child(2) { opacity: 0; }
.de-nav__burger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Menu mobile */
.de-nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--de-nav-h);
  background: rgba(10,15,30,0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 999;
  padding: 32px 24px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.de-nav__mobile.open { display: flex; }

.de-nav__mobile a {
  display: block;
  padding: 14px 20px;
  font-size: 18px;
  font-family: var(--de-font-serif);
  color: var(--de-muted);
  border-radius: var(--de-radius);
  transition: color var(--de-transition), background var(--de-transition);
}

.de-nav__mobile a:hover { color: var(--de-white); background: rgba(255,255,255,0.05); }

.de-nav__mobile .sub-menu { padding-left: 20px; }
.de-nav__mobile .sub-menu a { font-size: 15px; padding: 10px 20px; }

/* ================================================================
   HERO COMMUN (pages internes)
   ================================================================ */

.de-inner-hero {
  position: relative;
  padding: calc(var(--de-nav-h) + 80px) 24px 80px;
  text-align: center;
  background-color: var(--de-dark);
  overflow: hidden;
}

.de-inner-hero__bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg, url('assets/images/fond.png'));
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.de-inner-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,15,30,0.5) 0%, rgba(10,15,30,0.85) 60%, var(--de-dark) 100%);
}

.de-inner-hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

.de-eyebrow {
  display: inline-block;
  font-family: var(--de-font-sans);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--de-steel);
  border: 1px solid var(--de-border);
  padding: 6px 18px;
  border-radius: var(--de-radius-pill);
  margin-bottom: 24px;
}

.de-inner-hero h1 {
  font-size: clamp(32px, 5vw, 58px);
  margin-bottom: 20px;
  color: var(--de-white);
}

.de-inner-hero h1 em { font-style: italic; color: var(--de-light); }

.de-inner-hero p {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--de-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ================================================================
   UTILITAIRES
   ================================================================ */

.de-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.de-section {
  padding: 88px 24px;
}

.de-section--alt {
  background: rgba(255,255,255,0.018);
  border-top: 1px solid var(--de-border);
  border-bottom: 1px solid var(--de-border);
}

.de-section-label {
  font-family: var(--de-font-sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--de-steel);
  margin-bottom: 10px;
}

.de-section-title {
  font-size: clamp(26px, 3.5vw, 44px);
  margin-bottom: 16px;
  color: var(--de-white);
}

.de-section-intro {
  font-size: 16px;
  color: var(--de-muted);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 52px;
}

/* Divider décoratif */
.de-divider {
  width: 48px;
  height: 1px;
  background: var(--de-steel);
  margin: 0 auto 48px;
  position: relative;
}
.de-divider::before,
.de-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--de-steel);
  transform: translateY(-50%);
}
.de-divider::before { left: -10px; }
.de-divider::after  { right: -10px; }

/* Boutons */
.de-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--de-font-sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--de-radius-pill);
  transition: background var(--de-transition), border-color var(--de-transition), transform var(--de-transition);
  cursor: pointer;
  white-space: nowrap;
}

.de-btn--primary {
  background: rgba(134,165,157,0.18);
  border: 1px solid rgba(134,165,157,0.45);
  color: var(--de-white);
}
.de-btn--primary:hover {
  background: rgba(134,165,157,0.32);
  border-color: var(--de-steel);
  color: var(--de-white);
  transform: translateY(-2px);
}

.de-btn--ghost {
  background: transparent;
  border: 1px solid var(--de-border);
  color: var(--de-muted);
}
.de-btn--ghost:hover {
  border-color: var(--de-border-2);
  color: var(--de-white);
  transform: translateY(-2px);
}

/* ================================================================
   FOOTER
   ================================================================ */

.de-footer {
  background: #060910;
  border-top: 1px solid var(--de-border);
  padding: 60px 24px 32px;
}

.de-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.de-footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--de-border);
}

.de-footer__brand img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
  opacity: 0.85;
}

.de-footer__brand p {
  font-size: 13px;
  color: var(--de-muted-2);
  line-height: 1.7;
  max-width: 240px;
}

.de-footer__col-title {
  font-family: var(--de-font-sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--de-steel);
  margin-bottom: 20px;
}

.de-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.de-footer__col ul li a {
  font-size: 13px;
  color: var(--de-muted-2);
  transition: color var(--de-transition);
}

.de-footer__col ul li a:hover { color: var(--de-white); }

.de-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 28px;
  flex-wrap: wrap;
}

.de-footer__copy {
  font-size: 12px;
  color: var(--de-muted-2);
  letter-spacing: 0.05em;
}

.de-footer__links {
  display: flex;
  gap: 24px;
}

.de-footer__links a {
  font-size: 12px;
  color: var(--de-muted-2);
  transition: color var(--de-transition);
}

.de-footer__links a:hover { color: var(--de-light); }

/* ================================================================
   RESPONSIVE GLOBAL
   ================================================================ */

@media (max-width: 1024px) {
  .de-nav { padding: 0 24px; }
  .de-nav__menu { display: none; }
  .de-nav__cta.desktop-only { display: none; }
  .de-nav__burger { display: flex; }
  .de-footer__top { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  :root { --de-nav-h: 64px; }
  .de-section { padding: 60px 20px; }
  .de-footer__top { grid-template-columns: 1fr; }
  .de-footer__bottom { flex-direction: column; text-align: center; }
}

/* ================================================================
   ACCESSIBILITÉ — Skip link & focus visible
   ================================================================ */

.de-skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 10px 20px;
  background: var(--de-white);
  color: var(--de-dark) !important;
  font-family: var(--de-font-sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 0 var(--de-radius) var(--de-radius);
  text-decoration: none;
  transition: top 0.2s;
}

.de-skip-link:focus {
  top: 0;
  outline: 3px solid var(--de-steel);
  outline-offset: 2px;
}

/* Focus visible global pour navigation clavier */
:focus-visible {
  outline: 2px solid var(--de-steel);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Classe screen-reader WordPress standard */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  clip: auto !important;
  height: auto;
  width: auto;
  overflow: visible;
}
