/* ----- MENU ----- */
.menu{
    z-index: 100;
    position: fixed;
    text-align: end;
    top: 0%;
    right: 0%;
    width: 100%;
    padding-top: 1%;
    padding-bottom: 1%;
    padding-right: 4%;
    background-color: #00787E;
}

.logo-header{
    width: 5%;
    position: absolute; 
    left: 75px;         
    top: 10px;   
}


.menu-portable { display: none; }

a{
    text-decoration: none;
    color: black;
    font-size: 23px;
    margin-right: 30px;
    margin-top: 5px;
    font-family: "Dancing Script", cursive;
    font-optical-sizing: auto;
    font-weight: <weight>;
    font-style: normal;
}

.menu-ordi {
    transition: transform 0.3s ease-in-out;
    display: inline-block;
}

.menu-ordi:hover { transform: scale(1.3); }


/* ----- SIDENAV ----- */
.sidenav {
    height: 100%;
    width: 250px;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: -250px;
    background-color: #00787E;
    padding-top: 70px;
    transition: right 0.5s ease;
}
.sidenav.active { right: 0; }
.sidenav ul { list-style: none; padding: 0; margin: 0; }
.sidenav a {
    padding: 8px 0;
    font-size: 25px;
    color: black;
    display: block;
    text-align: center;
}
.sidenav .close {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
}

/* ----- RESPONSIVE ----- */
@media screen and (max-width: 600px) {
    .menu-ordi { display: none; }
    .maison { display: none; }
    .menu-portable {
        display: inline-block;
        position: absolute;
        right: -10px;
        top: -0.5px;
    }
    .maison-portable {
        display: inline-block;
        height: 35px;
    }
    .logo-header{
        display: none;
    }
}

/* ----- TITRES ----- */
h1, h2, h3 {
    text-align: center;
    font-family: "Dancing Script", cursive;
}
h1.solfejeu { margin-top: 80px; font-size: 50px; }

/* ----- DASHBOARD STYLES ----- */
:root {
  --bg:#f8fafc; --card-bg:white; --text:#1f2937;
  --accent:#00787E; --accent-2:#facc15; --accent-3:#4ade80;
}
body.dark {
  --bg:#1e293b; --card-bg:#334155; --text:#f1f5f9;
  --accent:#00787E; --accent-2:#fde047; --accent-3:#22c55e;
}
body { margin:0; background:var(--bg); color:var(--text); transition:0.4s; }

/* CONTROLS */
.controls {
  display:flex;
  gap:1rem;
  margin:1.5rem;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  margin-top: 80px;
}
select, input[type="text"] {
  padding:0.5rem 1rem;
  border-radius:10px;
  border:1px solid #cbd5e1;
  background:var(--card-bg);
  color:var(--text);
  font-family: 'Montserrat';
}
.switch { display:flex; align-items:center; gap:0.5rem; cursor:pointer; font-family: 'Montserrat';}
.switch input { display:none; }
.switch span {
  padding:0.4rem 0.8rem;
  border-radius:8px;
  background:var(--card-bg);
}
.switch input:checked + span { background:#00787E; color:white; }

/* GRID & CARDS */
.grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(350px,1fr));
  gap:1.5rem;
  padding:1.5rem;
}
.card {
  background:var(--card-bg);
  border-radius:16px;
  padding:1rem;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
}
.card h3 { margin-bottom:1rem; }

/* NAV BUTTONS */
.nav-btn-container {
  display:flex;
  justify-content:center;
  gap:2rem;
  margin:1.5rem 0;
}
button.page-btn {
  padding:0.7rem 1.2rem;
  border-radius:10px;
  border:none;
  background:#00787E;
  color:white;
  cursor:pointer;
  font-size:0.95rem;
}


.theme-switch {
  position: relative;
  display: inline-block;
  top: 5px;
  width: 60px;
  height: 28px;
  margin-left: 10px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch .slider {
  position: relative;
  border-radius: 34px;
  cursor: pointer;
  height: 100%;
  transition: background-color 0.4s;
}

.theme-switch .slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: -25px; /* commence sur le soleil */
  top: 50%;
  transform: translateY(-50%);
  background-color: #00787E;
  border-radius: 50%;
  transition: 0.4s;
  z-index: 2;
}

/* Toggle activé (nuit) */
.theme-switch input:checked + .slider::before {
  transform: translateX(32px) translateY(-50%); /* déplace sur la lune */
}

.theme-switch input:checked + .slider {
  background-color: #334155; /* fond sombre */
}

/* Icônes soleil et lune */
.theme-switch .sun,
.theme-switch .moon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.theme-switch .sun {
  left: 7px; /* centrage exact du rond */
  color: #facc15;
}

.theme-switch .moon {
  right: 7px;
  color: #f1f5f9;
  opacity: 0;
}

/* Opacité selon état */
.theme-switch input:checked + .slider .sun { opacity: 0; }
.theme-switch input:checked + .slider .moon { opacity: 1; }
