/*
========================================
TALIBHUB - STYLES OPTIMISÉS
========================================
Structure:
- Variables CSS globales
- Base et Reset
- Dashboard
- Navigation (à venir)
- Welcome Page (à venir)
- Profile (à venir)
- Mosque Time (à venir)
- Apprentissage/Timer (à venir)
- Autres composants (à venir)
========================================
*/

/* ========================================
   VARIABLES CSS GLOBALES
======================================== */
:root {
  /* === COULEURS PRINCIPALES === */
  --primary-color: #274c77;
  --secondary-color: #6096ba;
  --tertiary-color: #a3cef1;
  --background-color: #e7ecef;
  --text-color: #274c77;
  --card-background: #ffffff;
  --border-color: #a3cef1;
  --gray-color: #8b8c89;

  /* === COULEURS SUPPLÉMENTAIRES === */
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;

  /* === DÉGRADÉS === */
  --gradient-primary: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  --gradient-secondary: linear-gradient(135deg, #6096ba 0%, #274c77 100%);

  /* === TYPOGRAPHIE === */
  --main-font: "Poppins", sans-serif;
  --h1-size: 2rem;
  --h2-size: 1.5rem;
  --h3-size: 1.25rem;
  --text-size: 1rem;
  --small-text-size: 0.875rem;
  --title-line-height: 1.4;
  --text-line-height: 1.2;

  /* === BREAKPOINTS === */
  --breakpoint-xs: 480px;
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1245px;

  /* === ESPACEMENTS === */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;

  /* === LAYOUT === */
  --sidebar-width: 400px; /* Beaucoup plus large comme sur les screenshots */
  --topnav-height: 60px;

  /* === OMBRES === */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 12px rgba(0, 0, 0, 0.15);

  /* === TRANSITIONS === */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* === BORDURES === */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
}

/* ========================================
   BASE ET RESET
======================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--main-font);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: var(--text-line-height);
  height: 100vh;
  margin: 0;
  overflow: hidden;
  transition: background-color var(--transition-normal),
    color var(--transition-normal);
}

.page {
  display: none;
  opacity: 0;
  transition: opacity var(--transition-slow);
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 5rem;
}

/* Exception pour la welcome page qui a son propre système de footer */
.page#welcomepage {
  padding-bottom: 0;
}

.page-no-welcome {
  margin-top: 1rem; /* Plus de topnav, donc plus de marge */
}

.page.active {
  display: block;
  opacity: 1;
}

/* ========================================
   DASHBOARD
======================================== */

/* === Layout Principal === */
.dashboard-main-content {
  margin-left: var(--sidebar-width);
  padding: var(--spacing-xl);
  min-height: 100vh;
  background-color: var(--background-color);
  position: relative;
}

/* === Header Dashboard === */
.dashboard-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.dashboard-header h1 {
  margin: 0 !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  color: #274c77 !important;
  text-align: center !important;
  font-family: var(--main-font) !important;
}

/* === Style standard pour tous les titres h1 des pages === */

.page h1 {
  text-align: center !important;
  font-size: var(--h1-size) !important;
  font-family: var(--main-font) !important;
  color: var(--primary-color) !important;
  margin-bottom: var(--spacing-md);
  font-weight: 600 !important;
}

/* Exclusion du dashboard qui a son propre header moderne */
.dashboard-main-content h1:not(.dashboard-header h1) {
  text-align: center !important;
  font-size: var(--h1-size) !important;
  font-family: var(--main-font) !important;
  color: var(--primary-color) !important;
  margin-bottom: var(--spacing-md);
  font-weight: 600 !important;
}

/* === Boutons TopNav intégrés dans le Dashboard === */
.dashboard-topnav-buttons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  z-index: 10;
}

/* === Messaging Button intégré === */
.dashboard-messaging-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  position: relative;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-md);
  transition: background-color var(--transition-fast);
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  color: var(--text-color);
  font-family: var(--main-font);
}

.dashboard-messaging-link:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.dashboard-messaging-link:hover .messaging-icon {
  color: var(--card-background);
}

.dashboard-messaging-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: var(--text-color);
  transition: color var(--transition-fast);
}

/* === Message Counter intégré === */
.dashboard-messaging-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--error-color);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
  box-shadow: var(--shadow-sm);
}

/* === Profile Section intégrée === */
.dashboard-profile-section {
  position: relative;
}

.dashboard-profile-button {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  border-radius: var(--border-radius-md);
  color: var(--text-color);
  font-family: var(--main-font);
  font-size: var(--text-size);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.dashboard-profile-settings-icon {
  width: 20px;
  height: 20px;
  color: var(--text-color);
  transition: color var(--transition-fast);
}

.dashboard-profile-button:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--card-background);
}

.dashboard-profile-icon {
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
}

.dashboard-profile-section:hover .dashboard-profile-icon {
  transform: rotate(180deg);
}

/* === Profile Dropdown intégré === */
.dashboard-profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--transition-fast), visibility var(--transition-fast),
    transform var(--transition-fast);
}

.dashboard-profile-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* === Styles pour les éléments du dropdown === */
.dropdown-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color var(--transition-fast);
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: var(--background-color);
}

.dropdown-divider {
  border-top: 1px solid var(--border-color);
  margin: 0.5rem 0;
}

/* === Switch du thème === */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-color);
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* === Sélecteur de langue dans le dropdown === */
.dropdown-item .language-selector {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.dropdown-item .language-selector .lang-btn {
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 40px;
  min-height: 40px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dropdown-item .language-selector .lang-btn:hover {
  background-color: rgba(0, 123, 255, 0.1);
  transform: scale(1.05);
}

.dropdown-item .language-selector .lang-btn.active {
  background-color: rgba(0, 123, 255, 0.2);
  border: 2px solid #007bff;
}

/* === Contrôles Menu (pour mobile) === */
.dashboard-menu-btn {
  display: none;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  margin-bottom: var(--spacing-md);
}

/* === Grille des Cartes === */
.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin: 0;
}

/* === Cartes Dashboard === */
.dashboard-card {
  background-color: var(--card-background);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.dashboard-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 0;
}

.dashboard-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  line-height: var(--title-line-height);
}

/* ========================================
   DASHBOARD - RESPONSIVE
======================================== */

/* === Breakpoint XXL (1245px) === */
@media (max-width: 1245px) {
  .dashboard-card h2 {
    font-size: 1rem;
  }
}

/* === Breakpoint XL (1200px) === */
@media (max-width: 1200px) {
  .dashboard-main-content {
    padding: var(--spacing-lg);
    grid-template-columns: 1fr 300px;
  }
}

/* === Responsive des boutons intégrés === */
@media (max-width: 1024px) {
  .dashboard-topnav-buttons {
    gap: var(--spacing-md);
  }

  .dashboard-main-content {
    margin-left: 0;
    padding: var(--spacing-md);
  }

  .dashboard-header {
    margin-bottom: 20px;
    padding: 15px 0;
  }

  .dashboard-header h1 {
    font-size: 24px !important;
    color: #274c77 !important;
  }

  .page h1 {
    font-size: 1.375rem !important;
    font-family: var(--main-font) !important;
    text-align: center !important;
  }

  /* Exclusion du dashboard qui a son propre header moderne */
  .dashboard-main-content h1:not(.dashboard-header h1) {
    font-size: 1.375rem !important;
    font-family: var(--main-font) !important;
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  .dashboard-topnav-buttons {
    flex-direction: row; /* Garde les boutons sur la même ligne */
    gap: var(--spacing-sm);
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
  }

  .dashboard-messaging-link,
  .dashboard-profile-button {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--small-text-size);
  }

  .dashboard-profile-dropdown {
    right: 0;
    left: auto;
    min-width: 180px;
  }

  .dashboard-header {
    margin-bottom: 15px;
    padding: 10px 0;
  }

  .dashboard-header h1 {
    font-size: 22px !important;
    color: #274c77 !important;
  }
}

/* === Grille des Cartes === */
.dashboard-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.dashboard-card h2 {
  font-size: 1rem;
}

.dashboard-menu-btn {
  display: block;
}

/* Styles pour sidebar mobile (si nécessaire) */
.dashboard-sidebar {
  transform: translateX(-100%);
}

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

.dashboard-close-btn {
  display: block;
}

/* === Breakpoint MD (768px) === */
@media (max-width: 768px) {
  .dashboard-card h2 {
    font-size: 0.9rem;
  }

  .dashboard-card-grid {
    gap: var(--spacing-sm);
  }

  .dashboard-main-content {
    padding: var(--spacing-sm);
  }

  /* === MosqueTime Welcome Responsive LG === */
  .welcome-mosquetime-grid {
    grid-template-columns: 1fr;
  }

  .welcome-mosquetime-controls {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .welcomepage-mosque-time .mosquetime-location-search,
  .welcome-mosquetime-location-search {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    gap: 0.5rem;
    padding: 6px 0;
  }

  .welcomepage-mosque-time .prayer-item {
    padding: 0.65rem;
  }
}

/* === Breakpoint MD (768px) === */
@media (max-width: 768px) {
  .welcomepage-container {
    width: 95vw;
  }

  .mosquetime-sort-buttons {
    flex-direction: row; /* Boutons alignés horizontalement */
    justify-content: flex-start; /* Alignement à gauche */
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
  }

  .mosquetime-sort-buttons .mosquetime-button {
    flex: none; /* Les boutons gardent leur taille naturelle */
    padding: 0.5rem 1rem;
    font-size: var(--small-text-size);
    white-space: nowrap; /* Empêche le texte de se couper */
  }

  .mosquetime-card {
    width: 100%;
    padding: 0;
  }

  .welcomepage-mosque-time .mosque-name {
    font-size: 1rem;
    padding: var(--spacing-xs) var(--spacing-xs) 0 var(--spacing-xs);
    margin: 0 0 0 var(--spacing-xs);
  }

  .welcomepage-mosque-time .mosque-address {
    font-size: 0.8rem;
    margin: 0 0 var(--spacing-xs) var(--spacing-xs);
  }

  #welcome-mosquetime-grid {
    width: 100%;
    padding: 0;
  }

  #welcome-mosquetime-grid .mosquetime-mosque-card {
    width: 100%;
    padding: var(--spacing-sm);
    margin: var(--spacing-xs);
  }

  .mosquetime-location-search {
    padding: var(--spacing-sm) 0;
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .welcomepage-mosque-time .mosquetime-content {
    padding: 0;
  }

  .welcomepage-mosque-time .mosquetime-location-search {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .welcomepage-mosque-time .mosquetime-sort-buttons {
    flex-direction: row; /* Boutons alignés horizontalement */
    justify-content: flex-start; /* Alignement à gauche */
    gap: var(--spacing-sm);
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
  }

  .welcomepage-mosque-time .mosquetime-sort-buttons .mosquetime-button {
    flex: none; /* Les boutons gardent leur taille naturelle */
    padding: 0.5rem 1rem;
    font-size: var(--small-text-size);
    white-space: nowrap; /* Empêche le texte de se couper */
  }

  .mosque-prayer-times .prayer-times-grid {
    padding-top: var(--spacing-xs);
  }

  .welcomepage-mosque-time .mosque-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
  }

  .welcomepage-mosque-time .mosque-info {
    flex: 1;
  }

  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    grid-template-columns: repeat(5, 1fr);
    background: var(--card-background);
    border-radius: var(--border-radius);
    margin-bottom: 0;
  }
}

/* === Breakpoint XS (480px) === */
@media (max-width: 480px) {
  .dashboard-header {
    margin-bottom: 10px;
    padding: 8px 0;
  }

  .dashboard-header h1 {
    font-size: 20px !important;
    color: #274c77 !important;
  }

  .dashboard-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-sm);
  }

  .dashboard-card h2 {
    margin-top: -0.5rem;
    font-size: 0.7rem;
  }

  .dashboard-card {
    padding: var(--spacing-sm);
  }

  .dashboard-card img {
    width: 48px;
    height: 48px;
  }
}

/* ========================================
   NAVIGATION - TOP NAV & SIDEBAR
======================================== */

/* ========================================
   TOP NAV MASQUÉE - ÉLÉMENTS INTÉGRÉS AU DASHBOARD
======================================== */

.top-nav {
  display: none !important;
}

/* === TOP NAV SUPPRIMÉE POUR PAGES AUTHENTIFIÉES === */
/* La top-nav est maintenant complètement supprimée pour les pages authentifiées */
/* Seul le hamburger flottant reste pour la navigation mobile */

/* === Styles de la TopNav supprimés car masquée === */

/* ========================================
   SIDEBAR MODERNE (Style DataDrop Dashboard)
======================================== */

/* === Sidebar Layout === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--card-background);
  border-right: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 98;
  transform: translateX(0);
  transition: transform var(--transition-normal);
  overflow-y: auto;
}

/* === Header moderne sans couleur de fond === */
.sidebar-header {
  background-color: var(--card-background);
  color: var(--primary-color);
  padding: var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--spacing-xs);
  line-height: 1;
}

/* === Section Analytics === */
.sidebar-section {
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-section-title {
  font-size: var(--small-text-size);
  font-weight: 600;
  color: var(--gray-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 var(--spacing-md) var(--spacing-sm);
  margin: 0;
}

/* === Navigation List === */
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list a {
  display: flex;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--text-color);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-weight: 500;
  border-radius: 0;
  margin: 0 var(--spacing-sm);
  border-radius: var(--border-radius-md);
}

.nav-list a:hover {
  background-color: var(--background-color);
  color: var(--primary-color);
  transform: translateX(4px);
}

.nav-list a.active {
  background-color: var(--secondary-color);
  color: var(--card-background);
}

/* === Icons SVG pour les liens === */
.nav-list a::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: var(--spacing-sm);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.nav-list a[data-destination="dashboard"]::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5v6h8V5" /></svg>');
}

.nav-list a[data-destination="todoLists"]::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4" /></svg>');
}

.nav-list a[data-destination="apprentissage"]::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>');
}

.nav-list a[data-destination="statistics"]::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2m0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" /></svg>');
}

.nav-list a[data-destination="salatSurahSelector"]::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" /></svg>');
}

.nav-list a[data-destination="duaTimeCalculator"]::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z" /></svg>');
}

.nav-list a[data-destination="surahmemorization"]::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg>');
}

.nav-list a[data-destination="mosquetime"]::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" /></svg>');
}

/* === Subnav === */
.subnav {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: transparent;
}

.subnav a {
  padding-left: calc(var(--spacing-lg) * 2);
  font-size: var(--small-text-size);
  font-weight: 400;
  color: var(--gray-color);
}

.subnav a::before {
  content: "•";
  margin-right: var(--spacing-sm);
}

/* === Sidebar Overlay === */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 97;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal),
    visibility var(--transition-normal);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* === Nav List Divider === */
.nav-list-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: var(--spacing-sm) 0;
}

/* ========================================
   NAVIGATION - RESPONSIVE
======================================== */

/* === Breakpoint SM (640px) === */
@media (max-width: 640px) {
  .app-branding h1 {
    font-size: 1.125rem;
  }

  .profile-button {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--small-text-size);
  }
}

/* === ENCOCHE HAMBURGER (TAB STYLE) === */
.hamburger-btn {
  display: none; /* Contrôlé par JavaScript */
  position: fixed; /* Force la position même avec styles inline */
  top: 1px;
  left: -6px; /* Position par défaut légèrement cachée */
  width: 2rem;
  height: 5rem;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: none;
  border-radius: 0 15px 15px 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
  user-select: none;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 0 15px rgba(39, 76, 119, 0.4);
  writing-mode: vertical-lr;
  text-orientation: mixed;
}

/* Quand affiché par JavaScript, forcer flex */
.hamburger-btn[style*="display: block"] {
  display: flex !important;
}

.hamburger-btn:hover {
  left: 0px !important; /* Devient entièrement visible au survol */
  box-shadow: 4px 0 20px rgba(39, 76, 119, 0.5);
  background: linear-gradient(135deg, #6096ba 0%, #274c77 100%);
  transform: scale(1.02);
}

/* Petit indicateur visuel sur l'encoche */
.hamburger-btn::before {
  content: "";
  position: absolute;
  right: 2.5px;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5px;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Masquer le hamburger quand la sidebar est ouverte */
.sidebar.active ~ .hamburger-btn,
body.menu-open .hamburger-btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* === Breakpoint LG (1024px) === */
@media (max-width: 1024px) {
  .top-nav {
    display: none !important;
  }

  /* Le hamburger est maintenant contrôlé entièrement par JavaScript */
  /* Plus de styles CSS fixes nécessaires */

  .sidebar {
    width: 280px; /* Largeur fixe plus raisonnable */
    max-width: 85vw; /* Ne pas dépasser 85% de l'écran */
    transform: translateX(-100%);
  }

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

  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    color: #ef4444;
    font-size: 1.2rem;
    transition: all 0.2s ease;
  }

  .sidebar-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: scale(1.05);
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* ========================================
   WELCOME PAGE
======================================== */

/* === Welcome Page Layout - Style Moderne DuaTimeCalculator === */
#welcomepage {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  min-height: 100vh;
  padding-top: 70px; /* Espace pour la vraie top nav fixe */
  color: #274c77;
  display: flex;
  flex-direction: column;
}

/* === MASQUER SIDEBAR SUR WELCOMEPAGE - FIX pour éviter l'apparition temporaire === */
/* Masquer la sidebar par défaut au chargement pour éviter l'affichage temporaire */
.sidebar {
  display: none;
}

/* Afficher la sidebar uniquement quand elle est nécessaire (pages authentifiées) */
body.authenticated .sidebar {
  display: block;
}

/* Masquer explicitement la sidebar sur welcomepage */
body.on-welcomepage .sidebar {
  display: none !important;
}

/* Masquer immédiatement la sidebar lors du logout pour éviter le délai */
body.logging-out .sidebar {
  display: none !important;
  transition: none !important;
}

.welcomepage-container {
  flex: 1 0 auto; /* flex-grow: 1, flex-shrink: 0, flex-basis: auto */
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

/* === Welcome Header - Vraie Top Navigation === */
.welcomepage-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  height: 70px;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  box-shadow: 0 2px 15px rgba(39, 76, 119, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  margin: 0;
  border-radius: 0;
}

.welcomepage-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 2;
  color: white !important;
}

/* === Language Selector dans Header === */
.welcomepage-header .language-selector {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.welcomepage-header .language-selector .lang-btn {
  font-size: 1.2em;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  backdrop-filter: blur(5px);
  color: white;
  position: relative;
  z-index: 2;
}

.welcomepage-header .language-selector .lang-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

.welcomepage-header .language-selector .lang-btn:focus {
  outline: none;
}

/* === Hero Section === */
.welcomepage-hero {
  text-align: center;
  margin-bottom: 10rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.welcomepage-hero h2 {
  color: var(--primary-color);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.welcomepage-hero p {
  color: var(--secondary-color);
  font-size: 2rem;
  margin-bottom: var(--spacing-lg);
  line-height: var(--title-line-height);
}

.welcomepage-btn {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  width: auto;
  margin: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

.welcomepage-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.welcomepage-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 76, 119, 0.3);
}

.welcomepage-btn:hover::before {
  left: 100%;
}

.welcomepage-btn:active {
  transform: translateY(0);
}

.welcomepage-btn-primary {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  width: 100%;
  margin: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

.welcomepage-btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.welcomepage-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 76, 119, 0.3);
}

.welcomepage-btn-primary:hover::before {
  left: 100%;
}

.welcomepage-btn-primary:active {
  transform: translateY(0);
}

/* === Auth Forms === */
.welcomepage-auth-forms {
  margin-bottom: var(--spacing-xxl);
  max-width: 800px;
  margin: 0 auto var(--spacing-xxl) auto;
}

.welcomepage-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  transition: all 0.3s ease;
  position: relative;
  padding: var(--spacing-xl);
}

.welcomepage-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #274c77, #6096ba);
}

.welcomepage-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(39, 76, 119, 0.15);
}

/* === Tabs System === */
.welcomepage-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--spacing-lg);
}

.welcomepage-tab-btn {
  flex: 1;
  padding: var(--spacing-md);
  border: none;
  background: none;
  cursor: pointer;
  font-size: var(--text-size);
  color: var(--text-color);
  font-family: var(--main-font);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.welcomepage-tab-btn.active {
  border-bottom: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
}

.welcomepage-tab-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--background-color);
}

.welcomepage-tab-content {
  display: none;
}

.welcomepage-tab-content.active {
  display: block;
}

/* === Form Layout === */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.welcomepage-form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.welcomepage-form-group label {
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--text-color);
}

.welcomepage-form-group input,
.welcomepage-form-group select {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  border: 2px solid rgba(39, 76, 119, 0.2);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  box-sizing: border-box;
  color: #274c77;
}

.welcomepage-form-group input:focus,
.welcomepage-form-group select:focus {
  outline: none;
  border-color: #274c77;
  background: white;
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.1);
}

/* === Email Validation === */
#welcomepage-email:valid,
#welcomepage-confirmEmail:valid {
  border-color: var(--success-color);
}

#welcomepage-email:invalid,
#welcomepage-confirmEmail:invalid {
  border-color: var(--error-color);
}

/* === Country List Dropdown === */
#country-list,
#oauth-country-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  background-color: var(--card-background);
  display: none;
  z-index: 1000;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-md);
}

.country-item {
  padding: var(--spacing-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.country-item:hover {
  background-color: var(--background-color);
}

/* === OAuth Country Field Optionnel === */
#oauth-country {
  color: var(--gray-color);
}

#oauth-country::placeholder {
  color: var(--gray-color);
  font-style: italic;
}

.welcomepage-form-group:has(#oauth-country) label {
  color: var(--gray-color);
  font-style: italic;
}

/* === Terms Checkbox === */
.terms-group {
  grid-column: 1 / -1;
  margin: var(--spacing-md) 0;
  padding: var(--spacing-md);
  background-color: var(--card-background);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
}

.terms-checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
}

.terms-checkbox-container input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius-sm);
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--card-background);
  transition: all var(--transition-fast);
}

.terms-checkbox-container input[type="checkbox"]:checked {
  background-color: var(--primary-color);
  position: relative;
}

.terms-checkbox-container input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  color: var(--card-background);
  font-size: 14px;
  left: 4px;
  top: 0px;
}

.terms-checkbox-container label {
  font-size: 0.95rem;
  color: var(--text-color);
  cursor: pointer;
  user-select: none;
}

.terms-link {
  color: #000;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bolder;
  transition: all var(--transition-fast);
}

.terms-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* === Signup Button State === */
#welcomepage-signupForm button[type="submit"] {
  opacity: 0.5;
  cursor: not-allowed;
  transition: all var(--transition-normal);
}

#welcomepage-signupForm button[type="submit"].enabled {
  opacity: 1;
  cursor: pointer;
}

/* === Captcha Styles === */
.captcha-group {
  grid-column: 1 / -1;
}

.turnstile-container {
  display: flex;
  justify-content: center;
  margin: var(--spacing-md) 0;
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background-color: var(--background-color);
}

.captcha-info {
  text-align: center;
  margin-top: var(--spacing-sm);
  font-size: var(--small-text-size);
  color: var(--gray-color);
}

.captcha-info a {
  color: var(--secondary-color);
  text-decoration: none;
}

.captcha-info a:hover {
  text-decoration: underline;
}

/* === Content Sections - Centrées === */
.welcomepage-features,
.welcomepage-vision,
.welcomepage-why-choose,
.welcomepage-commitment {
  margin-bottom: 6rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.welcomepage-features h2,
.welcomepage-why-choose h2 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-xl);
  text-align: center;
  font-weight: 700;
}

.welcomepage-vision h2,
.welcomepage-commitment h2 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

/* === Content Paragraphs === */
.welcomepage-hero p,
.welcomepage-features p,
.welcomepage-vision p,
.welcomepage-why-choose p,
.welcomepage-commitment p {
  color: #274c77;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.welcomepage-vision p,
.welcomepage-commitment p,
.welcomepage-commitment li {
  color: #274c77;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

/* === Feature Grids === */
.welcomepage-features-grid,
.welcomepage-why-choose-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  max-width: 100%;
}

/* === Modern Feature Cards with Glassmorphism === */
.welcomepage-feature-card,
.welcomepage-why-choose-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: 300px;
  max-width: 300px;
}

.welcomepage-feature-card:hover,
.welcomepage-why-choose-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(39, 76, 119, 0.15);
}

/* === Feature Cards Borders === */
.welcomepage-feature-card::before,
.welcomepage-why-choose-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #274c77, #6096ba);
}

.welcomepage-feature-card h3,
.welcomepage-why-choose-card h3 {
  color: #274c77;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.welcomepage-feature-card p,
.welcomepage-why-choose-card p {
  color: #274c77;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  position: relative;
  z-index: 2;
}

/* === Commitment List Styling === */
.welcomepage-commitment ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.welcomepage-commitment li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.welcomepage-commitment li:before {
  content: "✓";
  color: #274c77;
  font-weight: bold;
  font-size: 1.1rem;
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(39, 76, 119, 0.1);
  border-radius: 50%;
  border: 2px solid rgba(39, 76, 119, 0.2);
}

/* === Footer - Positionné naturellement en fin de page === */
.welcomepage-footer {
  width: 100%;
  text-align: center;
  padding: 2rem 0;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border-radius: 0;
  box-shadow: 0 -2px 10px rgba(39, 76, 119, 0.3);
  margin-top: auto;
  flex-shrink: 0;
}

/* === Utility Classes === */
.hidden {
  display: none;
}

/* === Signup Closed Message === */
.signup-closed-message {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
  box-shadow: 0 4px 20px rgba(39, 76, 119, 0.1);
}

.signup-closed-message h3 {
  color: #274c77;
  margin-bottom: 1rem;
  font-weight: 600;
}

.signup-closed-message p {
  color: #274c77;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

/* OAuth buttons hover effects */
.welcomepage-card .oauth-google:hover {
  background: #ff6600;
}

.welcomepage-card .oauth-microsoft:hover {
  background: #0078d4;
  color: white;
}

/* ========================================
   WELCOME PAGE - MOSQUETIME INTEGRATION - MODERN DESIGN
======================================== */

/* Styles pour MosqueTime sur la page d'accueil avec design moderne */
.welcomepage-mosque-time {
  padding: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: none;
  margin: 0 auto 2rem auto;
}

/* === MosqueTime Header simplifié === */
.welcomepage-mosque-time .mosquetime-header {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.3);
  position: relative;
  overflow: hidden;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.welcomepage-mosque-time .mosquetime-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff !important;
  position: relative;
  z-index: 2;
}

/* Émoji retiré pour un design plus épuré */

.welcomepage-mosque-time .mosquetime-subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

/* === MosqueTime Content Container moderne === */
.welcomepage-mosque-time .mosquetime-content {
  padding: 1.5rem;
}

/* === Location Search moderne === */
/* Styles spécifiques pour les éléments welcome-mosquetime */
#welcome-mosquetime-city,
#welcome-mosquetime-search {
  height: 48px; /* Hauteur uniforme */
  box-sizing: border-box;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

/* Container spécifique pour les contrôles de recherche */
.welcomepage-mosque-time .mosquetime-location-search {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Select city - 2/3 de la largeur */
#welcome-mosquetime-city {
  flex: 2;
  width: 100%;
  padding: 0.8rem;
  border: 2px solid rgba(39, 76, 119, 0.2);
  background: rgba(255, 255, 255, 0.8);
  margin-bottom: 0px;
}

#welcome-mosquetime-city:focus {
  outline: none;
  border-color: #274c77;
  background: white;
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.1);
}

/* Search button - 1/3 de la largeur */
#welcome-mosquetime-search {
  flex: 1;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

#welcome-mosquetime-search::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

#welcome-mosquetime-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 76, 119, 0.3);
}

#welcome-mosquetime-search:hover::before {
  left: 100%;
}

#welcome-mosquetime-search:active {
  transform: translateY(0);
}

.welcomepage-mosque-time .mosquetime-select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid rgba(39, 76, 119, 0.2);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.welcomepage-mosque-time .mosquetime-select:focus {
  outline: none;
  border-color: #274c77;
  background: white;
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.1);
}

.welcomepage-mosque-time .mosquetime-button {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

.welcomepage-mosque-time .mosquetime-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.welcomepage-mosque-time .mosquetime-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 76, 119, 0.3);
}

.welcomepage-mosque-time .mosquetime-button:hover::before {
  left: 100%;
}

.welcomepage-mosque-time .mosquetime-button:active {
  transform: translateY(0);
}

/* === Date Display moderne === */
.welcomepage-mosque-time .mosquetime-date-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
}

/* === Tabs modernes === */
.welcomepage-mosque-time .mosquetime-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.75rem;
  padding: 0.5rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
}

.welcomepage-mosque-time .mosquetime-tab {
  flex: 1;
  text-align: center;
  padding: 0.8rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #274c77;
}

.welcomepage-mosque-time .mosquetime-tab.active {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
}

/* === Sort Buttons modernes === */
.mosquetime-sort-buttons,
.welcomepage-mosque-time .mosquetime-sort-buttons {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
}

.mosquetime-sort-buttons .mosquetime-button,
.welcomepage-mosque-time .mosquetime-sort-buttons .mosquetime-button {
  background: rgba(255, 255, 255, 0.8);
  color: #274c77;
  border: 2px solid rgba(39, 76, 119, 0.2);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.1);
  position: relative;
  overflow: hidden;
}

.mosquetime-sort-buttons .mosquetime-button:hover,
.welcomepage-mosque-time .mosquetime-sort-buttons .mosquetime-button:hover {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border-color: #274c77;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.3);
}

.mosquetime-sort-buttons .mosquetime-button.active,
.welcomepage-mosque-time .mosquetime-sort-buttons .mosquetime-button.active {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border-color: #274c77;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
}

.welcome-mosquetime-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.welcome-mosquetime-header {
  margin-bottom: 2rem;
}

.welcome-mosquetime-title {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.welcome-mosquetime-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.welcome-mosquetime-location-search {
  display: flex;
  gap: 1rem;
  flex: 1;
}

.welcome-mosquetime-btn {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.welcome-mosquetime-btn:hover {
  background: var(--secondary-color);
}

.welcome-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  background: var(--primary-color);
  color: var(--card-background);
  cursor: pointer;
}

.welcome-btn:hover {
  background: var(--secondary-color);
}

.welcome-mosquetime-select {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: white;
}

.welcome-mosquetime-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.welcome-mosquetime-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.welcome-mosquetime-tab.active {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

.welcome-mosquetime-content {
  background: var(--card-background);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
}

.welcome-mosquetime-card {
  background: var(--card-background);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: var(--shadow-light);
}

/* Grille des mosquées */
.welcome-mosquetime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* Styles pour les cartes de mosquées */
.welcome-mosquetime-mosque-card {
  background: var(--card-background);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.welcome-mosquetime-prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.welcome-mosquetime-prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  background: var(--background-color);
  border-radius: 4px;
}

.prayer-time {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
}

.prayer-times-grid {
  padding: 10px 0;
}

.welcomepage-mosque-time .prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.2rem;
  margin-top: 3px;
  text-align: center;
  border-radius: 6px;
  min-width: 0;
  flex: 1;
}

/* Disposition verticale forcée pour la page de bienvenue */
.welcomepage-mosque-time .prayer-item .prayer-label,
.welcomepage-mosque-time .prayer-item .jamaa-time {
  display: block;
  width: 100%;
}

.welcomepage-mosque-time .mosquetime-mosque-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  transition: all 0.3s ease;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.welcomepage-mosque-time .mosquetime-mosque-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(39, 76, 119, 0.15);
}

.welcomepage-mosque-time .mosquetime-mosque-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #274c77, #6096ba, #8bb8d6);
  border-radius: 1rem 1rem 0 0;
  opacity: 0.8;
}

/* === Container Scrollable pour les mosquées === */
.welcomepage-mosque-time .scrollable-content {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 5px;
}

.welcomepage-mosque-time .mosquetime-mosque-card {
  max-height: 400px;
  overflow-y: auto;
  background-color: var(--card-background);
  border-radius: 8px;
  padding: 20px;
  margin-top: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.welcomepage-mosque-time .mosquetime-tab-content {
  max-height: 600px;
  overflow-y: auto;
}

#welcome-mosquetime-grid {
  max-height: 500px;
  overflow-y: auto;
}

.welcomepage-mosque-time .mosque-list-container {
  max-height: 500px;
  overflow-y: auto;
}

.welcomepage-mosque-time .mosque-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.welcomepage-mosque-time .mosque-info {
  flex: 1;
}

.welcomepage-mosque-time .mosque-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.welcomepage-mosque-time .mosque-address {
  font-size: 0.875rem;
  color: var(--gray-color);
  margin: 0;
}

#welcome-mosquetime-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1rem;
}

.welcomepage-mosque-time .mosquetime-card {
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.welcomepage-mosque-time .mosquetime-content {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.mosquetime-card .mosquetime-content {
  padding: 20px;
}

.mosque-prayer-times {
  border-top: 1px solid var(--secondary-color);
  margin-top: 1rem;
}

/* === Disclaimer centré === */
.welcomepage-mosque-time .mosquetime-disclaimer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-color);
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm);
}

.welcomepage-mosque-time .prayer-times-grid,
.welcomepage-mosque-time .additional-times-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.2rem;
  padding: 8px 4px;
  margin: 0;
  background: var(--card-background);
  border-radius: 8px;
  width: 100%;
}

/* === Styles Prayer Label et Jamaa Time === */
.prayer-label {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 4px;
  font-weight: 500;
  order: 1;
  display: block;
}

.jamaa-time {
  font-size: 16px;
  color: var(--primary-color);
  font-weight: bold;
  order: 2;
  margin-top: 2px;
  display: block;
}

.additional-times-grid,
.welcomepage-mosque-time .additional-times-grid {
  position: relative;
  opacity: 0.6;
  background-color: #f5f5f5;
  border-radius: 6px;
}

/* Ligne horizontale qui traverse la section */
.additional-times-grid::before,
.welcomepage-mosque-time .additional-times-grid::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #9e9e9e;
  z-index: 1;
}

/* Texte "Coming soon" superposé au centre */
.additional-times-grid::after,
.welcomepage-mosque-time .additional-times-grid::after {
  content: "Coming soon";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f5f5f5;
  padding: 0 10px;
  font-size: 0.8rem;
  color: #666;
  z-index: 2;
}

/* Ajustement pour les éléments à l'intérieur de la grille désactivée */
.additional-times-grid .prayer-item,
.welcomepage-mosque-time .additional-times-grid .prayer-item {
  position: relative;
  z-index: 0;
}

/* Version française du texte si la langue est en français */
html[lang="fr"] .additional-times-grid::after,
html[lang="fr"] .welcomepage-mosque-time .additional-times-grid::after {
  content: "Bientôt disponible";
}

/* ========================================
   WELCOME PAGE - RESPONSIVE
======================================== */

/* === Breakpoint XL (1200px) === */
@media (max-width: 1200px) {
  .welcomepage-auth-forms {
    max-width: 85vw;
  }

  #welcomepage-features {
    margin-left: auto;
  }

  .welcomepage-features p,
  .welcomepage-vision p,
  .welcomepage-why-choose p,
  .welcomepage-commitment p {
    text-align: left;
  }

  /* === MosqueTime Welcome Responsive XL === */
  .mosquetime-card,
  .welcomepage-mosque-time .mosquetime-card {
    width: 100%;
    margin: 0 0 var(--spacing-md) 0;
    padding: var(--spacing-md);
  }

  .prayer-times-grid,
  .additional-times-grid,
  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    gap: 0.75rem;
    padding: 8px 0;
  }
}

/* === Breakpoint LG (1024px) === */
@media (max-width: 1024px) {
  .form-grid {
    flex-direction: column;
  }

  .welcomepage-hero h2 {
    font-size: 2rem;
  }

  .welcomepage-features h2,
  .welcomepage-vision h2,
  .welcomepage-why-choose h2,
  .welcomepage-commitment h2 {
    font-size: 1.75rem;
    text-align: center;
  }

  .welcomepage-features p,
  .welcomepage-vision p,
  .welcomepage-why-choose p,
  .welcomepage-commitment p {
    text-align: center;
  }

  .welcomepage-features,
  .welcomepage-vision,
  .welcomepage-why-choose,
  .welcomepage-commitment {
    margin-bottom: 6rem;
  }
}

/* === Breakpoint XS (480px) === */
@media (max-width: 480px) {
  #welcomepage {
    padding-top: 60px; /* Header plus petit sur mobile */
    padding-bottom: 60px; /* Footer plus petit sur mobile */
  }

  .welcomepage-container {
    padding: 1rem;
  }

  .welcomepage-header {
    height: 60px;
    padding: 0 1rem;
    flex-direction: row; /* Garder en ligne pour aligner drapeaux avec logo */
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .welcomepage-header h1 {
    font-size: 1.4rem;
    color: white !important;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center; /* Centre verticalement le titre */
    height: 100%; /* Prend toute la hauteur disponible */
  }

  .welcomepage-header .language-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
  }

  .welcomepage-header .language-selector .lang-btn {
    font-size: 2rem;
    padding: 2px;
  }

  .welcomepage-hero h2 {
    font-size: 1.5rem;
  }

  .welcomepage-hero p {
    font-size: 1.25rem;
  }

  .welcomepage-btn {
    font-size: 1.25rem;
    padding: var(--spacing-sm) var(--spacing-md);
    margin-top: var(--spacing-sm); /* Réduit la marge de 1.5rem à 0.5rem */
  }

  .welcomepage-auth-forms {
    max-width: 95vw;
    /* Amélioration de l'alignement pour formulaires */
    justify-content: flex-start;
    align-items: stretch;
  }

  .welcomepage-card {
    padding: var(--spacing-md);
    /* Éviter le centrage constant du contenu */
    text-align: left;
  }

  /* Correction pour la grille des formulaires en mobile */
  .form-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    /* Supprime l'alignement au centre forcé */
    align-items: stretch;
  }

  /* Amélioration des champs de formulaire */
  .welcomepage-form-group {
    width: 100%;
    /* Alignement naturel à gauche */
    text-align: left;
  }

  .welcomepage-form-group input,
  .welcomepage-form-group select {
    width: 100%;
    text-align: left;
    /* Éviter l'alignement centré des placeholders */
  }

  /* Amélioration des tabs */
  .welcomepage-tabs {
    margin-bottom: var(--spacing-md);
  }

  .welcomepage-tab-content {
    text-align: left;
  }

  /* Note: Les effets hover pour les boutons OAuth (Google, Microsoft) 
     sont définis dans Front-End/assets/styles/oauth.css */

  .welcomepage-feature-card,
  .welcomepage-why-choose-card {
    margin: 0 var(--spacing-md);
    padding: var(--spacing-md);
  }

  .welcomepage-features h2,
  .welcomepage-vision h2,
  .welcomepage-why-choose h2,
  .welcomepage-commitment h2 {
    font-size: 1.5rem;
  }

  .welcomepage-features p,
  .welcomepage-vision p,
  .welcomepage-why-choose p,
  .welcomepage-commitment p {
    font-size: 1.125rem;
  }

  .welcomepage-feature-card h3,
  .welcomepage-why-choose-card h3 {
    font-size: 1.125rem;
  }

  .welcomepage-feature-card p,
  .welcomepage-why-choose-card p {
    font-size: 1rem;
  }

  .welcomepage-features,
  .welcomepage-vision,
  .welcomepage-why-choose,
  .welcomepage-commitment {
    margin-bottom: var(--spacing-xxl);
  }

  /* Réduction de l'espace entre hero et mosquetime */
  .welcomepage-hero {
    margin: 1.5rem 0 3rem 0;
  }

  .welcomepage-footer {
    padding: var(--spacing-md);
    font-size: var(--small-text-size);
  }

  /* Animation pulse pour mobile - SEULEMENT pour le bouton */
  @keyframes pulse {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.5); /* Grossissement x1.5 */
    }
    100% {
      transform: scale(1);
    }
  }

  .welcomepage-btn {
    animation: pulse 3s ease-in-out infinite;
  }

  /* === MosqueTime Welcome Responsive XS === */
  .welcomepage-mosque-time .mosquetime-location-search,
  .welcome-mosquetime-location-search {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  /* Responsive pour les contrôles de recherche mosquetime */
  .welcomepage-mosque-time .mosquetime-location-search {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  #welcome-mosquetime-city,
  #welcome-mosquetime-search {
    flex: none;
    width: 100%;
  }

  .mosquetime-sort-buttons,
  .welcomepage-mosque-time .mosquetime-sort-buttons {
    flex-direction: row; /* Boutons alignés horizontalement */
    justify-content: flex-start; /* Alignement à gauche */
    gap: var(--spacing-xs);
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
  }

  .mosquetime-sort-buttons .mosquetime-button {
    flex: none; /* Les boutons gardent leur taille naturelle */
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--small-text-size);
    white-space: nowrap; /* Empêche le texte de se couper */
  }

  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    gap: 0.3rem;
    padding: 5px 0;
  }

  /* === MosqueTime Mobile Ultra-Compact === */
  .welcomepage-mosque-time {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .welcomepage-mosque-time .mosquetime-content {
    padding: 0;
  }

  .welcomepage-mosque-time .mosquetime-mosque-card {
    width: 100%;
    padding: 3px;
    margin: 0;
  }

  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    gap: 8px;
    padding: 5px 0;
  }

  .welcomepage-mosque-time .prayer-item {
    padding: 0.1rem;
  }

  .prayer-label {
    font-size: 0.7rem;
    display: block !important;
    order: 1 !important;
  }

  .jamaa-time {
    font-size: 0.8rem;
    display: block !important;
    order: 2 !important;
  }

  .welcomepage-mosque-time .mosquetime-title {
    font-size: 1.25rem;
    text-align: center;
  }

  .welcomepage-mosque-time .mosquetime-subtitle {
    font-size: 0.75rem;
  }

  .mosque-prayer-times {
    margin-top: 0.25rem;
  }

  #welcome-mosquetime-grid {
    width: 100%;
    padding: 0;
  }

  .welcomepage-mosque-time .mosque-name {
    font-size: 1rem;
    padding: var(--spacing-xs) var(--spacing-xs) 0 var(--spacing-xs);
    margin: 0 0 0 var(--spacing-xs);
  }

  .welcomepage-mosque-time .mosque-address {
    font-size: 0.8rem;
    margin: 0 0 var(--spacing-xs) var(--spacing-xs);
  }

  #welcome-mosquetime-city-date {
    font-size: 1.25rem;
  }

  #welcome-mosquetime-grid {
    width: 100%;
    padding: 0;
  }

  #welcome-mosquetime-grid .mosquetime-mosque-card {
    width: 100%;
    padding: var(--spacing-sm);
    margin: var(--spacing-xs);
  }

  .welcomepage-mosque-time .mosquetime-content {
    padding: 0;
  }

  .mosque-prayer-times {
    padding-top: var(--spacing-xs);
  }
}

/* ========================================
   APPRENTISSAGE/TIMER SECTION
======================================== */

/* === Layout principal TalibTimer === */
#talibtimer {
  margin-left: 260px;
}

/* ========================================
   SECTION APPRENTISSAGE - DESIGN MODERNE
======================================== */

#apprentissage {
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  min-height: 100vh;
  padding: 0;
  font-family: Arial, sans-serif;
  color: #274c77;
  display: flex;
  flex-direction: column;
}

/* Header avec dégradé moderne */
.apprentissage-header {
  text-align: center;
  margin-bottom: 15px;
  padding: 8px 0;
}

.apprentissage-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #274c77;
}

/* Conteneur principal avec flexbox */
.apprentissage-main-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  flex: 1;
}

/* Section Task Selection (en haut, pleine largeur) */
.apprentissage-top-section {
  width: 100%;
}

/* Section 2x2 pour les autres containers */
.apprentissage-grid-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

/* Timer Cards avec glassmorphism */
.timer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(96, 150, 186, 0.2);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  transition: all 0.3s ease;
}

.timer:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(39, 76, 119, 0.2);
}

.timer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timer:hover::before {
  opacity: 1;
}

/* Timer dans la section top (Task Selection) */
.apprentissage-top-section .timer {
  width: 100%;
  max-width: none;
  position: relative;
}

/* Timer dans la section grid 2x2 - Harmonisation complète */
.apprentissage-grid-section .timer {
  width: 100%;
  min-width: 0; /* Évite les débordements */
  max-width: 100%;
  position: relative;
  flex: none; /* Retire le flexbox pour utiliser grid */
}

.timer h2 {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  padding: 0.8rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.timer h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s ease;
}

.timer:hover h2::before {
  left: 100%;
}

/* Timer Content */
.timer-content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 180px;
  justify-content: space-between;
}

/* Alignement spécifique pour timer et stopwatch */
.time_displayed,
.time-control-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin: 0.8rem 0;
}

/* Task Selection moderne */
#task-select {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
  border: 2px solid rgba(96, 150, 186, 0.3);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  color: #274c77;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

#task-select:focus {
  border-color: #6096ba;
  box-shadow: 0 0 0 3px rgba(96, 150, 186, 0.1);
  outline: none;
}

#session-info {
  margin: 0.8rem 0;
  text-align: center;
  width: 100%;
}

#session-info p {
  margin: 0.4rem 0;
  color: #274c77;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Temps affichés avec style moderne */
.time_displayed {
  font-size: 2rem;
  font-weight: 800;
  color: #274c77;
  margin: 0.8rem 0;
  text-align: center;
  text-shadow: 0 2px 4px rgba(39, 76, 119, 0.1);
}

/* Groupement des boutons modernes */
.button-group {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}

/* Style moderne pour tous les boutons */
.button-group button {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(96, 150, 186, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem;
  position: relative;
  overflow: hidden;
}

.button-group button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  transition: left 0.3s ease;
  z-index: 1;
}

.button-group button:hover::before {
  left: 0;
}

.button-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(39, 76, 119, 0.2);
  border-color: #6096ba;
}

.button-group button:hover img {
  filter: brightness(0) invert(1);
  transform: scale(1.1);
  z-index: 2;
  position: relative;
}

.button-group button img {
  height: 28px;
  width: auto;
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
}

/* Boutons du compteur */
.button-group .counter-button {
  min-width: 70px;
  padding: 0.6rem 1.2rem;
  font-weight: 700;
  color: #274c77;
  font-size: 0.9rem;
}

/* Supprimer les effets de focus et active uniquement sur les boutons counter */
.button-group .counter-button:focus {
  outline: none;
  border-color: rgba(96, 150, 186, 0.3);
  box-shadow: none;
}

.button-group .counter-button:active {
  outline: none;
  border-color: rgba(96, 150, 186, 0.3);
  box-shadow: none;
  transform: none;
}

/* Boutons de sauvegarde */
#save-button-session {
  background: linear-gradient(135deg, #6096ba 0%, #274c77 100%);
  border-color: #6096ba;
}

#save-button-session img {
  filter: brightness(0) invert(1);
}

/* Manual Time moderne */
#manual-time-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0 0.2rem 0;
  width: 100%;
  flex-wrap: wrap;
}

#manual-time-container div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#manual-time-container label {
  margin-bottom: 0.6rem;
  color: #274c77;
  font-weight: 600;
  font-size: 0.95rem;
}

#manual-time-container input {
  width: 90px;
  padding: 0.75rem;
  border: 2px solid rgba(96, 150, 186, 0.3);
  border-radius: 0.75rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  color: #274c77;
  transition: all 0.3s ease;
}

#manual-time-container input:focus {
  border-color: #6096ba;
  box-shadow: 0 0 0 3px rgba(96, 150, 186, 0.1);
  outline: none;
}

.total-time {
  margin: 0;
  color: #274c77;
  font-weight: 700;
  text-align: center;
  font-size: 1.1rem;
}

/* Counter moderne */
#counter-value {
  font-size: 2.5rem;
  color: #274c77;
  margin: 0;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 4px rgba(39, 76, 119, 0.1);
}

/* Timer Settings moderne */
.timer-settings {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  padding: 1rem;
  background: linear-gradient(135deg, #6096ba 0%, #274c77 100%);
  border-radius: 1rem;
  color: white;
}

.timer-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timer-input-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timer-input {
  width: 80px;
  padding: 0.75rem;
  border: 2px solid rgba(96, 150, 186, 0.3);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  color: #274c77;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.timer-input:focus {
  outline: none;
  border-color: #6096ba;
  box-shadow: 0 0 0 3px rgba(96, 150, 186, 0.1);
}

.timer-input-suffix {
  color: #274c77;
  font-size: 1rem;
  font-weight: 500;
}

/* Animation pour le header */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(180deg);
  }
}

/* ========================================
   APPRENTISSAGE RESPONSIVE DESIGN
======================================== */

/* ========================================
   APPRENTISSAGE RESPONSIVE DESIGN MODERNE
======================================== */

/* Desktop avec sidebar */
@media (min-width: 1245px) {
  #apprentissage {
    margin-left: var(--sidebar-width);
  }

  .apprentissage-header h1 {
    font-size: 2.8rem;
  }

  .apprentissage-main-container {
    padding: 2.5rem;
    gap: 2rem;
  }

  .apprentissage-grid-section {
    gap: 2rem;
  }
}

@media (min-width: 1024px) and (max-width: 1244px) {
  #apprentissage {
    margin-left: var(--sidebar-width);
  }

  .apprentissage-header h1 {
    font-size: 2.5rem;
  }

  .apprentissage-main-container {
    padding: 2rem;
  }

  .apprentissage-grid-section {
    gap: 1.5rem;
  }
}

/* Tablette et petits écrans sans sidebar */
@media (max-width: 1023px) {
  #apprentissage {
    margin-left: 0;
    width: 100%;
  }

  .apprentissage-header {
    padding: 1.5rem;
  }

  .apprentissage-header h1 {
    font-size: 2.2rem;
  }

  .apprentissage-main-container {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .apprentissage-grid-section {
    gap: 1.2rem;
  }

  .timer h2 {
    font-size: 1.1rem;
    padding: 1rem;
  }

  .timer-content {
    padding: 1.5rem;
    min-height: 220px;
  }
}

/* Tablette */
@media (max-width: 768px) {
  .apprentissage-header {
    padding: 1rem;
  }

  .apprentissage-header h1 {
    font-size: 1.8rem;
  }

  .apprentissage-main-container {
    padding: 1rem;
    gap: 1rem;
  }

  .apprentissage-grid-section {
    gap: 0.8rem;
  }

  .timer h2 {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .timer-content {
    padding: 0.8rem;
    min-height: 160px;
  }

  .time_displayed {
    font-size: 1.6rem;
    margin: 0.6rem 0;
  }

  #counter-value {
    font-size: 1.6rem;
  }

  .time-control-wrapper {
    min-height: 2.5rem;
    margin: 0.6rem 0;
  }

  .button-group {
    gap: 0.5rem;
    margin: 0.8rem 0;
  }

  .button-group button {
    width: 38px;
    height: 38px;
  }

  .button-group button img {
    height: 20px;
  }

  .button-group .counter-button {
    min-width: 55px;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  #task-select {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  #session-info p {
    font-size: 0.85rem;
  }

  #manual-time-container {
    gap: 0.8rem;
  }

  #manual-time-container input {
    width: 60px;
    padding: 0.4rem;
    font-size: 0.8rem;
  }

  #manual-time-container label {
    font-size: 0.75rem;
  }

  .timer-input {
    width: 60px;
    padding: 0.4rem;
    font-size: 0.8rem;
  }

  /* Timer digits responsive */
  .time-digit {
    font-size: 1.4rem !important;
    height: 1.6rem !important;
    line-height: 1.6rem !important;
  }

  .time-separator {
    font-size: 1.4rem !important;
    line-height: 1.6rem !important;
  }

  .time-separator-second {
    font-size: 1.2rem !important;
    line-height: 1.4rem !important;
  }

  .time-digit-second {
    font-size: 1.2rem !important;
    height: 1.4rem !important;
    line-height: 1.4rem !important;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .apprentissage-header {
    padding: 0.8rem;
  }

  .apprentissage-header h1 {
    font-size: 1.6rem;
  }

  .apprentissage-main-container {
    padding: 0.8rem;
    gap: 0.8rem;
  }

  .apprentissage-grid-section {
    gap: 0.6rem;
  }

  .timer h2 {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .timer-content {
    padding: 0.7rem;
    min-height: 150px;
  }

  .time_displayed {
    font-size: 1.4rem;
    margin: 0.5rem 0;
  }

  #counter-value {
    font-size: 1.4rem;
  }

  .time-control-wrapper {
    min-height: 2.2rem;
    margin: 0.5rem 0;
  }

  .button-group {
    gap: 0.4rem;
    margin: 0.6rem 0;
  }

  .button-group button {
    width: 36px;
    height: 36px;
  }

  .button-group button img {
    height: 18px;
  }

  .button-group .counter-button {
    min-width: 50px;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  #task-select {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  #session-info p {
    font-size: 0.8rem;
  }

  #manual-time-container {
    gap: 0.6rem;
  }

  #manual-time-container input {
    width: 55px;
    padding: 0.3rem;
    font-size: 0.75rem;
  }

  #manual-time-container label {
    font-size: 0.7rem;
  }

  .timer-input {
    width: 55px;
    padding: 0.3rem;
    font-size: 0.75rem;
    border-radius: 0.4rem;
  }

  /* Timer digits responsive */
  .time-digit {
    font-size: 1.2rem !important;
    height: 1.4rem !important;
    line-height: 1.4rem !important;
  }

  .time-separator {
    font-size: 1.2rem !important;
    line-height: 1.4rem !important;
  }

  .time-separator-second {
    font-size: 1rem !important;
    line-height: 1.2rem !important;
  }

  .time-digit-second {
    font-size: 1rem !important;
    height: 1.2rem !important;
    line-height: 1.2rem !important;
  }
}

/* === Breakpoint XS (480px) - Maintien de la grille 2x2 === */
@media (max-width: 480px) {
  #apprentissage {
    padding: 0.4rem;
  }

  .apprentissage-header {
    padding: 0.6rem;
    margin-bottom: 0.2rem;
  }

  .apprentissage-header h1 {
    font-size: 1.2rem;
  }

  .apprentissage-main-container {
    padding: 0.4rem;
    gap: 0.4rem;
  }

  .apprentissage-grid-section {
    gap: 0.4rem;
    /* Maintient la grille 2x2 même sur très petits écrans */
    grid-template-columns: 1fr 1fr;
  }

  .timer {
    margin-bottom: 0;
  }

  .timer h2 {
    padding: 0.25rem;
    font-size: 0.75rem;
  }

  .timer-content {
    padding: 0.4rem !important;
    min-height: 0px !important;
  }

  .time_displayed {
    font-size: 1.5rem !important;
    margin-top: 1.5rem !important;
    min-height: 1.2rem !important;
  }

  #counter-value {
    font-size: 1.5rem !important;
  }

  .time-control-wrapper {
    min-height: 1.8rem !important;
    margin: 0 !important;
  }

  .button-group {
    gap: 0.2rem !important;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0.4rem 0;
  }

  .button-group button {
    width: 24px;
    height: 24px;
  }

  .button-group button img {
    height: 12px;
  }

  .button-group .counter-button {
    min-width: 36px !important;
    padding: 0.2rem 0.3rem;
    font-size: 0.65rem;
  }

  #task-select {
    padding: 0.4rem;
    font-size: 0.75rem;
    border-radius: 0.4rem;
  }

  #session-info p {
    font-size: 0.7rem;
    margin: 0.15rem 0;
  }

  #manual-time-container {
    gap: 0.3rem !important;
    justify-content: center;
    flex-wrap: nowrap;
    display: flex;
    flex-direction: row;
    margin: 0px !important;
  }

  #manual-time-container div {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 55px;
    max-width: 70px;
    flex: 0 0 auto;
  }

  #manual-time-container input {
    width: 100%;
    max-width: 55px;
    padding: 0.25rem;
    font-size: 0.7rem;
    border-radius: 0.3rem;
  }

  #manual-time-container label {
    font-size: 0.65rem;
    margin-bottom: 0.1rem;
  }

  .total-time {
    font-size: 0.7rem;
  }

  /* === Styles responsives pour le timer défilant === */
  .time-digit {
    font-size: 1.5rem !important;
    height: 1.2rem !important;
    line-height: 1.2rem !important;
  }

  .time-separator {
    font-size: 1rem !important;
    line-height: 1.2rem !important;
  }

  .time-separator-second {
    font-size: 0.9rem !important;
    line-height: 1.1rem !important;
  }

  .time-digit-second {
    font-size: 0.9rem !important;
    height: 1.1rem !important;
    line-height: 1.1rem !important;
  }

  .time-arrow {
    font-size: 0.9rem;
  }

  .digit-control {
    gap: 0.15rem;
    flex-direction: column;
    align-items: center;
    min-width: 0px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .apprentissage-header {
    padding: 1rem;
  }

  .apprentissage-header h1 {
    font-size: 1.8rem;
  }

  .apprentissage-main-container {
    padding: 1rem;
    gap: 1rem;
  }

  .apprentissage-grid-section {
    gap: 1rem;
  }

  .timer h2 {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .timer-content {
    padding: 0.8rem;
    min-height: 160px;
  }

  .time_displayed {
    font-size: 1.6rem;
    margin: 0.6rem 0;
  }

  #counter-value {
    font-size: 1.6rem;
  }

  .time-control-wrapper {
    min-height: 2.5rem;
    margin: 0.6rem 0;
  }

  .button-group {
    gap: 0.5rem;
    margin: 0.8rem 0;
  }

  .button-group button {
    width: 38px;
    height: 38px;
  }

  .button-group button img {
    height: 20px;
  }

  .button-group .counter-button {
    min-width: 55px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  #task-select {
    padding: 0.6rem;
    font-size: 0.85rem;
  }

  #session-info p {
    font-size: 0.8rem;
  }

  #manual-time-container {
    gap: 1rem;
  }

  #manual-time-container input {
    width: 65px;
    padding: 0.4rem;
    font-size: 0.85rem;
  }

  #manual-time-container label {
    font-size: 0.8rem;
  }

  .timer-input {
    width: 70px;
    padding: 0.5rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
  }

  /* Timer digits responsive */
  .time-digit {
    font-size: 1.7rem;
    height: 2rem;
    line-height: 2rem;
  }

  .time-separator {
    font-size: 1.7rem;
    line-height: 2rem;
  }

  .time-separator-second {
    font-size: 1.4rem;
    line-height: 1.7remt;
  }

  .time-digit-second {
    font-size: 1.4rem;
    height: 1.7rem;
    line-height: 1.7rem;
  }
}

/* Contenu des graphiques modernisé */
.chart-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
  overflow: hidden;
}

.chart-wrapper {
  height: 300px;
  transition: all 0.3s ease;
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.75rem;
  padding: 1rem;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(39, 76, 119, 0.1);
  flex-shrink: 0;
}

.chart-section.details-visible .chart-wrapper {
  height: 200px;
}

/* Section de détails modernisée */
.task-details-section {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  margin-top: 1rem;
}

.chart-section.details-visible .task-details-section {
  height: 200px;
  opacity: 1;
  padding: 1.5rem;
}

.task-details-section.expanded {
  max-height: 200px;
  border: 1px solid rgba(39, 76, 119, 0.1);
}

/* Tableau modernisé */
.task-details-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(39, 76, 119, 0.1);
}

.task-details-table th,
.task-details-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(39, 76, 119, 0.1);
}

.task-details-table th {
  font-weight: 600;
  color: #274c77;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-size: 0.9rem;
}

.task-details-table td {
  color: #495057;
  font-size: 0.85rem;
}

/* Bouton de basculement modernisé */
.toggle-details-btn {
  width: 100%;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 0.75rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.3s ease;
  font-weight: 500;
  color: #274c77;
}

.toggle-details-btn:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.15);
}

.toggle-details-btn svg {
  transition: transform 0.3s ease;
  width: 20px;
  height: 20px;
}

.chart-section.details-visible .toggle-details-btn svg {
  transform: rotate(180deg);
}

/* Tooltip Chart.js modernisé */
.chartjs-tooltip {
  background: rgba(39, 76, 119, 0.95) !important;
  border-radius: 0.75rem !important;
  color: white !important;
  padding: 8px 12px !important;
  font-size: 0.9rem !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* États de chargement modernisés */
.chart-wrapper.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.9);
}

.chart-wrapper.loading::after {
  content: "⏳ Chargement des données...";
  color: #274c77;
  font-size: 1rem;
  font-weight: 500;
}

/* Bouton de suppression de l'historique modernisé */
.delete-history-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto 1rem;
  padding: 1rem 0;
  text-align: center;
}

@media (min-width: 1024px) {
  .delete-history-container {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}

.delete-history-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.delete-history-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.delete-history-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.delete-history-btn:hover::before {
  left: 100%;
}

.delete-history-btn:active {
  transform: translateY(0) scale(1);
}

.delete-history-btn svg {
  width: 24px;
  height: 24px;
  z-index: 2;
  position: relative;
}

/* Responsive Design Modernisé */
@media (max-width: 1400px) {
  .statistics-container {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.25rem;
  }

  .chart-wrapper {
    height: 280px;
  }
}

@media (max-width: 1024px) {
  #statistics {
    margin-left: 0;
    padding: 1.5rem;
  }

  .statistics-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .delete-history-container {
    margin: 1.5rem auto 0.5rem;
  }
}

@media (max-width: 768px) {
  #statistics {
    padding: 1rem;
  }

  .statistics-header {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
  }

  .statistics-header h1 {
    font-size: 1.6rem;
  }

  .statistics-container {
    gap: 1rem;
  }

  .chart-section {
    min-height: 450px;
    max-height: 600px;
  }

  .chart-wrapper {
    height: 250px;
    padding: 0.75rem;
  }

  .stats-header {
    padding: 0.75rem 1rem;
    min-height: 50px;
  }

  .title-area h2 {
    font-size: 1.05rem;
  }

  .period-navigation {
    gap: 0.5rem;
    padding: 0.4rem;
  }

  .period-display {
    min-width: 90px;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }

  .nav-btn {
    width: 28px;
    height: 28px;
  }

  .nav-btn svg {
    width: 14px;
    height: 14px;
  }

  .delete-history-btn {
    width: 50px;
    height: 50px;
  }

  .delete-history-btn svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  #statistics {
    padding: 0.75rem;
  }

  .statistics-header {
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
  }

  .statistics-header h1 {
    font-size: 1.4rem;
  }

  .statistics-header h1::before {
    content: "📊";
    margin-right: 0.3rem;
  }

  .statistics-header p {
    font-size: 1rem;
    margin: 0.3rem 0 0;
  }

  .statistics-container {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .chart-section {
    min-height: 350px;
    border-radius: 0.75rem;
  }

  .chart-section::before {
    height: 3px;
  }

  .stats-header {
    padding: 0.75rem 1rem;
  }

  .title-area h2 {
    font-size: 1rem;
  }

  .chart-content {
    padding: 1rem;
  }

  .chart-wrapper {
    height: 200px;
    padding: 0.5rem;
    border-radius: 0.5rem;
  }

  .chart-section.details-visible .chart-wrapper {
    height: 150px;
  }

  .task-details-section {
    border-radius: 0.5rem;
  }

  .chart-section.details-visible .task-details-section {
    height: 150px;
    padding: 1rem;
  }

  .task-details-table th,
  .task-details-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .toggle-details-btn {
    padding: 0.6rem;
    border-radius: 0.5rem;
    gap: 0.5rem;
    font-size: 0.9rem;
  }

  .toggle-details-btn svg {
    width: 18px;
    height: 18px;
  }

  .stats-header {
    padding: 0.75rem 1rem;
    min-height: 45px;
  }

  .title-area {
    flex: 1;
    min-width: 0;
  }

  .title-area h2 {
    font-size: 0.95rem;
  }

  .period-navigation {
    gap: 0.4rem;
    padding: 0.3rem;
  }

  .period-display {
    min-width: 80px;
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.4rem;
  }

  .nav-btn {
    width: 24px;
    height: 24px;
    border-radius: 0.3rem;
  }

  .nav-btn svg {
    width: 12px;
    height: 12px;
  }

  .delete-history-container {
    margin: 1rem auto 0.5rem;
    padding: 0.75rem 0;
  }

  .delete-history-btn {
    width: 45px;
    height: 45px;
    border-radius: 0.75rem;
  }

  .delete-history-btn svg {
    width: 18px;
    height: 18px;
  }

  .delete-history-btn:hover {
    transform: translateY(-1px) scale(1.03);
  }
}

/* === Responsive Adjustments === */
@media (max-width: 1200px) {
  .statistics-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .chart-wrapper {
    min-height: 250px;
  }
}

@media (max-width: 1024px) {
  .page#statistics {
    margin-left: 0;
  }

  .delete-history-container {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .statistics-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .page#statistics {
    padding: 1rem;
  }

  .chart-wrapper {
    min-height: 300px;
  }

  .delete-history-container {
    margin: 1.5rem auto;
    padding: 0.75rem 0;
  }

  .delete-history-btn {
    width: 42px;
    height: 42px;
  }

  .delete-history-btn svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .welcomepage-container {
    width: 99vw;
    padding: 0.5rem;
  }

  .welcomepage-header {
    flex-direction: row; /* Garder en ligne pour aligner drapeaux avec logo */
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
  }

  .welcomepage-header h1 {
    color: var(--card-background) !important;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center; /* Centre verticalement le titre */
    height: 100%; /* Prend toute la hauteur disponible */
  }

  .welcomepage-header .language-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
  }

  .welcomepage-header .language-selector .lang-btn {
    font-size: 2rem;
    padding: 2px;
  }

  .welcomepage-hero h2 {
    font-size: 1.5rem;
  }

  .welcomepage-hero p {
    font-size: 1.25rem;
  }

  .welcomepage-btn {
    font-size: 1.25rem;
    padding: var(--spacing-sm) var(--spacing-md);
    margin-top: var(--spacing-sm); /* Réduit la marge de 1.5rem à 0.5rem */
  }

  .welcomepage-auth-forms {
    max-width: 95vw;
    /* Amélioration de l'alignement pour formulaires */
    justify-content: flex-start;
    align-items: stretch;
  }

  .welcomepage-card {
    padding: var(--spacing-md);
    /* Éviter le centrage constant du contenu */
    text-align: left;
  }

  /* Correction pour la grille des formulaires en mobile */
  .form-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    /* Supprime l'alignement au centre forcé */
    align-items: stretch;
  }

  /* Amélioration des champs de formulaire */
  .welcomepage-form-group {
    width: 100%;
    /* Alignement naturel à gauche */
    text-align: left;
  }

  .welcomepage-form-group input,
  .welcomepage-form-group select {
    width: 100%;
    text-align: left;
    /* Éviter l'alignement centré des placeholders */
  }

  /* Amélioration des tabs */
  .welcomepage-tabs {
    margin-bottom: var(--spacing-md);
  }

  .welcomepage-tab-content {
    text-align: left;
  }

  /* Note: Les effets hover pour les boutons OAuth (Google, Microsoft) 
     sont définis dans Front-End/assets/styles/oauth.css */
}

/* ========================================
   TODO LISTS SECTION
======================================== */

/* === SECTION TODO LISTS - DESIGN MODERNE INSPIRÉ DE SURAHMEMORIZATION === */

#todoLists {
  margin-left: 400px;
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  min-height: 100vh;
  padding: 20px;
}

/* Header moderne */
.todo-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.todo-header h1 {
  margin: 0 !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  color: #274c77 !important;
  text-align: center !important;
}

/* Container principal moderne */
#todo-app-container {
  max-width: 1000px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navigation moderne */
.todo-app-nav {
  position: sticky;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  padding: 15px;
  display: flex;
  justify-content: space-around;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
}

.todo-app-nav-button {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.25) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.todo-app-nav-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.todo-app-nav-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.todo-app-nav-button:hover::before {
  left: 100%;
}

/* Sections principales */
.todo-app-section {
  padding: 25px;
  background: rgba(255, 255, 255, 0.3);
  margin: 20px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.todo-title {
  color: #274c77;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  position: relative;
}

.todo-title::before {
  content: "📝";
  margin-right: 10px;
}

/* Card moderne */
.todo-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.todo-card-header {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  padding: 20px;
  color: white;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
}

.todo-card-title {
  color: white;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.todo-card-title::before {
  content: "";
  margin-right: 0;
}

.todo-card-content {
  padding: 25px;
}

/* Header avec actions */
.todo-card-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.tasks-counter {
  font-size: 14px;
  margin-left: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.todo-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Input group moderne */
.todo-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.todo-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-size: 14px;
}

.todo-input:focus {
  outline: none;
  border-color: #274c77;
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.todo-btn {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
}

.todo-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.todo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 76, 119, 0.4);
}

.todo-btn:hover::before {
  left: 100%;
}

/* Liste des tâches */
.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.todo-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(39, 76, 119, 0.1), transparent);
  transition: width 0.3s ease;
}

.todo-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.todo-item:hover::before {
  width: 100%;
}

/* Structure de la tâche - Alignement vertical parfait */
.task-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-height: 40px; /* Hauteur minimale pour alignement */
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px; /* Même hauteur que task-content */
}

.todo-item label.task-name {
  display: flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
  color: #274c77;
  line-height: 1.4;
  padding: 4px 0; /* Padding vertical pour meilleur alignement */
}

.todo-item.completed label.task-name {
  text-decoration: line-through;
  color: #8b8c89;
  opacity: 0.7;
}

.todo-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid #274c77;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  flex-shrink: 0; /* Empêche la réduction */
}

.todo-checkbox:checked {
  background: #274c77;
  border-color: #274c77;
}

.todo-delete-btn,
.todo-rename-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(39, 76, 119, 0.2);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0; /* Empêche la réduction */
}

.todo-delete-btn {
  color: #ff4444;
}

.todo-delete-btn:hover {
  background: rgba(255, 68, 68, 0.1);
  border-color: #ff4444;
  transform: scale(1.05);
}

.todo-rename-btn {
  color: #274c77;
  font-size: 14px;
}

.todo-rename-btn:hover {
  background: rgba(39, 76, 119, 0.1);
  border-color: #274c77;
  transform: scale(1.05);
}

/* Actions de sélection */
/* Container pour alignement horizontal des actions de sélection */
.todo-card .todo-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
}

.select-all-container {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  flex: 0 0 auto; /* Empêche l'étirement */
}

.select-all-container:hover {
  background: rgba(255, 255, 255, 0.2);
}

.select-all-label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap; /* Empêche la coupure du texte */
}

.todo-delete-selected-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff4444 0%, #ff6666 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
  flex: 0 0 auto; /* Empêche l'étirement */
  white-space: nowrap; /* Empêche la coupure du texte */
}

.todo-delete-selected-btn:not([disabled]):hover {
  background-color: #ff0000;
}

.todo-delete-selected-btn[disabled] {
  cursor: not-allowed;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
  #todoLists {
    margin-left: auto;
    margin-right: auto;
    width: 90vw;
  }

  .todo-card {
    max-width: 90vw;
  }
}

@media (min-width: 640px) {
  #todoLists {
    padding: 2rem;
  }

  h1 {
    font-size: var(--h1-size);
  }

  .todo-card-title {
    font-size: 1.5rem;
  }

  .todo-card-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  /* TodoLists Mobile - Design optimisé pour 480px */
  #todoLists {
    padding: 8px;
    background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
    min-height: 100vh;
    width: 97vw;
  }

  /* Header mobile */
  .todo-header {
    margin-bottom: 12px;
    padding: 12px 0;
  }

  .todo-header h1 {
    font-size: 20px;
    color: #274c77;
    margin-bottom: 8px;
  }

  /* Container mobile */
  #todo-app-container {
    padding: 12px;
    border-radius: 12px;
    margin: 0;
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  /* Navigation mobile */
  .todo-app-nav {
    padding: 8px;
    margin-bottom: 12px;
    border-radius: 8px;
  }

  .todo-app-nav-button {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
    margin-right: 6px;
  }

  /* Section mobile */
  .todo-app-section {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
  }

  /* Titre mobile */
  .todo-title {
    font-size: 16px;
    margin-bottom: 12px;
    padding: 8px 0;
  }

  .todo-title::before {
    font-size: 14px;
    margin-right: 6px;
  }

  /* Card mobile - Centrée */
  .todo-card {
    margin: 0 auto 12px auto; /* Centrage horizontal */
    border-radius: 8px;
    backdrop-filter: blur(10px);
    max-width: 100%; /* Assure que la carte ne dépasse pas */
    width: 100%; /* Prend toute la largeur disponible */
  }

  .todo-card-header {
    padding: 12px;
    border-radius: 8px 8px 0 0;
  }

  .todo-card-title {
    font-size: 16px;
    color: white;
    font-weight: 600;
  }

  .todo-card-title::before {
    font-size: 14px;
    margin-right: 6px;
  }

  .todo-card-content {
    padding: 12px;
  }

  /* Input et bouton mobile */
  .todo-input-group {
    gap: 8px;
    margin-bottom: 12px;
    flex-direction: column;
  }

  .todo-input {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 8px;
  }

  .todo-btn {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
    width: 100%;
  }

  /* Liste des tâches mobile */
  .todo-list {
    max-height: calc(100vh - 400px);
    overflow-y: auto;
  }

  .todo-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Structure de la tâche mobile - Alignement vertical parfait */
  .task-content {
    gap: 10px;
    align-items: center;
    display: flex;
    min-height: 36px; /* Hauteur réduite pour mobile */
  }

  .todo-item label.task-name {
    font-size: 14px;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 2px 0;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .todo-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
  }

  /* Actions des tâches mobile - émojis plus petits */
  .task-actions {
    gap: 6px;
    display: flex;
    align-items: center;
    min-height: 36px; /* Même hauteur que task-content */
  }

  .todo-delete-btn,
  .todo-rename-btn {
    padding: 4px;
    border-radius: 4px;
    font-size: 12px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Empêche la réduction */
  }

  /* Actions de sélection mobile - alignement horizontal maintenu */
  .todo-selection-actions {
    gap: 8px;
    margin-bottom: 12px;
    flex-direction: row; /* Force l'alignement horizontal même sur mobile */
    justify-content: space-between;
  }

  .select-all-container {
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    flex: 0 1 auto; /* Permet une légère flexibilité */
  }

  .select-all-label {
    font-size: 13px;
  }

  .todo-delete-selected-btn {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    flex: 0 1 auto; /* Permet une légère flexibilité */
  }

  /* Counter mobile */
  .tasks-counter {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
  }

  /* Header actions mobile - MAINTIENT L'ALIGNEMENT HORIZONTAL */
  .todo-card .todo-header-actions {
    gap: 8px !important;
    flex-direction: row !important; /* Force l'alignement horizontal même sur mobile */
    justify-content: space-between !important;
    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap !important; /* Empêche le retour à la ligne */
  }

  /* Forcer les éléments enfants à rester sur la même ligne */
  .todo-card .todo-header-actions .select-all-container,
  .todo-card .todo-header-actions .todo-delete-selected-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-width: auto !important;
  }

  .todo-card-header-content {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
}

/* ========================================
   6. MESSAGING SECTION
   ======================================== */

/* Main messaging page */
/* ===== MESSAGING SECTION - Style UI Moderne (comme duaTimeCalculator) ===== */
#messaging {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  min-height: 100vh;
  padding: 1rem;
  color: #274c77;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header avec Gradient et Emoji */
.messaging-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.3);
  position: relative;
  overflow: hidden;
}

.messaging-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

.messaging-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.messaging-header h1::before {
  content: "💬";
  font-size: 1.8rem;
}

.messaging-header p {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

/* Contenu principal avec grid optimisé */
.messaging-main-content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
}

.messaging-content-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  height: 100%;
  flex: 1;
}

/* Cartes avec Glassmorphism - Agrandies */
.messaging-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 650px;
}

.messaging-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(39, 76, 119, 0.15);
}

.messaging-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #274c77, #6096ba);
}

/* En-têtes des cartes avec titres d'emoji */
.messaging-card-header {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  padding: 1rem 1.5rem;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.messaging-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  position: relative;
}

/* Ajout d'emojis spécifiques pour chaque carte */
.messaging-card:nth-child(1) .messaging-card-title::before {
  content: "📨";
  font-size: 1.1rem;
}

.messaging-card:nth-child(2) .messaging-card-title::before {
  content: "📬";
  font-size: 1.1rem;
}

.messaging-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.messaging-action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 100px;
  height: 38px;
  font-size: 0.9rem;
  font-weight: 500;
  gap: 0.4rem;
}

/* Boutons d'action messaging avec icônes Feather */

/* Effet de brillance sur hover */
.messaging-action-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.messaging-action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.messaging-action-btn:hover::after {
  left: 100%;
}

/* Contenu des cartes optimisé */
.messaging-card-content {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
  height: 100%;
}

/* Liste des messages optimisée */
.messaging-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Messages individuels avec style moderne */
.message-item {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-left: 4px solid #274c77;
}

.message-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(39, 76, 119, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.message-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 76, 119, 0.15);
  border-color: #6096ba;
}

.message-item:hover::before {
  left: 100%;
}

.message-item.read {
  opacity: 0.7;
  background: rgba(248, 249, 250, 0.8);
}

.message-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.message-icon {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.message-text {
  flex: 1;
}

.message-title {
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: #274c77;
  font-size: 1rem;
}

.message-description {
  font-weight: 400;
  margin: 0 0 0.5rem 0;
  color: #495057;
  font-size: 0.9rem;
  line-height: 1.5;
}

.message-date {
  font-size: 0.8rem;
  color: #8b8c89;
  margin: 0;
  font-style: italic;
}

/* Actions des messages modernes */
.message-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.5rem;
  flex-wrap: nowrap;
}

.message-read-btn {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}

.message-read-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.message-read-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.3);
}

.message-read-btn:hover::before {
  left: 100%;
}

.message-delete-btn {
  background: linear-gradient(135deg, #ff4d4d 0%, #ff6b6b 100%);
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.message-delete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
}

/* Media Queries pour la gestion de la sidebar comme les autres sections */
@media (min-width: 1245px) {
  #messaging {
    padding: 1.5rem;
    max-width: calc(100vw - 250px);
    margin-left: var(--sidebar-width);
  }

  .messaging-main-content {
    max-width: 1400px;
  }

  .messaging-card {
    min-height: 700px;
  }
}

@media (min-width: 1024px) and (max-width: 1244px) {
  #messaging {
    padding: 1.2rem;
    max-width: calc(100vw - 220px);
  }

  .messaging-main-content {
    max-width: 1200px;
  }
}

/* Responsive design */
@media (max-width: 1024px) {
  #messaging {
    width: 95vw;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
  }

  .messaging-container {
    width: 90vw;
    max-width: 90vw;
  }

  .messaging-actions {
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }

  .messaging-action-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    min-width: 90px;
  }
}

@media (max-width: 640px) {
  #messaging {
    padding-left: 0;
    padding-bottom: calc(var(--spacing-xxl) + var(--spacing-md));
  }

  .messaging-title {
    font-size: var(--h1-size);
  }

  .messaging-card-title {
    font-size: 1.1rem;
    min-width: fit-content;
  }

  .messaging-container {
    width: 95vw;
    max-width: 95vw;
  }

  .messaging-card-header {
    flex-direction: row;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: nowrap;
    padding: 1rem 1.2rem;
  }

  .messaging-actions {
    flex: 1;
    justify-content: flex-end;
    gap: 0.5rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .messaging-card-content {
    width: 100%;
    padding: calc(var(--spacing-xs) / 2) 0;
  }

  .message-item {
    padding: var(--spacing-md) var(--spacing-sm);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    flex-direction: column;
    align-items: flex-start;
  }

  .message-content {
    width: 100%;
    margin-bottom: var(--spacing-sm);
  }

  .message-title {
    font-size: 0.9rem;
  }

  .message-content {
    font-size: 0.85rem;
  }

  .message-date {
    color: #6c757d;
    font-size: 0.75rem;
    margin: 0;
    opacity: 0.8;
  }

  .message-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .message-read-btn {
    font-size: 0.75rem;
    padding: calc(var(--spacing-xs) / 4) calc(var(--spacing-xs) / 2);
  }

  .messaging-count {
    width: 20px;
    height: 20px;
    font-size: 10px;
    top: -8px;
    right: -8px;
    line-height: 1;
    border: 1px solid var(--background-color);
  }
}

/* ========================================
   7. PROFILE SECTION (à ajouter ensuite)
   ======================================== */

/* =======================================
   CONTACT FORM SECTION
   ======================================= */

/* Base Layout */
/* ========================================
   CONTACT FORM SECTION
   ======================================== */

/* Base Layout */
#contactform {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  min-height: 100vh;
  padding: 2rem;
  color: #274c77;
}

/* Header with Gradient */
.contactform-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.3);
  position: relative;
  overflow: hidden;
}

.contactform-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

.contactform-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 2;
}

.contactform-header h1::before {
  content: "📧";
  margin-right: 0.5rem;
}

.contactform-header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
}

/* Layout Components */
.contactform-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.contactform-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(96, 150, 186, 0.2);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.contactform-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(39, 76, 119, 0.15);
}

.contactform-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #274c77, #6096ba);
}

.contactform-left-column {
  padding: 2rem;
  position: relative;
}

/* Contact Information Cards */
.contactform-info {
  margin-bottom: 2rem;
}

.contactform-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #274c77;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(96, 150, 186, 0.05);
  border-radius: 0.5rem;
  border-left: 4px solid #6096ba;
  transition: all 0.3s ease;
}

.contactform-info-item:hover {
  background: rgba(96, 150, 186, 0.1);
  transform: translateX(5px);
}

.contactform-info-item svg {
  color: #6096ba;
  min-width: 24px;
}

/* Social Buttons */
.contactform-social-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.contactform-social-button {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  border: none;
  border-radius: 0.75rem;
  padding: 1rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.contactform-social-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.contactform-social-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(39, 76, 119, 0.3);
}

.contactform-social-button:hover::before {
  left: 100%;
}

.contactform-social-button:active {
  transform: translateY(-1px);
}

/* Special Contact Form Styles */
.contactform-title {
  color: #274c77;
  font-size: 1.8rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.contactform-highlight {
  color: #6096ba;
  font-weight: bold;
}

/* =======================================
   CONTACT FORM RESPONSIVE
   ======================================= */

/* Desktop Responsive */
@media (min-width: 1245px) {
  #contactform {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  .contactform-wrapper {
    max-width: 700px;
  }

  .contactform-header h1 {
    font-size: 2.2rem;
  }

  .contactform-left-column {
    padding: 2.5rem;
  }
}

@media (min-width: 1024px) and (max-width: 1244px) {
  #contactform {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  .contactform-wrapper {
    max-width: 650px;
  }

  .contactform-header h1 {
    font-size: 2.1rem;
  }
}

/* Tablette et petits écrans */
@media (max-width: 1023px) {
  #contactform {
    margin-left: 0;
    width: 100%;
    padding: 1.5rem;
  }

  .contactform-wrapper {
    max-width: 550px;
  }

  .contactform-header {
    padding: 1.2rem 0;
  }

  .contactform-header h1 {
    font-size: 1.9rem;
  }

  .contactform-header::before {
    opacity: 0.2;
  }
}

/* Breakpoint: 768px */
@media (max-width: 768px) {
  #contactform {
    padding: 1.5rem 1rem;
  }

  .contactform-wrapper {
    max-width: 100%;
  }

  .contactform-header {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
  }

  .contactform-header h1 {
    font-size: 1.7rem;
  }

  .contactform-header p {
    font-size: 1rem;
  }

  .contactform-left-column {
    padding: 1.5rem;
  }

  .contactform-title {
    font-size: 1.6rem;
  }

  .contactform-info-item {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
  }

  .contactform-social-buttons {
    gap: 0.8rem;
  }

  .contactform-social-button {
    padding: 0.8rem;
    min-width: 45px;
  }
}

/* Breakpoint: 480px */
@media (max-width: 480px) {
  #contactform {
    padding: 1rem 0.5rem;
    min-height: calc(100vh - 1rem);
  }

  .contactform-wrapper {
    max-width: 100%;
  }

  .contactform-container {
    border-radius: 0.8rem;
  }

  .contactform-container::before {
    height: 3px;
  }

  .contactform-header {
    padding: 0.8rem 0;
    margin-bottom: 1rem;
    border-radius: 0.8rem 0.8rem 0 0;
  }

  .contactform-header h1 {
    font-size: 1.4rem;
  }

  .contactform-header h1::before {
    margin-right: 0.3rem;
  }

  .contactform-header p {
    font-size: 0.9rem;
    margin-top: 0.3rem;
  }

  .contactform-left-column {
    padding: 1rem;
  }

  .contactform-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .contactform-info {
    margin-bottom: 1.5rem;
  }

  .contactform-info-item {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    border-left-width: 3px;
  }

  .contactform-info-item:hover {
    transform: translateX(3px);
  }

  .contactform-info-item svg {
    min-width: 20px;
  }

  .contactform-social-buttons {
    gap: 0.6rem;
    margin-top: 1.5rem;
  }

  .contactform-social-button {
    min-width: 40px;
    min-height: 40px;
    padding: 0.6rem;
    border-radius: 0.6rem;
  }

  /* Désactiver les animations hover sur mobile */
  .contactform-container:hover {
    transform: none;
  }

  .contactform-social-button:hover {
    transform: none;
  }

  .contactform-info-item:hover {
    transform: none;
    background: rgba(96, 150, 186, 0.05);
  }
}

/* =======================================
   ABOUT US SECTION
   ======================================= */

/* Base Layout */
/* ========================================
   ABOUT US SECTION - DESIGN MODERNE
======================================== */

#aboutus {
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  color: #274c77;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
}

/* Header avec dégradé */
.aboutus-header {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  position: relative;
  overflow: hidden;
}

.aboutus-header::before {
  content: "ℹ️";
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  opacity: 0.9;
}

.aboutus-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aboutus-header p {
  margin: 0.5rem 0 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

.aboutus-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

/* Cards Layout - Style moderne avec glassmorphism */
.aboutus-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(163, 206, 241, 0.3);
  border-radius: 1rem;
  margin-bottom: 2rem;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.aboutus-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(39, 76, 119, 0.2);
}

.aboutus-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #274c77, #6096ba);
}

.aboutus-card-header {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  padding: 1.5rem;
  position: relative;
}

.aboutus-card-title {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aboutus-card-content {
  padding: 2rem 1.5rem;
  color: #274c77;
  line-height: 1.6;
}

.aboutus-card-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.aboutus-card-content p:last-child {
  margin-bottom: 0;
}

/* Grid System - Moderne */
.aboutus-grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
  width: 100%;
}

/* Listes stylisées */
.aboutus-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aboutus-list li {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  line-height: 1.5;
  position: relative;
  padding-left: 3rem;
}

.aboutus-list li::before {
  content: "✓";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6096ba;
  font-weight: bold;
  font-size: 1.1rem;
}

.aboutus-list li:last-child {
  margin-bottom: 0;
}

/* Cards spéciales avec icônes */
.aboutus-card-mission .aboutus-card-title::before {
  content: "🎯";
  margin-right: 0.5rem;
}

.aboutus-card-vision .aboutus-card-title::before {
  content: "🌟";
  margin-right: 0.5rem;
}

.aboutus-card-values .aboutus-card-title::before {
  content: "💎";
  margin-right: 0.5rem;
}

.aboutus-card-team .aboutus-card-title::before {
  content: "👥";
  margin-right: 0.5rem;
}

/* Boutons avec dégradé si nécessaire */
.aboutus-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

.aboutus-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(39, 76, 119, 0.4);
}

.aboutus-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
}

.aboutus-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.aboutus-button:hover::before {
  left: 100%;
}

/* Responsive Design - Desktop 1245px */
@media (min-width: 1245px) {
  #aboutus {
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
  }

  .aboutus-wrapper {
    max-width: 1200px;
  }

  .aboutus-header h1 {
    font-size: 2.5rem;
  }

  .aboutus-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .aboutus-grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  .aboutus-card {
    margin-bottom: 2.5rem;
  }
}

/* Desktop 1024px */
@media (min-width: 1024px) and (max-width: 1244px) {
  #aboutus {
    margin-left: var(--sidebar-width);
    padding: 2rem;
  }

  .aboutus-wrapper {
    max-width: 1200px;
  }

  .aboutus-header h1 {
    font-size: 2.2rem;
  }

  .aboutus-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .aboutus-grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Tablette */
@media (max-width: 1023px) {
  #aboutus {
    margin-left: 0;
    padding: 1.5rem;
  }

  .aboutus-header {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .aboutus-header h1 {
    font-size: 1.8rem;
  }

  .aboutus-header::before {
    font-size: 1.5rem;
  }

  .aboutus-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .aboutus-grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .aboutus-card {
    margin-bottom: 1.5rem;
  }

  .aboutus-card-content {
    padding: 1.5rem;
  }
}

/* Mobile 768px */
@media (max-width: 767px) {
  #aboutus {
    padding: 1rem;
  }

  .aboutus-header {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
  }

  .aboutus-header h1 {
    font-size: 1.6rem;
  }

  .aboutus-header p {
    font-size: 1rem;
  }

  .aboutus-card-title {
    font-size: 1.3rem;
  }

  .aboutus-grid,
  .aboutus-grid-cols-2,
  .aboutus-grid-cols-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .aboutus-list li {
    font-size: 0.95rem;
    padding: 0.6rem;
    padding-left: 2.5rem;
  }

  .aboutus-list li::before {
    left: 0.8rem;
    font-size: 1rem;
  }

  .aboutus-card-content p {
    font-size: 0.95rem;
  }

  .aboutus-button {
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* Mobile 480px */
@media (max-width: 480px) {
  #aboutus {
    padding: 0.8rem;
  }

  .aboutus-header {
    padding: 1.2rem 0.8rem;
    margin-bottom: 1rem;
    border-radius: 0.8rem;
  }

  .aboutus-header::before {
    font-size: 1.3rem;
    left: 1rem;
  }

  .aboutus-header h1 {
    font-size: 1.4rem;
  }

  .aboutus-header p {
    font-size: 0.9rem;
  }

  .aboutus-card {
    margin-bottom: 1rem;
    border-radius: 0.8rem;
  }

  .aboutus-card::before {
    height: 3px;
  }

  .aboutus-card-header {
    padding: 1.2rem 1rem;
  }

  .aboutus-card-title {
    font-size: 1.2rem;
    gap: 0.5rem;
  }

  .aboutus-card-content {
    padding: 1.2rem 1rem;
  }

  .aboutus-card-content p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
  }

  .aboutus-grid {
    gap: 1rem;
    margin: 1rem 0;
  }

  .aboutus-list li {
    font-size: 0.9rem;
    padding: 0.5rem;
    padding-left: 2.2rem;
    margin-bottom: 0.8rem;
    border-radius: 0.4rem;
  }

  .aboutus-list li::before {
    left: 0.7rem;
    font-size: 0.9rem;
  }

  .aboutus-button {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 0.6rem;
  }

  /* Cards spéciales mobile - Ajustement icônes */
  .aboutus-card-mission .aboutus-card-title::before,
  .aboutus-card-vision .aboutus-card-title::before,
  .aboutus-card-values .aboutus-card-title::before,
  .aboutus-card-team .aboutus-card-title::before {
    font-size: 1.1rem;
    margin-right: 0.4rem;
  }

  /* Désactiver hover effects sur mobile */
  .aboutus-card:hover {
    transform: none;
    box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  }

  .aboutus-button:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
  }

  .aboutus-list li:hover {
    background: rgba(96, 150, 186, 0.1);
  }
}

/* =======================================
   PRICE SECTION
   ======================================= */

/* Base Layout - Design Moderne */
#price {
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  color: #274c77;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
}

/* Header avec dégradé */
.price-header {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  position: relative;
  overflow: hidden;
}

.price-header::before {
  content: "💰";
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  opacity: 0.9;
}

.price-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-header p {
  margin: 0.5rem 0 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

.price-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

/* Plans Container */
.price-plans-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Price Cards - Style moderne avec glassmorphism */
.price-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(163, 206, 241, 0.3);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.price-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(39, 76, 119, 0.2);
}

.price-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #274c77, #6096ba);
}

.price-card-header {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
}

.price-card-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 0 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-card-description {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-size: 0.95rem;
}

.price-card-content {
  padding: 2rem 1.5rem;
  flex-grow: 1;
  text-align: center;
}

/* Price Amount - Style moderne */
.price-amount {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #274c77;
  text-shadow: 0 2px 4px rgba(39, 76, 119, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.price-period {
  font-size: 1.1rem;
  font-weight: normal;
  color: #6096ba;
  margin-bottom: 2rem;
}

/* Features List - Style moderne */
.price-features-list {
  list-style-type: none;
  padding: 0;
  margin: 0 0 2rem;
  text-align: left;
}

.price-feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  color: #274c77;
  font-size: 0.95rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: rgba(96, 150, 186, 0.1);
  transition: background-color 0.2s ease;
}

.price-feature-item:hover {
  background: rgba(96, 150, 186, 0.15);
}

.price-check-icon {
  margin-right: 0.75rem;
  color: #6096ba;
  font-weight: bold;
  min-width: 20px;
}

/* Footer and Button */
.price-card-footer {
  padding: 1.5rem;
  text-align: center;
}

/* Boutons avec dégradé - même style que profile */
.price-button {
  display: inline-block;
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
  position: relative;
  overflow: hidden;
}

.price-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(39, 76, 119, 0.4);
}

.price-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
}

.price-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.price-button:hover::before {
  left: 100%;
}

/* Card spéciale pour le plan recommandé */
.price-card.featured {
  border: 2px solid #6096ba;
  transform: scale(1.02);
}

.price-card.featured::before {
  height: 6px;
  background: linear-gradient(90deg, #274c77, #6096ba, #274c77);
}

.price-card.featured .price-card-header {
  background: linear-gradient(135deg, #6096ba 0%, #274c77 100%);
}

/* Badge "Recommandé" */
.price-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  transform: rotate(-3deg);
}

/* Footnote */
.price-footnote {
  text-align: center;
  margin-top: 3rem;
  color: #6096ba;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(163, 206, 241, 0.3);
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.1);
}

/* Responsive Design - Desktop 1245px */
@media (min-width: 1245px) {
  #price {
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
  }

  .price-plans-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .price-card.featured {
    transform: scale(1.05);
  }

  .price-header h1 {
    font-size: 2.5rem;
  }
}

/* Desktop 1024px */
@media (min-width: 1024px) and (max-width: 1244px) {
  #price {
    margin-left: var(--sidebar-width);
    padding: 2rem;
  }

  .price-plans-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .price-card.featured {
    transform: scale(1.03);
  }
}

/* Tablette */
@media (max-width: 1023px) {
  #price {
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem;
  }

  .price-plans-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .price-header {
    padding: 1.5rem;
  }

  .price-header h1 {
    font-size: 1.8rem;
  }

  .price-header::before {
    font-size: 1.5rem;
  }

  .price-card.featured {
    transform: scale(1);
  }
}

/* Mobile 768px */
@media (max-width: 768px) {
  #price {
    padding: 1rem;
  }

  .price-header {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
  }

  .price-header h1 {
    font-size: 1.6rem;
  }

  .price-header p {
    font-size: 1rem;
  }

  .price-plans-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .price-card-content {
    padding: 1.5rem;
  }

  .price-amount {
    font-size: 2.5rem;
  }

  .price-button {
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* Mobile 480px */
@media (max-width: 480px) {
  #price {
    padding: 0.8rem;
  }

  .price-header {
    padding: 1.2rem 0.8rem;
    margin-bottom: 1rem;
    border-radius: 0.8rem;
  }

  .price-header::before {
    font-size: 1.3rem;
    left: 1rem;
  }

  .price-header h1 {
    font-size: 1.4rem;
  }

  .price-header p {
    font-size: 0.9rem;
  }

  .price-plans-container {
    gap: 1rem;
  }

  .price-card {
    border-radius: 0.8rem;
  }

  .price-card::before {
    height: 3px;
  }

  .price-card-header {
    padding: 1.5rem 1rem 1rem;
  }

  .price-card-title {
    font-size: 1.3rem;
  }

  .price-card-description {
    font-size: 0.9rem;
  }

  .price-card-content {
    padding: 1.2rem 1rem;
  }

  .price-amount {
    font-size: 2.2rem;
  }

  .price-period {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .price-feature-item {
    font-size: 0.9rem;
    padding: 0.4rem;
    margin-bottom: 0.8rem;
  }

  .price-check-icon {
    margin-right: 0.6rem;
  }

  .price-card-footer {
    padding: 1rem;
  }

  .price-button {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 0.6rem;
  }

  .price-footnote {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 0.8rem;
  }

  .price-badge {
    top: -8px;
    right: 15px;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 1.5rem;
  }

  /* Désactiver hover effects sur mobile */
  .price-card:hover {
    transform: none;
    box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  }

  .price-button:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
  }

  .price-feature-item:hover {
    background: rgba(96, 150, 186, 0.1);
  }
}

/* ========================================
   SURAH SELECTOR - DESIGN MODERNE INSPIRÉ DU PROFIL
======================================== */

#salatSurahSelector {
  margin-left: 400px;
  padding: 20px;
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  color: #274c77;
  min-height: 100vh;
  font-family: var(--main-font);
}

/* Header principal de la page Surah Selector */
.surahselector-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.surahselector-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: #274c77;
}

/* Container principal avec layout en grille pour desktop */
.surahselector-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;

  padding: 0 1rem;
}

/* Positionnement des cartes en desktop */
.surahselector-card:nth-child(1) {
  /* "Selection of Surahs to Recite" - première colonne, première ligne */
  grid-column: 1;
  grid-row: 1;
}

.surahselector-card:nth-child(2) {
  /* "Recitation Statistics" - deuxième colonne, première ligne */
  grid-column: 2;
  grid-row: 1;
}

.surahselector-card:nth-child(3) {
  /* "Selection for Salat" - pleine largeur, deuxième ligne */
  grid-column: 1 / -1;
  grid-row: 2;
}

/* Cards modernes avec design en grille */
.surahselector-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  overflow: hidden;
  width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.surahselector-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(39, 76, 119, 0.15);
}

/* Headers des cards */
.surahselector-card h2 {
  color: #fff;
  background: linear-gradient(135deg, #6096ba 0%, #274c77 100%);
  padding: 16px 24px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  border-radius: 0;
}

.surahselector-card h2::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  background-size: contain;
  background-repeat: no-repeat;
}

/* Icônes pour chaque section */
.surahselector-card:nth-child(1) h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" /></svg>');
}

.surahselector-card:nth-child(2) h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" /></svg>');
}

.surahselector-card:nth-child(3) h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" /></svg>');
}

/* Contenu des cartes */
.surahselector-card > div {
  padding: 24px;
}

/* Liste des sourates - style moderne */
#sourateList {
  max-height: 300px;
  overflow-y: auto;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background-color: #ffffff;
  transition: all 0.3s ease;
}

#sourateList:focus-within {
  border-color: #6096ba;
  box-shadow: 0 0 0 3px rgba(96, 150, 186, 0.1);
}

.sourate-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.sourate-item:hover {
  background-color: #f8f9fa;
}

.sourate-item input {
  margin-right: 12px;
  transform: scale(1.2);
}

.sourate-item label {
  font-weight: 500;
  color: #274c77;
  cursor: pointer;
  user-select: none;
}

/* Boutons modernes */
#salatSurahSelector button {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: #ffffff;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#salatSurahSelector button:hover {
  background: linear-gradient(135deg, #6096ba 0%, #274c77 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(39, 76, 119, 0.3);
}

#salatSurahSelector button:active {
  transform: translateY(0);
}

/* Statistiques */
#knownSouratesCount,
#recitationCyclesCount,
#recitationProgress {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #6096ba;
}

.surahselector-card p {
  font-size: 16px;
  margin-bottom: 8px;
  color: #274c77;
}

/* Affichage des rakats sélectionnées avec un design moderne */
#firstRaka,
#secondRaka {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #6096ba;
  color: #274c77;
  display: block;
  box-shadow: 0 2px 6px rgba(39, 76, 119, 0.1);
}

/* Style moderne pour les conteneurs des rakats */
.surahselector-card p {
  font-size: 16px;
  margin-bottom: 16px;
  color: #274c77;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 10px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.08);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.surahselector-card p:hover {
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.15);
  transform: translateY(-1px);
}

/* Labels modernes pour "1st raka:" et "2nd raka:" */
.surahselector-card p span:first-child {
  font-weight: 600;
  color: #274c77;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  flex-shrink: 0;
}

/* Valeurs des sourates sélectionnées */
.surahselector-card p #firstRaka,
.surahselector-card p #secondRaka {
  font-size: 16px;
  font-weight: 600;
  color: #6096ba;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  flex: 1;
  text-align: right;
  min-height: auto;
}

/* Suppression de l'ancien système de grille */
.surahselector-row {
  display: block;
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  #salatSurahSelector {
    margin-left: auto;
    margin-right: auto;
    width: 98vw;
  }

  .surahselector-container {
    max-width: 90vw;
  }
}

@media (max-width: 600px) {
  #salatSurahSelector {
    padding-left: 0rem;
  }

  #salatSurahSelector.page {
    padding: 10px;
  }

  .surahselector-container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  /* Surah Selector Mobile - Design moderne empilé */
  #salatSurahSelector {
    padding: 8px;
    margin-left: 0;
    background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
    min-height: 100vh;
  }

  #salatSurahSelector.page {
    padding: 8px;
  }

  /* Header mobile */
  .surahselector-header {
    margin-bottom: 0px;
    padding: 16px 0;
  }

  .surahselector-header h1 {
    font-size: 22px;
    color: #274c77;
  }

  /* Container mobile */
  .surahselector-container {
    max-width: 100%;
    padding: 0 4px;
    /* Activation du flexbox pour pouvoir utiliser order */
    display: flex;
    flex-direction: column;
  }

  /* Réorganisation des cartes en mobile uniquement */
  .surahselector-card:nth-child(1) {
    /* "Selection of Surahs to Recite" reste en 1ère position */
    order: 1;
  }

  .surahselector-card:nth-child(2) {
    /* "Recitation Statistics" passe en 3ème position */
    order: 3;
  }

  .surahselector-card:nth-child(3) {
    /* "Selection for Salat" passe en 2ème position */
    order: 2;
  }

  /* Cards mobile optimisées */
  .surahselector-card {
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(39, 76, 119, 0.1);
    transform: none;
  }

  .surahselector-card:hover {
    transform: none;
  }

  /* Headers des cards mobile */
  .surahselector-card h2 {
    font-size: 16px;
    padding: 12px 16px;
  }

  .surahselector-card h2::before {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }

  /* Contenu mobile */
  .surahselector-card > div {
    padding: 16px;
  }

  /* Liste des sourates mobile */
  #sourateList {
    max-height: 250px;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-width: 1px;
  }

  .sourate-item {
    margin-bottom: 8px;
    padding: 6px;
  }

  .sourate-item input {
    margin-right: 8px;
    transform: scale(1.1);
  }

  .sourate-item label {
    font-size: 14px;
  }

  /* Boutons mobile */
  #salatSurahSelector button {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 6px;
    margin-top: 8px;
    text-transform: none;
    letter-spacing: 0.3px;
  }

  /* Statistiques mobile */
  #knownSouratesCount,
  #recitationCyclesCount,
  #recitationProgress {
    font-size: 14px;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 6px;
  }

  /* Style mobile moderne pour les containers de rakats */
  .surahselector-card p {
    font-size: 14px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Labels des rakats en mobile */
  .surahselector-card p span:first-child {
    font-size: 13px;
    opacity: 0.9;
    letter-spacing: 0.3px;
  }

  /* Valeurs des sourates en mobile */
  .surahselector-card p #firstRaka,
  .surahselector-card p #secondRaka {
    font-size: 15px;
    text-align: left;
    color: #6096ba;
    font-weight: 600;
  }

  /* Masquer les anciens éléments responsive */
  .surahselector-row {
    display: block;
  }
}

/* ========================================
   DUA TIME CALCULATOR
======================================== */

/* ========================================
   DUA TIME CALCULATOR SECTION  
   ======================================== */

/* Base Layout */
#duaTimeCalculator {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  min-height: 100vh;
  padding: 1rem;
  color: #274c77;
  display: flex;
  flex-direction: column;
}

/* Header with Gradient */
.dua-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.3);
  position: relative;
  overflow: hidden;
}

.dua-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

.dua-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 2;
}

.dua-header h1::before {
  content: "🕐";
  margin-right: 0.5rem;
}

.dua-header p {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

/* Main Content Container */
.dua-main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.dua-calculator-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Calculator Cards with Glassmorphism */
.dua-calculator-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.dua-calculator-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(39, 76, 119, 0.15);
}

.dua-calculator-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #274c77, #6096ba);
}

/* Card Headers */
.dua-calculator-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  padding: 1rem;
  position: relative;
}

.dua-calculator-content {
  padding: 1.5rem;
}

/* Modern Input Fields */
.dua-input-field,
.dua-select-field {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  border: 2px solid rgba(39, 76, 119, 0.2);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.dua-input-field:focus,
.dua-select-field:focus {
  outline: none;
  border-color: #274c77;
  background: white;
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.1);
}

/* Modern Buttons with Gradient */
.dua-btn {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  width: 100%;
  margin: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

.dua-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.dua-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 76, 119, 0.3);
}

.dua-btn:hover::before {
  left: 100%;
}

.dua-btn:active {
  transform: translateY(0);
}

/* Result Box with Modern Styling */
.dua-result-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 1rem;
  margin-top: 1rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
  box-shadow: 0 4px 20px rgba(39, 76, 119, 0.1);
  min-height: 120px;
}

/* Special Controls for Dua Calculator */

/* Hide the "Use My Location" button */
#useLocationBtn,
.use-location-btn,
button[onclick*="useLocation"],
button[onclick*="getLocation"] {
  display: none !important;
}

/* Hide Custom Method container by default */
#duaCustomMethod {
  display: none;
  transition: all 0.3s ease;
}

/* Show Custom Method when Custom is selected */
#duaMethodSelect[value="Custom"] ~ #duaCustomMethod,
.dua-calculator-content:has(#duaMethodSelect option[value="Custom"]:checked)
  #duaCustomMethod {
  display: block;
}

/* Alternative method for showing custom method (fallback) */
.show-custom-method #duaCustomMethod {
  display: block;
}

.dua-result-box p {
  margin: 0.4rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 0.5rem;
  background-color: white;
  border-radius: 0.5rem;
  border-left: 4px solid #274c77;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  color: #274c77;
}

.dua-result-box p:first-child {
  margin-top: 0;
}

.dua-result-box p:last-child {
  margin-bottom: 0;
}

.dua-result-box p:empty {
  display: none;
}

/* Style simple pour les heures en gras */
.dua-result-box strong {
  font-weight: 700;
  color: #6096ba;
  font-size: 1.1rem;
  float: right;
}

/* =======================================
   DUA TIME CALCULATOR RESPONSIVE
   ======================================= */

/* Breakpoint: 1245px - Desktop with Sidebar */
@media (min-width: 1245px) {
  #duaTimeCalculator {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  .dua-header h1 {
    font-size: 2.2rem;
  }

  .dua-calculator-row {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
  }
}

/* Breakpoint: 1024px - Desktop without sidebar */
@media (min-width: 1024px) and (max-width: 1244px) {
  #duaTimeCalculator {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  .dua-header h1 {
    font-size: 2rem;
  }
}

/* Breakpoint: 1023px - Tablet */
@media (max-width: 1023px) {
  #duaTimeCalculator {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }

  .dua-header {
    margin-bottom: 1.5rem;
  }

  .dua-header h1 {
    font-size: 1.8rem;
  }

  .dua-header::before {
    opacity: 0.2;
  }
}

/* Breakpoint: 768px - Small Tablet */
@media (max-width: 768px) {
  #duaTimeCalculator {
    padding: 0.8rem;
  }

  .dua-header {
    margin-bottom: 1rem;
    padding: 1rem 0;
  }

  .dua-header h1 {
    font-size: 1.6rem;
  }

  .dua-header p {
    font-size: 1rem;
  }

  .dua-calculator-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .dua-calculator-title {
    font-size: 1.1rem;
    padding: 0.8rem;
  }

  .dua-calculator-content {
    padding: 1rem;
  }

  .dua-input-field,
  .dua-select-field {
    padding: 0.7rem;
    margin: 0.4rem 0;
    font-size: 0.95rem;
  }

  .dua-btn {
    padding: 0.8rem 1rem;
    margin: 0.8rem 0;
    font-size: 0.95rem;
  }

  .dua-result-box {
    padding: 1rem;
    min-height: 100px;
  }
}

/* Breakpoint: 480px - Mobile */
@media (max-width: 480px) {
  #duaTimeCalculator {
    padding: 0.5rem;
    background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  }

  .dua-header {
    margin-bottom: 1rem;
    padding: 1rem 0;
    border-radius: 0.8rem;
  }

  .dua-header::before {
    display: none;
  }

  .dua-header h1 {
    font-size: 1.4rem;
  }

  .dua-header h1::before {
    font-size: 1.2rem;
  }

  .dua-header p {
    font-size: 0.9rem;
    margin: 0.3rem 0 0;
  }

  .dua-calculator-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
  }

  .dua-calculator-card {
    border-radius: 0.8rem;
    margin-bottom: 0;
  }

  .dua-calculator-card::before {
    height: 3px;
  }

  .dua-calculator-card:hover {
    transform: none;
  }

  .dua-calculator-title {
    font-size: 1rem;
    padding: 0.8rem;
  }

  .dua-calculator-content {
    padding: 1rem;
  }

  .dua-input-field,
  .dua-select-field {
    padding: 0.6rem;
    margin: 0.3rem 0;
    font-size: 0.9rem;
    border-radius: 0.4rem;
  }

  .dua-btn {
    padding: 0.8rem 1rem;
    margin: 0.6rem 0;
    font-size: 0.9rem;
    border-radius: 0.6rem;
  }

  .dua-btn:hover {
    transform: none;
  }

  .dua-result-box {
    padding: 1rem;
    margin-top: 0.8rem;
    border-radius: 0.8rem;
    min-height: 80px;
  }
}

/* ========================================
   MOSQUETIME PAGE - MODERN DESIGN
======================================== */

/* Base Layout avec design moderne */
#mosquetime {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  min-height: 100vh;
  padding: 1rem;
  color: #274c77;
  display: flex;
  flex-direction: column;
}

/* Main container moderne */
.mosquetime-card {
  max-width: none;
  width: 98%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  margin: 0 auto;
  position: relative;
}

/* Bordure dégradée du container principal supprimée */

/* Header with Gradient moderne - Coverage complète comme todo-header */
.mosquetime-header {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  padding: 20px;
  color: white;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
  text-align: center;
  border-radius: 1rem 1rem 0 0;
  position: relative;
  overflow: hidden;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.mosquetime-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

.mosquetime-header .mosquetime-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 2;
  color: white !important;
}

/* Émoji retiré pour un design plus épuré */

.mosquetime-subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

/* Content container moderne */
.mosquetime-content {
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Modern Input Fields et Controls */
.mosquetime-location-search {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.mosquetime-select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid rgba(39, 76, 119, 0.2);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.mosquetime-select:focus {
  outline: none;
  border-color: #274c77;
  background: white;
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.1);
}

/* Modern Buttons avec Gradient */
.mosquetime-button {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

.mosquetime-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.mosquetime-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 76, 119, 0.3);
}

.mosquetime-button:hover::before {
  left: 100%;
}

.mosquetime-button:active {
  transform: translateY(0);
}

/* Date display moderne */
.mosquetime-date-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
}

/* Modern Tabs */
.mosquetime-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.75rem;
  padding: 0.5rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
}

.mosquetime-tab {
  flex: 1;
  text-align: center;
  padding: 0.8rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #274c77;
}

.mosquetime-tab.active {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
}

/* Modern Mosque Cards */
.mosquetime-mosque-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 1rem;
  padding: 0.8rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  transition: all 0.3s ease;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.mosquetime-mosque-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(39, 76, 119, 0.15);
}

.mosquetime-mosque-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #274c77, #6096ba, #8bb8d6);
  border-radius: 1rem 1rem 0 0;
  opacity: 0.8;
}

/* Modern Mosque Headers et Info */
.mosque-header {
  display: flex;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(39, 76, 119, 0.2);
  width: 100%;
}

/* Styles spécifiques pour All Mosques */
#mosquetime-all-mosques .mosque-header {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

#mosquetime-all-mosques .mosque-image {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

#mosquetime-all-mosques .mosque-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#mosquetime-all-mosques .mosque-name {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #274c77;
}

#mosquetime-all-mosques .mosque-address {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
}

/* Styles spécifiques pour Single Mosque */
#mosquetime-single-mosque .mosque-header {
  align-items: flex-start;
}

#mosquetime-single-mosque .mosque-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#mosquetime-single-mosque .mosque-image {
  margin-right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.mosque-image {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.mosque-name {
  font-size: 1.125rem;
  color: #274c77;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.mosque-address {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0.5rem 0;
  font-style: italic;
}

/* Styles de base pour mosque-header - Legacy support removed */

/* Styles spécifiques pour All Mosques */
#mosquetime-all-mosques .mosque-header {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

#mosquetime-all-mosques .mosque-image {
  flex-shrink: 0;
}

#mosquetime-all-mosques .mosque-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#mosquetime-all-mosques .mosque-name {
  margin: 0 0 4px 0;
}

#mosquetime-all-mosques .mosque-address {
  margin: 0;
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* Styles spécifiques pour Single Mosque */
#mosquetime-single-mosque .mosque-header {
  align-items: flex-start;
}

#mosquetime-single-mosque .mosque-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#mosquetime-single-mosque .mosque-image {
  margin-right: 12px;
}

.mosque-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: var(--background-color);
  flex-shrink: 0;
}

.mosque-name {
  font-size: 18px;
  color: var(--text-color);
  font-weight: 600;
  line-height: 1.2;
}

.mosque-address {
  color: var(--gray-color);
  font-size: 0.875rem;
  margin: 0.5rem 0;
}

.prayer-item {
  text-align: center;
}

.prayer-label {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 4px;
  font-weight: 500;
}

.jamaa-time {
  font-size: 16px;
  color: var(--primary-color);
  font-weight: 600;
}

.mosquetime-error {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: none;
}

.mosquetime-disclaimer {
  font-style: italic;
  color: var(--gray-color);
  font-size: 14px;
  margin-top: 20px;
  text-align: center;
}

/* Styles spécifiques pour Single Mosque */
#mosquetime-single-mosque .mosquetime-mosque-card {
  margin-top: 16px;
}

#mosquetime-mosque-select {
  margin-bottom: 16px;
}

.scrollable-content {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 5px; /* Espace pour la barre de défilement */
}

.mosquetime-mosque-card {
  max-height: 400px;
  overflow-y: auto;
}

.mosquetime-tab-content {
  max-height: 600px;
  overflow-y: auto;
}

#welcome-mosquetime-grid {
  max-height: 500px;
  overflow-y: auto;
}

/* Modern Prayer Times Display */
.mosque-prayer-times {
  border-top: 2px solid rgba(39, 76, 119, 0.2);
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.prayer-times-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.75rem;
  margin-bottom: 0;
  padding: 4px 2px;
  border: 1px solid rgba(39, 76, 119, 0.1);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.05);
  gap: 0.1rem;
  width: 100%;
}

.prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.3rem 0.1rem;
  text-align: center;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  min-width: 0;
  flex: 1;
  font-size: 0.85rem;
}

/* Disposition verticale forcée pour prayer-label et jamaa-time */
.prayer-item .prayer-label,
.prayer-item .jamaa-time {
  display: block;
  width: 100%;
}

.prayer-item:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
}

.prayer-label {
  font-size: 1.2rem;
  color: #274c77;
  margin-bottom: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
}

.jamaa-time {
  font-size: 1.2rem;
  color: #274c77;
  font-weight: 700;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* Error states modernes */
.mosquetime-error {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(220, 38, 38, 0.2);
  display: none;
}

/* Disclaimer moderne */
.mosquetime-disclaimer,
.welcomepage-mosque-time .mosquetime-disclaimer {
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 76, 119, 0.1);
  font-style: italic;
}

/* =======================================
   MOSQUETIME RESPONSIVE DESIGN MODERNE
   ======================================= */

/* Breakpoint: 1245px - Desktop with Sidebar */
@media (min-width: 1245px) {
  #mosquetime {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  .mosquetime-title {
    font-size: 2.2rem;
  }

  .mosquetime-location-search {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

/* Breakpoint: 1024px - Desktop without sidebar */
@media (min-width: 1024px) and (max-width: 1244px) {
  #mosquetime {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  .mosquetime-title {
    font-size: 2rem;
  }
}

/* Breakpoint: 1023px - Tablet */
@media (max-width: 1023px) {
  #mosquetime {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }

  .mosquetime-header {
    padding: 1rem 0;
  }

  .mosquetime-title {
    font-size: 1.8rem;
  }

  .mosquetime-header::before {
    opacity: 0.2;
  }
}

/* Rendre les éléments responsifs */
@media (max-width: 768px) {
  .welcomepage-container {
    width: 95vw;
  }

  .mosquetime-sort-buttons {
    margin-bottom: 0.5rem;
  }

  .mosquetime-card {
    width: 100%;
    padding: 0;
  }

  .welcomepage-mosque-time .mosque-name {
    font-size: 1rem;
    padding: 0.25rem 0.25rem 0 0.25rem;
    margin: 0 0 0.4rem 0.3rem;
  }

  .welcomepage-mosque-time .mosque-address {
    font-size: 0.8rem;
    margin: 0 0 0.25rem 0.3rem;
  }

  #welcome-mosquetime-grid {
    width: 100%;
    padding: 0rem;
  }

  #welcome-mosquetime-grid .mosquetime-mosque-card {
    width: 100%;
    padding: 0.65rem;
    margin: 0.35rem;
  }

  .mosquetime-location-search {
    padding: 0.5rem 0;
  }

  .welcomepage-mosque-time .mosquetime-content {
    padding: 0rem;
  }

  .welcomepage-mosque-time .mosquetime-location-search {
    flex-direction: column;
    gap: 1rem;
  }

  .welcomepage-mosque-time .mosquetime-sort-buttons {
    flex-direction: row; /* Boutons alignés horizontalement */
    justify-content: flex-start; /* Alignement à gauche */
    gap: 0.5rem;
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
  }

  .mosque-prayer-times .prayer-times-grid {
    padding-top: 5px;
  }
}

/* Aligner les styles avec MosqueTime */
.welcomepage-mosque-time .mosque-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.welcomepage-mosque-time .mosque-info {
  flex: 1;
}

.welcomepage-mosque-time .prayer-times-grid,
.welcomepage-mosque-time .additional-times-grid,
.mosquetime-mosque-card .prayer-times-grid,
.mosquetime-mosque-card .additional-times-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: white;
  border-radius: 8px;
  margin-bottom: 0rem;
}

/* Harmoniser les styles entre MosqueTime et WelcomeMosqueTime */

/* Media queries communes pour les deux versions */
@media (max-width: 1200px) {
  .mosquetime-card,
  .welcomepage-mosque-time .mosquetime-card {
    width: 98%;
    margin: 0 auto 1rem auto;
    padding: 0.5rem;
  }

  .prayer-times-grid,
  .additional-times-grid,
  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    gap: 0.1rem; /* Réduire l'espacement pour plus de visibilité */
    padding: 4px 2px;
  }
}

@media (max-width: 768px) {
  .mosquetime-location-search,
  .welcomepage-mosque-time .mosquetime-location-search {
    flex-direction: column;
    gap: 1rem;
  }

  .welcomepage-mosque-time .prayer-item {
    padding: 0.5rem;
    box-shadow: none;
  }

  .prayer-label {
    font-size: 0.9rem;
    display: block !important;
    order: 1 !important;
  }

  .mosquetime-location-search {
    flex-direction: column;
  }

  .welcomepage-mosque-time .mosque-prayer-times .prayer-times-grid,
  .welcomepage-mosque-time .mosque-prayer-times .additional-times-grid {
    padding: 0 0 10px 0;
    margin: 0;
  }

  .jamaa-time {
    font-size: 1rem;
    display: block !important;
    order: 2 !important;
  }

  .mosquetime-title {
    font-size: 19px;
  }

  .mosquetime-subtitle {
    font-size: 12px;
  }

  #mosquetime-city-date {
    font-size: 16px;
  }

  .welcomepage-mosque-time .mosquetime-location-search {
    flex-direction: column;
    gap: 1rem;
  }

  .welcomepage-mosque-time .mosquetime-sort-buttons {
    flex-direction: row; /* Boutons alignés horizontalement */
    justify-content: flex-start; /* Alignement à gauche */
    gap: 0.5rem;
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
  }
}

/* Breakpoint: 480px - Mobile */
@media (max-width: 480px) {
  #mosquetime {
    padding: 0.5rem;
    background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  }

  .mosquetime-header {
    padding: 1rem 0;
    border-radius: 0.8rem 0.8rem 0 0;
  }

  .mosquetime-header::before {
    display: none;
  }

  .mosquetime-title {
    font-size: 1.4rem;
  }

  .mosquetime-title::before {
    font-size: 1.2rem;
  }

  .mosquetime-subtitle {
    font-size: 0.9rem;
    margin: 0.3rem 0 0;
  }

  .mosquetime-content {
    padding: 1rem;
  }

  .mosquetime-location-search {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
  }

  .mosquetime-select,
  .mosquetime-button {
    padding: 0.6rem;
    font-size: 0.9rem;
    border-radius: 0.4rem;
  }

  .mosquetime-button:hover {
    transform: none;
  }

  .mosquetime-date-display {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 0.6rem;
  }

  .mosquetime-tabs {
    padding: 0.4rem;
    margin-bottom: 1rem;
    border-radius: 0.6rem;
  }

  .mosquetime-tab {
    padding: 0.6rem;
    font-size: 0.85rem;
    border-radius: 0.4rem;
  }

  .mosquetime-mosque-card {
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 0.8rem;
  }

  .mosquetime-mosque-card:hover {
    transform: none;
  }

  .mosquetime-mosque-card::before {
    height: 3px;
    border-radius: 0.8rem 0.8rem 0 0;
  }

  .welcomepage-mosque-time .mosquetime-title {
    font-size: 1.3rem;
  }

  .welcomepage-mosque-time .mosquetime-subtitle {
    font-size: 0.85rem;
  }

  .welcomepage-mosque-time .mosquetime-content {
    padding: 0rem;
  }

  .welcomepage-mosque-time .mosquetime-location-search {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .welcomepage-mosque-time .mosquetime-button:hover {
    transform: none;
  }

  .prayer-label {
    font-size: 0.8rem;
    display: block !important;
    order: 1 !important;
  }

  .jamaa-time {
    font-size: 0.9rem;
    display: block !important;
    order: 2 !important;
  }

  .prayer-times-grid,
  .additional-times-grid {
    gap: 0.1rem;
    padding: 2px 1px;
  }

  .prayer-item {
    padding: 0.5rem 0.25rem;
  }

  .mosque-name {
    font-size: 1rem;
  }

  .mosque-prayer-times {
    margin-top: 0.5rem;
  }
}

/* ========================================
   SURAH MEMORIZATION
======================================== */

#surahmemorization {
  margin-left: 400px;
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  min-height: 100vh;
  padding: 20px;
}

.surahmemorization-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.surahmemorization-header h1 {
  margin: 0 !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  color: #274c77 !important;
  text-align: center !important;
}

#quran-app-container {
  max-width: 1000px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navigation */
.quran-app-nav {
  position: sticky;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  padding: 15px;
  display: flex;
  justify-content: space-around;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
}

.quran-app-nav-button {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.25) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.quran-app-nav-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.quran-app-nav-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.quran-app-nav-button:hover::before {
  left: 100%;
}

/* Sections principales */
.quran-app-section {
  padding: 25px;
  background: rgba(255, 255, 255, 0.3);
  margin: 20px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.surahmemorization-title {
  color: #274c77;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  position: relative;
}

.surahmemorization-title::before {
  content: "";
  margin-right: 0px;
}

/* Recherche et filtres */
.surahmemorization-search-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.surahmemorization-input,
.surahmemorization-select {
  padding: 12px 16px;
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-size: 14px;
}

.surahmemorization-input:focus,
.surahmemorization-select:focus {
  outline: none;
  border-color: #274c77;
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

/* Liste des sourates */
#surahmemorization-list-container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  max-height: calc(100vh - 350px);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* En-têtes du tableau */
.surahmemorization-headers {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 160px 120px;
  gap: 20px;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
}

/* Alignement des colonnes */
.header-left,
.item-left {
  display: flex;
  align-items: center;
}

.header-center,
.item-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-right,
.item-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Items de la liste */
.surahmemorization-item {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 160px 120px;
  gap: 20px;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(39, 76, 119, 0.1);
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  position: relative;
}

.surahmemorization-item:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.surahmemorization-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(135deg, #274c77, #6096ba);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.surahmemorization-item:hover::before {
  opacity: 1;
}

/* Styles des éléments */
.item-left input[type="checkbox"] {
  margin-right: 12px;
}

.surah-name {
  font-weight: 500;
  margin-right: 4px;
}

.surah-number {
  color: #666;
}

/* Badges de niveau */
.memorization-level {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.875rem;
  color: white;
  min-width: 90px;
  text-align: center;
  display: inline-block;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.memorization-level:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.surahmemorization-level-strong {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}
.surahmemorization-level-good {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.surahmemorization-level-moderate {
  background: linear-gradient(135deg, #eab308 0%, #d97706 100%);
}
.surahmemorization-level-weak {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.surahmemorization-level-na {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

/* Zone des actions */
.surahmemorization-summary {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(248, 250, 252, 0.95) 100%
  );
  backdrop-filter: blur(20px);
  padding: 20px;
  border-top: 1px solid rgba(39, 76, 119, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  z-index: 10;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

/* Boutons et compteur */
.surahmemorization-button {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.3);
}

.surahmemorization-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.surahmemorization-button:not(:disabled):hover {
  background: linear-gradient(135deg, #22405c 0%, #305777 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 76, 119, 0.4);
}

.surahmemorization-button:not(:disabled):hover::before {
  left: 100%;
}

.surahmemorization-button:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

.surahmemorization-count {
  padding: 8px 16px;
  color: #374151;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Section de révision */
#surahmemorization-revise {
  max-width: 1000px;
  max-height: 85vh;
  width: 90vw;
  margin: 0 auto;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
}

#surahmemorization-progress {
  background-color: #274c77;
  color: white;
  padding: 10px 20px;
  margin: 0;
  text-align: center;
  font-size: 16px;
}

/* Barre de progression */
.surahmemorization-progress-bar {
  background-color: #e0e0e0;
  height: 10px;
  margin-top: 10px;
}

/* Boutons d'évaluation */
#surahmemorization-evaluation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px 20px;
}

.surahmemorization-eval-btn {
  padding: 10px;
  border: none;
  border-radius: 5px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.surahmemorization-eval-btn[data-level="Strong"] {
  background-color: #22c55e;
}
.surahmemorization-eval-btn[data-level="Good"] {
  background-color: #3b82f6;
}
.surahmemorization-eval-btn[data-level="Moderate"] {
  background-color: #eab308;
}
.surahmemorization-eval-btn[data-level="Weak"] {
  background-color: #ef4444;
}

.surahmemorization-eval-btn::before {
  content: "★";
  margin-right: 5px;
}

/* Section des graphiques mise à jour - agrandie pour contenir directement le graphique */
.surahmemorization-charts {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 25px;
  margin: 30px auto;
  max-width: 1200px;
  min-height: 600px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: all 0.3s ease;
}

.surahmemorization-charts::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  border-radius: 20px 20px 0 0;
}

.surahmemorization-charts:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Canvas du graphique directement dans le container */
.surahmemorization-charts canvas {
  max-width: 100% !important;
  max-height: 400px !important;
  width: 100% !important;
  height: auto !important;
}

/* Container pour le graphique - styles de compatibilité */
.chart-container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  width: 100%;
  height: 520px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chart-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
}

.chart-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Titre du graphique */
.chart-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #274c77;
  text-align: center;
  margin-bottom: 25px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(39, 76, 119, 0.2);
  position: relative;
}

.chart-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  border-radius: 2px;
}

/* Zone de canvas */
.chart-area {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Style du canvas */
#surahmemorization-performance-chart {
  max-height: 400px;
  width: 100% !important;
  height: 350px !important;
}

/* Légende */
.chart-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  margin-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #4b5563;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: #f3f4f6;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* Table d'historique */
.surahmemorization-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.surahmemorization-table th,
.surahmemorization-table td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid #ddd;
}

.surahmemorization-table th {
  background-color: #f2f2f2;
  font-weight: 600;
}

.surahmemorization-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.surahmemorization-actions .surahmemorization-button {
  padding: 8px 16px;
  font-size: 13px;
  max-width: 120px;
}

.surahmemorization-actions .surahmemorization-button#surahmemorization-clear {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.surahmemorization-actions
  .surahmemorization-button#surahmemorization-clear:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

/* Media Queries */
@media (max-width: 1024px) {
  #surahmemorization {
    margin-left: auto;
    margin-right: auto;
    width: 98vw;
    padding: 15px;
    background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  }

  .surahmemorization-header {
    margin-bottom: 20px;
    padding: 15px 0;
  }

  .surahmemorization-header h1 {
    font-size: 24px !important;
    color: #274c77 !important;
  }

  #quran-app-container {
    width: 90vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
  }

  .quran-app-section {
    padding: 20px;
    margin: 15px;
  }

  .surahmemorization-charts {
    max-width: 95vw;
    min-height: 400px;
    padding: 20px;
  }

  .surahmemorization-charts canvas {
    max-height: 300px !important;
  }

  .chart-container {
    height: 420px;
  }
}

@media (max-width: 768px) {
  #surahmemorization {
    margin-left: auto;
    margin-right: auto;
    width: 98vw;
    padding: 10px;
    background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  }

  .surahmemorization-header {
    margin-bottom: 15px;
    padding: 10px 0;
  }

  .surahmemorization-header h1 {
    font-size: 22px !important;
    color: #274c77 !important;
  }

  #quran-app-container {
    width: 95vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
  }

  .quran-app-section {
    padding: 15px;
    margin: 10px;
  }

  .surahmemorization-summary {
    max-height: calc(100vh - 400px);
  }

  .surahmemorization-item {
    padding: 8px 8px; /* Réduit de 12px 16px */
    gap: 10px; /* Réduit de 20px à 10px */
    font-size: 0.85rem; /* Réduit la taille de police */
  }

  .surahmemorization-headers {
    gap: 10px; /* Même gap que les items pour l'alignement */
    padding: 8px 8px; /* Même padding pour l'alignement */
  }

  #surahmemorization-list-container {
    width: 100%; /* Force le container à prendre toute la largeur disponible */
    max-width: 100vw; /* Empêche le débordement */
    overflow-x: auto; /* Scroll horizontal si nécessaire */
  }

  .surahmemorization-headers,
  .surahmemorization-item {
    grid-template-columns: 2fr 1fr 1fr; /* Grille plus flexible pour mobile */
  }

  .surahmemorization-title {
    font-size: 1.25rem;
  }

  .memorization-level {
    min-width: 80px;
    font-size: 0.75rem;
  }

  .surahmemorization-button {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .surahmemorization-count {
    font-size: 0.75rem;
  }

  .surahmemorization-search-filter {
    grid-template-columns: 1fr;
  }

  .surahmemorization-charts {
    max-width: 100vw;
    min-height: 300px;
  }

  .surahmemorization-charts canvas {
    max-height: 250px !important;
  }

  .chart-container {
    height: 300px;
  }

  .chart-title {
    font-size: 1rem;
  }

  .legend-item {
    font-size: 0.75rem;
  }

  .surahmemorization-actions {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }

  .surahmemorization-actions .surahmemorization-button {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  #surahmemorization {
    padding: 0.25rem;
    background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
    min-height: 100vh;
  }

  .surahmemorization-header {
    padding: 10px 0;
    margin-bottom: 10px;
  }

  .surahmemorization-header h1 {
    font-size: 20px !important;
    color: #274c77 !important;
  }

  #quran-app-container {
    margin: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
  }

  .quran-app-section {
    padding: 10px;
    margin: 5px;
  }

  .quran-app-section {
    padding: 8px;
  }

  .surahmemorization-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .surahmemorization-search-filter {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  .surahmemorization-input,
  .surahmemorization-select {
    padding: 6px 8px;
    font-size: 0.85rem;
  }

  #surahmemorization-list-container {
    max-height: calc(100vh - 300px);
  }

  .surahmemorization-headers {
    padding: 8px 8px;
    gap: 8px;
    grid-template-columns: 2fr 1fr 1fr;
    font-size: 0.8rem;
  }

  .surahmemorization-item {
    padding: 8px 8px;
    gap: 8px;
    grid-template-columns: 2fr 1fr 1fr;
    font-size: 0.8rem;
  }

  .memorization-level {
    min-width: 60px;
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .surahmemorization-summary {
    padding: 8px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
  }

  .surahmemorization-button {
    font-size: 0.8rem;
    padding: 8px 12px;
    width: 100%;
  }

  .surahmemorization-count {
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 5px;
  }

  .quran-app-nav {
    padding: 6px;
    gap: 4px;
  }

  .quran-app-nav-button {
    font-size: 0.8rem;
    padding: 6px 8px;
  }

  .surahmemorization-charts {
    max-width: 100vw;
    min-height: 200px;
  }

  .surahmemorization-charts canvas {
    max-height: 200px !important;
  }

  .chart-container {
    height: 200px;
  }

  .chart-title {
    font-size: 0.8rem;
  }

  .chart-legend {
    flex-direction: column;
    gap: 6px;
  }

  .surahmemorization-table th,
  .surahmemorization-table td {
    font-size: 0.7rem;
    padding: 3px;
  }

  .quick-selection-buttons {
    padding: 4px !important;
    gap: 3px !important;
  }

  .quick-selection-buttons button {
    padding: 4px 6px;
    font-size: 0.7rem;
  }
}

.quick-selection-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 15px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 250, 252, 0.9) 100%
  );
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 16px 16px 0 0;
}

.quick-selection-buttons button {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

.quick-selection-buttons button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.quick-selection-buttons button:hover {
  background: linear-gradient(135deg, #22405c 0%, #305777 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.4);
}

.quick-selection-buttons button:hover::before {
  left: 100%;
}

.quick-selection-buttons button i {
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .quick-selection-buttons button {
    font-size: 0.75rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .quick-selection-buttons button {
    font-size: 0.625rem;
  }
}

/* Styles spécifiques pour le bouton select-by-level avec menu déroulant */
#select-by-level {
  position: relative;
  overflow: visible;
  min-width: 140px;
}

#select-by-level select {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0.875rem;
  z-index: 1;
}

#select-by-level:hover {
  background: linear-gradient(135deg, #22405c 0%, #305777 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.4);
}

#select-by-level:focus-within {
  background: linear-gradient(135deg, #22405c 0%, #305777 100%);
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.2);
}

/* Indicateur visuel pour montrer que c'est un menu déroulant */
#select-by-level::after {
  content: "▼";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 0.6rem;
  pointer-events: none;
  z-index: 0;
}

/* S'assurer que le contenu du bouton reste visible */
#select-by-level svg,
#select-by-level .text {
  position: relative;
  z-index: 0;
  pointer-events: none;
}

/* Style du texte dans le bouton niveau */
#select-by-level .text {
  color: white;
  font-weight: 500;
  margin-right: 15px; /* Espace pour la flèche */
}

/* Uniformiser avec les autres boutons */
#select-by-level {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  #select-by-level {
    min-width: 120px;
  }

  /* Masquer les icônes dans les boutons quick-btn en dessous de 768px */
  .quick-btn svg {
    display: none;
  }
}

@media (max-width: 480px) {
  .quick-selection-buttons button {
    font-size: 0.625rem;
    padding: 8px;
  }

  #select-by-level {
    min-width: 100px;
  }

  #select-by-level::after {
    font-size: 0.5rem;
    right: 6px;
  }

  .surahmemorization-headers {
    font-size: 0.85rem;
    padding: 8px;
    gap: 0;
  }

  .memorization-level {
    min-width: auto;
  }

  /* Masquer la barre de recherche sur très petits écrans */
  #surahmemorization-search {
    display: none;
  }
}

/* ========================================
   SURAH MEMORIZATION - TEXT & AUDIO
======================================== */

.surahmemorization-text {
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  font-family: "Amiri", "Times New Roman", serif;
  text-align: right;
  direction: rtl;
  /* Container fixe avec scroll */
  height: 400px;
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  /* Responsive */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Animation douce pour l'apparition */
  transition: all 0.3s ease;
  position: relative;
}

/* Indicateur de scroll */
.surahmemorization-text[data-scrollable="true"]::after {
  content: attr(data-scroll-text);
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(39, 76, 119, 0.9);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  direction: ltr;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0%,
  100% {
    opacity: 0;
  }
  20%,
  80% {
    opacity: 1;
  }
}

.surah-verse {
  margin-bottom: 6px; /* Réduit de 12px à 6px */
  padding: 4px 0; /* Réduit de 8px à 4px */
  border-bottom: 1px solid #e5e7eb;
  font-size: 1.5rem; /* Augmenté de 1.1rem à 1.3rem */
  line-height: 1.6; /* Ajusté pour un meilleur espacement */
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.verse-number {
  color: #274c77;
  font-weight: bold;
  font-size: 1.3rem; /* 1rem * 1.3 = 1.3rem */
  min-width: 39px; /* 30px * 1.3 = 39px */
  text-align: right;
  flex-shrink: 0;
  direction: ltr;
  background-color: #f0f7ff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
  order: 2; /* Placer le numéro à droite */
}

.verse-text {
  flex: 1;
  text-align: right;
  direction: rtl;
  font-family: "Amiri", "Times New Roman", serif;
  order: 1; /* Placer le texte à gauche mais aligné à droite */
  line-height: 2.5; /* Espacement entre lignes augmenté pour le texte arabe */
}

.verse-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  order: 2; /* Placer les contrôles à droite */
}

.verse-audio-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  background-color: #f0f7ff;
  border: 1px solid #e0e7ff;
  min-width: 36px; /* 28px * 1.3 = 36.4px ≈ 36px */
  height: 36px; /* 28px * 1.3 = 36.4px ≈ 36px */
  display: flex;
  align-items: center;
  justify-content: center;
}

.verse-audio-btn:hover {
  background-color: #dbeafe;
  border-color: #274c77;
  transform: scale(1.05);
}

.verse-audio-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.verse-audio-btn.loading {
  background-color: #fef3c7;
  border-color: #f59e0b;
}

.verse-audio-btn.playing {
  background-color: #dcfce7;
  border-color: #16a34a;
  animation: pulse 2s infinite;
}

.audio-icon {
  font-size: 1.17rem; /* 0.9rem * 1.3 = 1.17rem */
  transition: transform 0.2s ease;
}

.verse-audio-btn:hover .audio-icon {
  transform: scale(1.1);
}

/* Animation pour le verset en cours de lecture */
.verse-playing {
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding-left: 16px;
  animation: highlightVerse 1s ease-in-out;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes highlightVerse {
  from {
    background-color: #fbbf24;
  }
  to {
    background-color: #fef3c7;
  }
}

.surah-verse:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.surah-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 16px;
  color: #991b1b;
  text-align: center;
  direction: ltr;
}

.surah-error p {
  margin: 4px 0;
  font-size: 0.95rem;
}

/* Bouton toggle text avec état de chargement */
#surahmemorization-toggle-text {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 0.9rem;
  display: block;
  width: auto;
  margin-left: auto;
  margin-right: auto;
}

#surahmemorization-toggle-text:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

#surahmemorization-toggle-text:not(:disabled):hover {
  background-color: #4a5568;
}

/* Styles de scroll personnalisés */
.surahmemorization-text::-webkit-scrollbar {
  width: 8px;
}

.surahmemorization-text::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.surahmemorization-text::-webkit-scrollbar-thumb {
  background: #274c77;
  border-radius: 4px;
}

.surahmemorization-text::-webkit-scrollbar-thumb:hover {
  background: #22405c;
}

@media (max-width: 768px) {
  .surahmemorization-text {
    padding: 15px;
    margin: 15px 0;
    height: 350px; /* Légèrement réduit sur mobile */
    max-height: 45vh;
  }

  .surah-verse {
    font-size: 1.4rem; /* Légèrement réduit sur mobile mais toujours plus gros */
    margin-bottom: 5px;
    padding: 3px 0;
    gap: 8px;
  }

  .verse-number {
    font-size: 1.2rem;
    min-width: 36px;
  }

  .verse-controls {
    gap: 6px;
  }

  .verse-audio-btn {
    min-width: 32px;
    height: 32px;
  }

  .audio-icon {
    font-size: 1rem;
  }

  .surah-error p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .surahmemorization-text {
    padding: 12px;
    margin: 12px 0;
    height: 300px; /* Plus compact sur très petit écran */
    max-height: 40vh;
  }

  .surah-verse {
    font-size: 1.3rem; /* Encore légèrement réduit */
    margin-bottom: 4px;
    padding: 2px 0;
    gap: 6px;
  }

  .verse-number {
    font-size: 1.1rem;
    min-width: 32px;
    padding: 1px 4px;
  }

  .verse-controls {
    gap: 4px;
  }

  .verse-audio-btn {
    min-width: 28px;
    height: 28px;
  }

  .audio-icon {
    font-size: 0.9rem;
  }
}

/* ========================================
   PROFILE PAGE
======================================== */

/* ========================================
   PROFILE PAGE - DESIGN 1: CARDS MODERNES EMPILÉES
======================================== */

#profile {
  margin-left: 400px;
  padding: 20px;
  background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
  color: #274c77;
  min-height: 100vh;
  font-family: var(--main-font);
}

/* Header principal de la page Profile */
.profile-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(39, 76, 119, 0.2);
}

.profile-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.profile-header h1::before {
  content: "👤";
  font-size: 32px;
}

/* Cards modernes */
#profileForm,
#passwordChangeForm {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.1);
  overflow: hidden;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#profileForm:hover,
#passwordChangeForm:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(39, 76, 119, 0.15);
}

/* Headers des cards */
#profile h2 {
  color: #fff;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  padding: 16px 24px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  border-radius: 0;
}

#profile h2::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  background-size: contain;
  background-repeat: no-repeat;
}

#profileForm h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" /></svg>');
}

#passwordChangeForm h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 15v2m-6 4h12a2 2 0 002-2V9a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 00-2 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>');
}

/* Contenu des formulaires */
#profileForm form,
#passwordChangeForm form {
  padding: 24px;
}

/* Labels modernes */
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #274c77;
  font-size: 14px;
  letter-spacing: 0.3px;
}

/* Inputs modernes */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 14px;
  background-color: #ffffff;
  transition: all 0.3s ease;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: #274c77;
  box-shadow: 0 0 0 3px rgba(39, 76, 119, 0.1);
  background-color: #fff;
}

/* Selects stylisés */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23274c77' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Boutons modernes */
button[type="submit"] {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: #ffffff;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

button[type="submit"]:hover {
  background: linear-gradient(135deg, #6096ba 0%, #274c77 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(39, 76, 119, 0.3);
}

button[type="submit"]:active {
  transform: translateY(0);
}

/* Layout des formulaires */
#profileForm form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  row-gap: 12px;
}

#profileForm form label[for="username"],
#profileForm form input[name="username"],
#profileForm form label[for="email"],
#profileForm form input[name="email"],
#profileForm form button {
  grid-column: span 2;
}

#passwordChangeForm form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Toggle show password */
#showNewPasswordToggle {
  margin-right: 8px;
  transform: scale(1.1);
}

@media (max-width: 1024px) {
  #profile {
    margin-left: auto;
    margin-right: auto;
    width: 98vw;
  }

  #profileForm,
  #passwordChangeForm {
    width: 90vw;
  }
}

@media (max-width: 600px) {
  #profile {
    padding-left: 0rem;
  }

  #profile.page {
    padding: 10px;
  }

  #profileForm form {
    grid-template-columns: 1fr;
  }

  #profileForm form button {
    grid-column: span 1;
  }
}

/* === Styles pour le modal OAuth de complétion de profil === */
.oauth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.oauth-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.oauth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.oauth-modal-header h3 {
  margin: 0;
  color: #333;
}

.oauth-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oauth-modal-close:hover {
  color: #333;
}

.oauth-modal-body {
  padding: 20px;
}

.oauth-modal .form-grid {
  display: grid;
  gap: 15px;
}

.oauth-modal .form-group {
  display: flex;
  flex-direction: column;
}

.oauth-modal .form-group input,
.oauth-modal .form-group select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.oauth-modal .form-group input:focus,
.oauth-modal .form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.oauth-modal .btn {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
}

.oauth-modal .btn:hover {
  background-color: #0056b3;
}

/* Styles pour la liste des pays dans le modal */
.oauth-modal #oauth-country-list {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10001;
  width: calc(100% - 2px);
  display: none;
}

.oauth-modal .country-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.oauth-modal .country-item:hover {
  background-color: #f5f5f5;
}

.oauth-modal .country-item:last-child {
  border-bottom: none;
}

@media (max-width: 480px) {
  /* Profile Page Mobile - Design 1 Responsive */
  #profile {
    padding: 8px;
    margin-left: 0;
    background: linear-gradient(135deg, #e7ecef 0%, #f5f7fa 100%);
    min-height: 100vh;
  }

  #profile.page {
    padding: 8px;
  }

  /* Header mobile */
  .profile-header {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 8px;
  }

  .profile-header h1 {
    font-size: 22px;
    gap: 8px;
  }

  .profile-header h1::before {
    font-size: 24px;
  }

  /* Cards mobile optimisées */
  #profileForm,
  #passwordChangeForm {
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(39, 76, 119, 0.1);
    transform: none;
  }

  #profileForm:hover,
  #passwordChangeForm:hover {
    transform: none;
  }

  /* Headers des cards mobile */
  #profile h2 {
    font-size: 16px;
    padding: 12px 16px;
  }

  #profile h2::before {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }

  /* Formulaires mobile */
  #profileForm form,
  #passwordChangeForm form {
    padding: 16px;
    gap: 8px;
  }

  /* Labels compacts */
  label {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
  }

  /* Inputs compacts */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  select {
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 14px;
    border-radius: 6px;
    border-width: 1px;
  }

  /* Selects mobile */
  select {
    background-position: right 12px center;
    padding-right: 36px;
  }

  /* Boutons mobile */
  button[type="submit"] {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 6px;
    margin-top: 8px;
    text-transform: none;
    letter-spacing: 0.3px;
  }

  /* Layout Personal Information - Mobile optimisé */
  #profileForm form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    row-gap: 6px;
  }

  /* Username et Email en pleine largeur */
  #profileForm form label[for="username"],
  #profileForm form input[name="username"],
  #profileForm form label[for="email"],
  #profileForm form input[name="email"],
  #profileForm form button {
    grid-column: span 2;
  }

  /* Last Name et First Name côte à côte */
  #profileForm form label[for="lastName"],
  #profileForm form input[name="lastName"],
  #profileForm form label[for="firstName"],
  #profileForm form input[name="firstName"] {
    grid-column: span 1;
  }

  /* Age et Gender côte à côte */
  #profileForm form label[for="age"],
  #profileForm form input[name="age"],
  #profileForm form label[for="gender"],
  #profileForm form select[name="gender"] {
    grid-column: span 1;
  }

  /* Country en pleine largeur */
  #profileForm form label[for="country"],
  #profileForm form select[name="country"] {
    grid-column: span 2;
  }

  /* Password form mobile */
  #passwordChangeForm form {
    gap: 6px;
  }

  /* Toggle password mobile */
  #showNewPasswordToggle {
    margin-right: 6px;
    transform: scale(0.9);
  }

  /* Réduction des espaces */
  #profileForm form label,
  #passwordChangeForm form label {
    margin-bottom: 2px;
  }

  #profileForm form input,
  #profileForm form select,
  #passwordChangeForm form input {
    margin-bottom: 6px;
  }
}
