/* Import de la police personnalisée utilisée pour les titres et le contenu */
@import url('https://fonts.googleapis.com/css2?family=Bowlby+One&display=swap');

*{
  box-sizing: border-box;
  margin: 0;
}

/* 🛠 Corrige le débordement du menu latéral sur le dashboard */
body.dashboard-page #wpwrap {
  overflow: visible !important;
}

body.dashboard-page #adminmenuwrap {
  overflow: visible !important;
}

body.dashboard-page #adminmenu {
  overflow: visible !important;
  position: relative;
  z-index: 10000;
}

/* 🧩 S'assure que les sous-menus sont visibles */
body.dashboard-page #adminmenu .wp-submenu {
  position: absolute;
  left: 160px; /* largeur du menu principal */
  top: 0;
  z-index: 99999;
  background: #f1f1f1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* 🧼 Empêche le scroll horizontal du dashboard */
body.dashboard-page #wpbody-content {
  overflow-x: hidden !important;
}


/* Masque le titre H1 par défaut du dashboard WordPress */
#wpbody-content .wrap h1 {
  display: none !important;
}

/* Style du titre principal "Bienvenue" */
.title1 {
  font-family: 'Bowlby One', sans-serif;
  font-size: 3rem;
  color: #3C4F4F;
  text-align: center;
  margin: 4rem 0 0 0; /* espace au-dessus uniquement */
}

/* Style du sous-titre "sur le tableau de bord !" */
.title2 {
  font-family: 'Bowlby One', sans-serif;
  font-size: 2rem;
  color: #698E8E;
  text-align: center;
  margin-top: 0;
  margin-bottom: 4rem; /* espace sous le sous-titre */
  line-height: 2rem !important; /* hauteur de ligne réduite pour compacter le texte */
}


/* Supprime les marges/paddings par défaut du contenu principal du dashboard */
body.wp-admin #wpbody-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.dashboard-page #wpcontent {
  overflow: hidden;
  height: 100vh;
}

body.dashboard-page #adminmenuwrap {
  overflow-y: auto;
  max-height: 100vh;
}

/* 🧼 Réinitialise l'affichage des sous-menus */
body.dashboard-page #adminmenu .wp-submenu {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
  background-color: #23282d !important;
  color: #fff !important;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* 🧠 Affiche uniquement au survol */
body.dashboard-page #adminmenu li:hover .wp-submenu {
  display: block !important;
  visibility: visible;
  opacity: 1;
  position: absolute;
  left: 160px; /* largeur du menu principal */
  top: 0;
  z-index: 99999;
  background: #f1f1f1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}


/* Conteneur principal des cartes du staff */
.dashboard-staff-wrapper {
  display: flex; 
  justify-content: center; 
  flex-wrap: wrap;
  gap: 40px;
  padding: 40px 20px;
  width: 1200px;
  margin: 0 auto; 
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
  position: sticky;
}

/* Carte individuelle du staff */
.staff-card {
  position: relative;
  height: 300px;
  width: 200px;
  flex: 1 1 0; 
  overflow: hidden; 
}

/* Image de fond dans chaque carte */
.staff-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* conserve les proportions de l'image */
  z-index: 1;
  border-radius: inherit;
  clip-path: inset(0 round 12px); /* coins arrondis internes */
}

/* Bloc texte superposé sur l'image */
.staff-card-content {
  position: relative;
  z-index: 2; /* au-dessus de l'image */
  padding: 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* aligne le texte en bas */
  transform: translateY(-1rem); /* léger décalage vers le haut */
}

/* Style général des paragraphes dans les cartes */
.staff-card-content p {
  font-size: 1rem;
  font-family: 'Bowlby One', sans-serif;
  color: white;
  margin: 0;
}

/* Mise en valeur du prénom */
.staff-card-content .firstname {
  font-size: 1.5rem !important;
}

/* Style du poste occupé */
.staff-card-content .job {
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* Étend le conteneur principal du dashboard à 100% */
#dashboard-widgets-wrap {
  display: block !important;
  max-width: none !important;
  width: 100% !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Étend la zone de widgets WordPress */
#dashboard-widgets .meta-box-sortables {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

/* Étend ton widget personnalisé */
#dashboard_staff_contacts {
  width: 100% !important;
  max-width: 100% !important;
}


#dashboard_staff_contacts.postbox {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}


#dashboard_staff_contacts h2,
#dashboard_staff_contacts .handlediv,
#dashboard_staff_contacts .hndle,
#dashboard_staff_contacts .postbox-header,
#dashboard_staff_contacts .toggle-indicator {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Supprime le padding interne du widget */
#dashboard_staff_contacts .inside {
  padding: 0 !important;
}

/* Masque les autres widgets du dashboard sauf le premier */
#dashboard-widgets .meta-box-sortables:not(:first-child) {
  display: none !important;
}

/* Étend la colonne contenant ton widget */
#dashboard-widgets .postbox-container {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  clear: both !important;
}


#screen-options-link-wrap,
#contextual-help-link-wrap {
  display: none !important;
}


/* Bouton ON/OFF */
/* Container principal du toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 40px;
    cursor: pointer;
}

/* Cache la checkbox par défaut */
.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Style du slider/fond */
.toggle-switch .slider-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 20px;
    transition: background-color 0.3s ease;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-weight: bold;
    font-size: 12px;
    color: white;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

/* Style du bouton circulaire */
.toggle-switch .slider-text:before {
    content: "";
    position: absolute;
    height: 32px;
    width: 32px;
    left: 4px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* État ON - fond vert */
.toggle-switch input:checked + .slider-text {
    background-color: #7cb342;
    border-color: #689f38;
}

/* État ON - position du bouton circulaire */
.toggle-switch input:checked + .slider-text:before {
    transform: translateX(40px);
}

/* Style des labels ON et OFF */
.toggle-switch .label-on,
.toggle-switch .label-off {
    z-index: 1;
    position: relative;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Label ON - visible quand activé */
.toggle-switch .label-on {
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toggle-switch input:checked + .slider-text .label-on {
    opacity: 1;
}

/* Label OFF - visible quand désactivé */
.toggle-switch .label-off {
    color: white;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.toggle-switch input:checked + .slider-text .label-off {
    opacity: 0;
}

/* Effet hover */
.toggle-switch:hover .slider-text {
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

/* Focus pour l'accessibilité */
.toggle-switch input:focus + .slider-text {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}


/* ⚠️ Alerte maintenance affichée dans l'admin */
.maintenance-alert {
  background-color: #fff8e5;
  border-left: 4px solid #ffba00;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-size: 14px;
  padding: 10px 15px;
}


/* 🧭 Bouton flottant pour afficher/masquer les notifications */
.admin-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #0073aa;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.admin-toggle-btn:hover {
  background-color: #005a8c;
}


/* 🖥️ Mise en page de la page "en cours de construction" */
.main {
  height: 100vh;
  width: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-align: center;
}


/* 🧰 Formulaire de configuration dans l'admin */
.dashboard-form {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: sans-serif;
}


/* 📦 Bloc de section dans le formulaire */
.dashboard-section {
  background: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 6px;
}

.dashboard-section h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  text-align: center;
  color: #333;
}


/* 📝 Champs de saisie et textarea */
.dashboard-input,
.dashboard-textarea {
  width: 100%;
  max-width: 700px;
  margin: 10px auto;
}

.dashboard-buttons {
  display: flex;
  flex-direction: row;
  gap: 30px;
  @media (width < 768px) {
    flex-direction: column;
  }
}


