/* ========================================
   NAVIGATION MON COMPTE AGLAÉ CRÉE
   ======================================== */

/* ========================================
   LAYOUT GLOBAL
   ======================================== */

.woocommerce-account {
  background: var(--bg-body, #f0f2f0);
  min-height: 100vh;
  padding: 2rem 0;
}

.woocommerce-account .woocommerce {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ========================================
   NAVIGATION AGLAÉ
   ======================================== */

.aglae-account-navigation {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(107, 91, 77, 0.1);
  overflow: hidden;
  position: sticky;
  top: 2rem;
}

/* En-tête avec avatar et infos utilisateur */
.aglae-account-header {
  background: linear-gradient(135deg, var(--bg-marron, #6b5b4d) 0%, #5a4a3d 100%);
  padding: 2rem 1.5rem;
  text-align: center;
  color: white;
}

.aglae-account-avatar {
  margin: 0 auto 1rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.aglae-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aglae-account-name {
  font-family: "Capitolium", serif;
  font-size: 1.25rem;
  margin: 0 0 0.25rem 0;
  font-weight: normal;
  color: white;
}

.aglae-account-email {
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   MENU DE NAVIGATION
   ======================================== */

.aglae-account-menu {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
}

.aglae-account-menu-item {
  position: relative;
}

.aglae-account-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--color-police, #6b5b4d);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  border-left: 3px solid transparent;
}

.aglae-account-link:hover {
  background: var(--bg-decli4, #f2e0c9);
  color: var(--bg-marron, #6b5b4d);
  border-left-color: var(--bg-btn, #4a90e2);
}

/* Item actif */
.is-active .aglae-account-link,
.aglae-account-link[aria-current="page"] {
  background: var(--bg-decli4, #f2e0c9);
  color: var(--bg-marron, #6b5b4d);
  border-left-color: var(--bg-btn, #4a90e2);
  font-weight: 600;
}

/* Icônes */
.aglae-account-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
  transition: transform 0.3s ease;
}

.aglae-account-link:hover .aglae-account-icon {
  transform: scale(1.1);
}

/* Label */
.aglae-account-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Badge de compteur */
.aglae-account-badge {
  background: var(--bg-btn, #4a90e2);
  color: white;
  border-radius: 12px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Indicateur d'item actif */
.aglae-account-indicator {
  position: absolute;
  right: 1rem;
  width: 6px;
  height: 6px;
  background: var(--bg-btn, #4a90e2);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* Déconnexion - style spécial */
.woocommerce-MyAccount-navigation-link--customer-logout .aglae-account-link {
  color: #dc3545;
  margin-top: 0.5rem;
  border-top: 1px solid #e8e3dd;
}

.woocommerce-MyAccount-navigation-link--customer-logout .aglae-account-link:hover {
  background: #fee;
  border-left-color: #dc3545;
}

/* ========================================
   PIED DE PAGE
   ======================================== */

.aglae-account-footer {
  padding: 1.5rem;
  border-top: 1px solid #e8e3dd;
  background: #fafaf9;
  text-align: center;
}

.aglae-account-footer-text {
  margin: 0;
  font-size: 0.85rem;
  color: #8a7a6b;
  font-style: italic;
}

/* ========================================
   CONTENU DU COMPTE
   ======================================== */

.woocommerce-MyAccount-content {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  min-height: 400px;
}

/* Titres des pages (sauf dashboard qui a ses propres styles) */
.woocommerce-MyAccount-content > h2,
.woocommerce-MyAccount-content > h3 {
  font-family: "Capitolium", serif;
  color: var(--bg-marron, #6b5b4d);
  font-weight: normal;
  margin-top: 0;
}

.woocommerce-MyAccount-content > h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bg-btn, #4a90e2);
}

/* Formulaires et tableaux dans les autres pages */
.woocommerce-MyAccount-content:not(.aglae-dashboard) {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(107, 91, 77, 0.1);
}

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

@media (max-width: 1024px) {
  .woocommerce-account .woocommerce {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .aglae-account-navigation {
    position: static;
    top: 0;
  }

  /* Version horizontale sur tablette */
  .aglae-account-menu {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem;
  }

  .aglae-account-menu-item {
    flex: 0 0 auto;
  }

  .aglae-account-link {
    padding: 0.75rem 1rem;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .aglae-account-link:hover,
  .is-active .aglae-account-link,
  .aglae-account-link[aria-current="page"] {
    border-left: none;
    border-bottom-color: var(--bg-btn, #4a90e2);
  }
}

@media (max-width: 768px) {
  .woocommerce-account .woocommerce {
    padding: 0 1rem;
  }

  .aglae-account-header {
    padding: 1.5rem 1rem;
  }

  .aglae-account-name {
    font-size: 1.1rem;
  }

  .aglae-account-email {
    font-size: 0.8rem;
  }

  /* Menu en colonne sur mobile */
  .aglae-account-menu {
    flex-direction: column;
    padding: 0.5rem 0;
  }

  .aglae-account-link {
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
    border-bottom: none;
  }

  .aglae-account-link:hover,
  .is-active .aglae-account-link,
  .aglae-account-link[aria-current="page"] {
    border-left-color: var(--bg-btn, #4a90e2);
    border-bottom: none;
  }

  .woocommerce-MyAccount-content:not(.aglae-dashboard) {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .aglae-account-avatar {
    width: 48px;
    height: 48px;
  }

  .aglae-account-name {
    font-size: 1rem;
  }

  .aglae-account-email {
    font-size: 0.75rem;
  }

  .aglae-account-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .aglae-account-icon {
    width: 18px;
  }

  .aglae-account-icon svg {
    width: 18px;
    height: 18px;
  }

  .woocommerce-MyAccount-content:not(.aglae-dashboard) {
    padding: 1rem;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */

.aglae-account-menu-item {
  opacity: 0;
  animation: fadeInLeft 0.4s ease-out forwards;
}

.aglae-account-menu-item:nth-child(1) {
  animation-delay: 0.05s;
}
.aglae-account-menu-item:nth-child(2) {
  animation-delay: 0.1s;
}
.aglae-account-menu-item:nth-child(3) {
  animation-delay: 0.15s;
}
.aglae-account-menu-item:nth-child(4) {
  animation-delay: 0.2s;
}
.aglae-account-menu-item:nth-child(5) {
  animation-delay: 0.25s;
}
.aglae-account-menu-item:nth-child(6) {
  animation-delay: 0.3s;
}
.aglae-account-menu-item:nth-child(7) {
  animation-delay: 0.35s;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation du contenu */
.woocommerce-MyAccount-content {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   AMÉLIORATIONS D'ACCESSIBILITÉ
   ======================================== */

.aglae-account-link:focus {
  outline: 2px solid var(--bg-btn, #4a90e2);
  outline-offset: 2px;
}

/* ========================================
   ICÔNE COMPTE DANS LE HEADER
   ======================================== */

.account-link {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  position: relative;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.account-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.account-link svg {
  color: white;
}

/* Indicateur de connexion */
.account-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #28a745;
  border: 2px solid var(--bg-marron, #6b5b4d);
  border-radius: 50%;
}
