/*
Theme Name:     XDVision Theme
Template:       twentytwentyfour
Version:        1.0
Text Domain:    xdvision-theme
*/
html, body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}
body {
  user-select: none;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE/Edge */
}

input, textarea {
  user-select: text;
}
/* ==== PALETTE GLOBALE ==== */
:root {
  --color-bg-dark: #131417;
  --color-bg-light: #f5f5f5;

  --color-text-dark: #e0e0e0;
  --color-text-light: #1a1a1a;

  --color-primary: #2962FF;
  --color-primary-hover: #0039cb;

  --color-muted: #888;
  --border-radius: 12px;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.2);
  
  --color-dropdown-hover: #3a3d45;
  --color-info: #aaa;
  --color-info-hover: #fff;
  --color-cgu-bg: #1a1c22e6;
  --color-cgu-header-bg: #2a2d34;
  
  --color-slider-track: var(--color-primary);
  --color-slider-thumb-bg: var(--color-dashboard-text);
  --color-slider-thumb-border: var(--color-primary);

}

/* === Mode clair ou sombre automatique === */
@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-dark);
  }
}
@media (prefers-color-scheme: light) {
  body {
    background-color: var(--color-bg-light);
    color: var(--color-text-light);
  }
}
.logo-theme-dark {
  display: block;
}
.logo-theme-light {
  display: none;
}

body.theme-clair .logo-theme-dark {
  display: none;
}
body.theme-clair .logo-theme-light {
  display: block;
}
/* ==== TYPOGRAPHIE ==== */
body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

body.fade-out {
  opacity: 0;
  transition: opacity 0.2s ease;
}

h1, h2, h3, h4 {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  margin: 0 0 0.5em;
  font-weight: 600;
}

.text-heading {
  font-size: 1.2em;
  font-weight: bold;
}
.text-muted {
  color: var(--color-muted);
}

/* === TYPO ÉTENDUE === */
body,
input,
textarea,
select,
button {
    font-family: 'Segoe UI', 'Roboto', sans-serif !important;
}

/* ==== BOUTONS ==== */
.btn-main {
  display: inline-block;
  padding: 0.6em 1.2em;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.btn-main:hover {
  background-color: var(--color-primary-hover);
}

/* ==== CARTES & BLOCS ==== */
.card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1em;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1em;
}

/* ==== UTILITAIRES ==== */
.bg-dark {
  background-color: var(--color-bg-dark);
}
.bg-light {
  background-color: var(--color-bg-light);
}
.text-center {
  text-align: center;
}

/*
Theme Name:     XDVision Theme
Template:       twentytwentyfour
Version:        1.0
Text Domain:    xdvision-theme
*/
body {
  user-select: none;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE/Edge */
}
input, textarea {
  user-select: text;
}
/* ==== PALETTE GLOBALE ==== */
:root {
  --color-bg-dark: #131417;
  --color-bg-light: #f5f5f5;

  --color-text-dark: #e0e0e0;
  --color-text-light: #1a1a1a;

  --color-primary: #2962FF;
  --color-primary-hover: #0039cb;

  --color-muted: #888;
  --border-radius: 12px;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.2);
  
  --color-dropdown-hover: #3a3d45;
  --color-info: #aaa;
  --color-info-hover: #fff;
  --color-cgu-bg: #1a1c22e6;
  --color-cgu-header-bg: #2a2d34;
  
  --color-slider-track: var(--color-primary);
  --color-slider-thumb-bg: var(--color-dashboard-text);
  --color-slider-thumb-border: var(--color-primary);

}

/* === Mode clair ou sombre automatique === */
@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-dark);
  }
}
@media (prefers-color-scheme: light) {
  body {
    background-color: var(--color-bg-light);
    color: var(--color-text-light);
  }
}
.logo-theme-dark {
  display: block;
}
.logo-theme-light {
  display: none;
}

body.theme-clair .logo-theme-dark {
  display: none;
}
body.theme-clair .logo-theme-light {
  display: block;
}
/* ==== TYPOGRAPHIE ==== */
body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

body.fade-out {
  opacity: 0;
  transition: opacity 0.2s ease;
}

h1, h2, h3, h4 {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  margin: 0 0 0.5em;
  font-weight: 600;
}

.text-heading {
  font-size: 1.2em;
  font-weight: bold;
}
.text-muted {
  color: var(--color-muted);
}

/* === TYPO ÉTENDUE === */
body,
input,
textarea,
select,
button {
    font-family: 'Segoe UI', 'Roboto', sans-serif !important;
}

/* ==== BOUTONS ==== */
.btn-main {
  display: inline-block;
  padding: 0.6em 1.2em;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.btn-main:hover {
  background-color: var(--color-primary-hover);
}

/* ==== CARTES & BLOCS ==== */
.card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1em;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1em;
}

/* ==== UTILITAIRES ==== */
.bg-dark {
  background-color: var(--color-bg-dark);
}
.bg-light {
  background-color: var(--color-bg-light);
}
.text-center {
  text-align: center;
}

/* ==== PAGE D’ACCUEIL HERO ==== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: url('../xdvision-theme/assets/img/xdvision-bg-fallback.jpg') center center / cover no-repeat;
}
.hero video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  color: white;
  animation: fadeIn 1.6s ease-in-out both;
}
.hero-logo {
  width: clamp(160px, 20vw, 280px);
  margin-bottom: 2rem;
  animation: fadeIn 1.6s ease-in-out both, glowPulse 2s ease-out;
}
.hero .btn-main {
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  padding: clamp(0.5rem, 1vw, 0.9rem) clamp(1.2rem, 2.5vw, 2rem);
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 1vw;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
  animation: fadeIn 2s ease-in-out both;
}
.hero .btn-main:hover {
  background-color: var(--color-primary-hover);
}

/* ==== ANIMATIONS ==== */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes glowPulse {
  0% {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1));
  }
  100% {
    filter: drop-shadow(0 0 0px rgba(0, 0, 0, 0));
  }
}


/* ==== PALETTE DASHBOARD ==== */
:root {
  --color-dashboard-bg: var(--color-bg-dark);
  --color-dashboard-bg-secondary: #1c1c1e;
  --color-dashboard-text: var(--color-text-dark);
  --color-dashboard-text-light: #aaa;
  --color-dashboard-heading: #ffffff;
  --color-dashboard-border: #444;

  --color-dashboard-button-bg: #222;
  --color-dashboard-button-hover: #444;

  --color-dashboard-sidebar: rgba(26, 28, 34, 0);
  --color-dashboard-header: rgba(31, 33, 40, 0);
  --color-sidebar-link: #aaa; /* défaut = thème foncé */
  
  --color-menu-bg: rgba(0, 0, 0, 0.9);     /* thème foncé */
  --color-menu-text: #fff;
  --color-menu-hover: #3a3d45;
  
  --color-dropdown-hover: #3a3d45;
  --color-info: #aaa;
  --color-info-hover: #fff;
  --color-cgu-bg: #1a1c22e6;
  --color-cgu-header-bg: #2a2d34;
}

body.theme-clair {
  --color-dashboard-bg: var(--color-bg-light);
  --color-dashboard-bg-secondary: #f4f4f4;
  --color-dashboard-text: var(--color-text-light);
  --color-dashboard-text-light: #666;
  --color-dashboard-heading: #111;
  --color-dashboard-border: #0f0f0f;

  --color-dashboard-button-bg: #bbb;
  --color-dashboard-button-hover: #aaa;

  --color-dashboard-sidebar: rgba(255, 255, 255, 0.8);
  --color-dashboard-header: rgba(255, 255, 255, 0.4);
  --color-sidebar-link: #444; /* plus foncé pour être lisible sur fond clair */
  
  --color-menu-bg: rgba(255, 255, 255, 0.95);  /* thème clair */
  --color-menu-text: #111;
  --color-menu-hover: #cfcfcf;
  
  --color-dropdown-hover: #3a3d45;
  --color-info: #aaa;
  --color-info-hover: #fff;
  --color-cgu-bg: #1a1c22e6;
  --color-cgu-header-bg: #2a2d34;
}
/* ==== INPUTS EN MODE SOMBRE ==== */
body:not(.theme-clair) input,
body:not(.theme-clair) textarea,
body:not(.theme-clair) select {
  background-color: #1c1c1e;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: var(--border-radius);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
  padding: 10px 10px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #444;
  border-radius: var(--border-radius);
}
body:not(.theme-clair) input::placeholder,
body:not(.theme-clair) textarea::placeholder {
  color: #888;
}

.theme-clair .theme-fonce-only {
  display: none !important;
}
.theme-fonce .theme-clair-only {
  display: none !important;
}
/* Toutes les icônes du dashboard héritent correctement la couleur */
/* Règle générale pour toutes les icônes dans le dashboard */
.dashboard-wrapper i {
  color: var(--color-dashboard-text);
}
.settings-link {
  color: var(--color-dashboard-text) !important;
}
body.modal-open {
  overflow: hidden;
}





@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}



.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--color-main);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



/* === RESPONSIVE BREAKPOINTS === */

/* MOBILE - en dessous de 600px */
@media (max-width: 600px) {
  .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .user-menu-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
  }

  .user-display {
    display: flex;
    align-items: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8em;
  }

  .user-display i,
  .user-display span,
  .user-display .fa-angle-down {
    margin-right: 6px;
    font-size: 0.85em;
  }

  .info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    color: var(--color-dashboard-text);
    flex-shrink: 0;
  }
.dashboard-info-grid {
  display: grid;
  grid-template-columns: 110px 1fr !important; /* fixe 1re colonne */
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
}

.dashboard-info-grid .label {
  font-weight: bold;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  font-size: 0.95em;
  color: var(--color-dashboard-heading);
  font-size: 0.8em;
}

.dashboard-info-grid .value {
  word-break: break-word;
  font-size: 0.8em;
}

.dashboard-empty-message {
  margin: 2rem auto;
  font-style: italic;
  text-align: center;
  color: var(--color-dashboard-text-light);
}


.theme-toggle-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 10px;
  text-align: center;
  margin-top: 11px;
}

.theme-toggle-wrapper span {
  font-size: 0.65em;
  word-break: break-word;
}

.theme-toggle-wrapper .xdvision-switch {
  transform: scale(0.85); /* réduit la taille du switch */
}

}





/* MASQUE DES ELEMENTS POUR LES TABLETTE ET MOBILE */
@media (max-width: 1024px) {
  .hide-mobile-tablet {
    display: none !important;
  }

  .project-card,
  .clickable-project {
    cursor: pointer;
  }

  .burger-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 1.5em;
    color: var(--color-dashboard-text);
    cursor: pointer;
    margin: 10px;
  }

  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background-color: var(--color-dashboard-sidebar);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 2000;
    flex-direction: column;
    padding: 15px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
  }

  .dashboard-sidebar.active {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0 !important;
  }


}


/* DESKTOP - au-delà de 1025px */
@media (min-width: 1025px) {
  .burger-menu {
    display: none;
  }

  .hide-desktop {
    display: none !important;
  }

}





/* ==== ANIMATIONS ==== */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes glowPulse {
  0% {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1));
  }
  100% {
    filter: drop-shadow(0 0 0px rgba(0, 0, 0, 0));
  }
}


/* ==== PALETTE DASHBOARD ==== */
:root {
  --color-dashboard-bg: var(--color-bg-dark);
  --color-dashboard-bg-secondary: #1c1c1e;
  --color-dashboard-text: var(--color-text-dark);
  --color-dashboard-text-light: #aaa;
  --color-dashboard-heading: #ffffff;
  --color-dashboard-border: #444;

  --color-dashboard-button-bg: #222;
  --color-dashboard-button-hover: #444;

  --color-dashboard-sidebar: rgba(26, 28, 34, 0);
  --color-dashboard-header: rgba(31, 33, 40, 0);
  --color-sidebar-link: #aaa; /* défaut = thème foncé */
  
  --color-menu-bg: rgba(0, 0, 0, 0.9);     /* thème foncé */
  --color-menu-text: #fff;
  --color-menu-hover: #3a3d45;
  
  --color-dropdown-hover: #3a3d45;
  --color-info: #aaa;
  --color-info-hover: #fff;
  --color-cgu-bg: #1a1c22e6;
  --color-cgu-header-bg: #2a2d34;
}

body.theme-clair {
  --color-dashboard-bg: var(--color-bg-light);
  --color-dashboard-bg-secondary: #f4f4f4;
  --color-dashboard-text: var(--color-text-light);
  --color-dashboard-text-light: #666;
  --color-dashboard-heading: #111;
  --color-dashboard-border: #0f0f0f;

  --color-dashboard-button-bg: #bbb;
  --color-dashboard-button-hover: #aaa;

  --color-dashboard-sidebar: rgba(255, 255, 255, 0.8);
  --color-dashboard-header: rgba(255, 255, 255, 0.4);
  --color-sidebar-link: #444; /* plus foncé pour être lisible sur fond clair */
  
  --color-menu-bg: rgba(255, 255, 255, 0.95);  /* thème clair */
  --color-menu-text: #111;
  --color-menu-hover: #cfcfcf;
  
  --color-dropdown-hover: #3a3d45;
  --color-info: #aaa;
  --color-info-hover: #fff;
  --color-cgu-bg: #1a1c22e6;
  --color-cgu-header-bg: #2a2d34;
}
/* ==== INPUTS EN MODE SOMBRE ==== */
body:not(.theme-clair) input,
body:not(.theme-clair) textarea,
body:not(.theme-clair) select {
  background-color: #1c1c1e;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: var(--border-radius);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
  padding: 10px 10px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #444;
  border-radius: var(--border-radius);
}
body:not(.theme-clair) input::placeholder,
body:not(.theme-clair) textarea::placeholder {
  color: #888;
}

.theme-clair .theme-fonce-only {
  display: none !important;
}
.theme-fonce .theme-clair-only {
  display: none !important;
}
/* Toutes les icônes du dashboard héritent correctement la couleur */
/* Règle générale pour toutes les icônes dans le dashboard */
.dashboard-wrapper i {
  color: var(--color-dashboard-text);
}
.settings-link {
  color: var(--color-dashboard-text) !important;
}
body.modal-open {
  overflow: hidden;
}


@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}



.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--color-main);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



/* === RESPONSIVE BREAKPOINTS === */

/* MOBILE - en dessous de 600px */
@media (max-width: 600px) {
  .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .user-menu-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
  }

  .user-display {
    display: flex;
    align-items: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8em;
  }

  .user-display i,
  .user-display span,
  .user-display .fa-angle-down {
    margin-right: 6px;
    font-size: 0.85em;
  }

  .info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    color: var(--color-dashboard-text);
    flex-shrink: 0;
  }
.dashboard-info-grid {
  display: grid;
  grid-template-columns: 110px 1fr !important; /* fixe 1re colonne */
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
}

.dashboard-info-grid .label {
  font-weight: bold;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  font-size: 0.95em;
  color: var(--color-dashboard-heading);
  font-size: 0.8em;
}

.dashboard-info-grid .value {
  word-break: break-word;
  font-size: 0.8em;
}

.dashboard-empty-message {
  margin: 2rem auto;
  font-style: italic;
  text-align: center;
  color: var(--color-dashboard-text-light);
}


.theme-toggle-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 10px;
  text-align: center;
  margin-top: 11px;
}

.theme-toggle-wrapper span {
  font-size: 0.65em;
  word-break: break-word;
}

.theme-toggle-wrapper .xdvision-switch {
  transform: scale(0.85); /* réduit la taille du switch */
}

}





/* MASQUE DES ELEMENTS POUR LES TABLETTE ET MOBILE */
@media (max-width: 1024px) {
  .hide-mobile-tablet {
    display: none !important;
  }

  .project-card,
  .clickable-project {
    cursor: pointer;
  }

  .burger-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 1.5em;
    color: var(--color-dashboard-text);
    cursor: pointer;
    margin: 10px;
  }

  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background-color: var(--color-dashboard-sidebar);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 2000;
    flex-direction: column;
    padding: 15px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
  }

  .dashboard-sidebar.active {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0 !important;
  }


}


/* DESKTOP - au-delà de 1025px */
@media (min-width: 1025px) {
  .burger-menu {
    display: none;
  }

  .hide-desktop {
    display: none !important;
  }

}



