/* ═══════════════════════════════════════════════════════════
   NOTULAPP - VARIABLES CSS
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Couleurs principales */
  --primary-navy: #2C3E50;
  --primary-terracotta: #D35400;
  --primary-beige: #EDE5D8;
  --primary-color: #2C3E50;
  --primary-dark: #1a252f;
  
  /* Couleurs fonctionnelles */
  --success-color: #1E7E34;
  --danger-color: #C0392B;
  --warning-color: #F39C12;
  --warning-dark: #e67e22;
  
  /* Textes */
  --text-color: #2C3E50;
  --text-primary: #2C3E50;
  --text-secondary: #555;
  --text-light: #666;
  --text-muted: #999;
  --text-placeholder: #aaa;
  
  /* Backgrounds */
  --bg-white: rgba(255, 255, 255, 0.95);
  --bg-white-solid: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.8);
  --bg-light: #f8f9fa;
  
  /* Bordures */
  --border-light: #e1e8ed;
  --border-lighter: #f0f0f0;
  --border-color: #e1e8ed;
  
  /* Border-radius */
  --border-radius-small: 8px;
  --border-radius: 10px;
  --border-radius-medium: 12px;
  --border-radius-large: 15px;
  --border-radius-xlarge: 20px;
  --border-radius-xxlarge: 24px;
  --border-radius-round: 50%;
  
  /* Transitions */
  --transition: all 0.3s ease;
  
  /* Shadows */
  --shadow-small: 0 2px 20px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-large: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 4px 15px rgba(211, 84, 0, 0.3);
  --shadow-primary-hover: 0 6px 20px rgba(211, 84, 0, 0.4);
}

/* ===== RESET & BASE ===== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--primary-navy);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  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"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--bg-white);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-small);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo a {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-navy);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 10px 15px;
  border-radius: var(--border-radius-small);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-terracotta);
  background: rgba(211, 84, 0, 0.1);
}

.nav-link.active {
  color: var(--primary-terracotta);
  background: rgba(211, 84, 0, 0.15);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--primary-navy);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 90px auto 20px;
  padding: 0 20px;
}

header {
  background: var(--bg-white);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: var(--border-radius-xlarge);
  box-shadow: var(--shadow-medium);
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-navy);
}

.header-actions {
  display: flex;
  gap: 15px;
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary, .btn-small, .btn-danger {
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius-medium);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary-navy);
  color: white;
  border: 2px solid var(--primary-navy);
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.btn-primary:hover {
  background: var(--primary-terracotta);
  border-color: var(--primary-terracotta);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(211, 84, 0, 0.4);
}

.btn-secondary {
  background: var(--primary-beige);
  color: var(--primary-terracotta);
  border: 2px solid var(--primary-terracotta);
}

.btn-secondary:hover {
  background: var(--primary-terracotta);
  border-color: var(--primary-terracotta);
  color: white;
  transform: translateY(-2px);
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
  border: 2px solid var(--danger-color);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(192, 57, 43, 0.4);
}

.btn-primary:active, .btn-secondary:active, .btn-danger:active {
  transform: translateY(0);
}

/* ===== BROWSE PAGE ===== */
.browse-filters {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.browse-filters select {
  padding: 12px 15px;
  border: 2px solid var(--border-light);
  border-radius: var(--border-radius-medium);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.browse-filters select:focus {
  outline: none;
  border-color: var(--primary-navy);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.costumes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.costume-card {
  background: var(--bg-white);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-xlarge);
  padding: 25px;
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
  border: 2px solid var(--primary-beige);
}

.costume-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-large);
  border-color: var(--primary-terracotta);
}

.costume-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-primary);
  font-weight: 600;
}

.costume-card-header h3 {
  font-size: 0.95rem;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin: auto 0;
}

.costume-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.costume-tag {
  padding: 6px 12px;
  background: var(--primary-beige);
  color: var(--primary-terracotta);
  border-radius: var(--border-radius-xlarge);
  font-size: 0.85rem;
  font-weight: 500;
}

.costume-card .costume-budget {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-lighter);
  font-size: 0.9rem;
  color: var(--text-light);
}

.costume-card .costume-progress {
  width: 100%;
  height: 6px;
  background: var(--border-lighter);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}

.costume-card .progress-bar {
  height: 100%;
  background: var(--success-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ===== COSTUMES STATS ===== */
.costumes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.costumes-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.95rem;
  color: var(--text-light);
}

.my-costumes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}



/* ===== MODALS ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--bg-white-solid);
  margin: 5% auto;
  padding: 30px;
  border-radius: var(--border-radius-xlarge);
  width: 90%;
  max-width: 600px;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

.costume-modal-content {
  max-width: 800px;
}

.payment-modal-content {
  max-width: 500px;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.close:hover {
  color: var(--primary-terracotta);
}

#modal-image {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--border-radius-medium);
  margin-bottom: 20px;
}




/* ===== CORRECTIONS POUR L'ACCESSIBILITÉ ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== FOCUS STATES ===== */
button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--primary-navy);
  outline-offset: 2px;
}

/* ===== MESSAGES ===== */
.message {
  padding: 15px 20px;
  border-radius: var(--border-radius-medium);
  margin-bottom: 20px;
  font-weight: 500;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* ===== UTILITAIRES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.hidden { display: none !important; }
.visible { display: block !important; }


/* ===== USER INFO IN NAVBAR ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.user-name {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    max-width: 150px; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap;
}

.logout-link {
    color: #e53e3e !important;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.logout-link:hover {
    background: rgba(229, 62, 62, 0.1);
    color: #c53030 !important;
}

/* Sélecteur de langue dans navbar */
.language-selector {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
}

.lang-link {
  font-size: 0.9em;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.lang-link:hover {
  opacity: 1;
}

.lang-link.active {
  opacity: 1;
  position: relative;
}

.lang-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
}


/* ===== LEGAL FOOTER ===== */
.legal-footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.legal-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.legal-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.legal-footer a:hover {
  color: var(--primary-terracotta);
}

.legal-footer-sep {
  color: var(--border-light);
}

/* Sur les pages auth (fond navy), les liens doivent être plus clairs */
.auth-container .legal-footer {
  margin-top: 20px;
}

.auth-container .legal-footer,
.auth-container .legal-footer a {
  color: rgba(255, 255, 255, 0.5);
}

.auth-container .legal-footer a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.auth-container .legal-footer-sep {
  color: rgba(255, 255, 255, 0.2);
}



@media (max-width: 1024px) and (min-width: 769px) {
    .user-name {
        max-width: 100px;
    }

    .nav-menu {
        gap: 12px; /* Réduire l'écart entre les liens */
    }
    
    .nav-link {
        white-space: nowrap; /* Empêcher le retour à la ligne */
        padding: 10px 10px; /* Réduire légèrement le padding */
    }
    
    .user-info {
        gap: 10px; /* Réduire l'écart */
    }
}


	
/* ===== SUCCESS/ERROR CONTENT ===== */
.auth-form-container .success-content,
.auth-form-container .error-content {
    padding: 40px 0;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== LOGO LINK ===== */

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo {
  height: 45px;
  width: auto;
  transition: var(--transition);
}

.header-logo:hover {
  transform: scale(1.05);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
	  .header-logo {
    height: 36px;
  }
		
    .user-info {
        flex-direction: column;
        align-items: center;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding-top: 15px;
        margin-top: 15px;
        width: 100%;
    }
    
    .user-name {
        max-width: none;
    }
	

  .language-selector {
    padding: 12px;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
	.nav-menu {
		position: fixed;
		left: -100%;
		top: 70px;
		flex-direction: column;
		background: rgba(255, 255, 255, 0.98);
		backdrop-filter: blur(20px);
		width: 100%;
		text-align: center;
		transition: var(--transition);
		box-shadow: var(--shadow-medium);
		padding: 20px 0;
	}

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  header {
    flex-direction: column;
    text-align: center;
  }

  header h1 {
    font-size: 2rem;
  }

  .costumes-grid, .my-costumes-grid {
    grid-template-columns: 1fr;
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }

  .costumes-header {
    flex-direction: column;
    text-align: center;
  }

  .costumes-stats {
    justify-content: center;
  }

  .container {
    padding: 0 15px;
  }

  .profile-tabs {
    justify-content: center;
  }

  .browse-filters {
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 15px;
  }

  .nav-logo a {
    font-size: 1.5rem;
  }

  header {
    padding: 20px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .profile-content {
    padding: 20px;
  }

  .modal-content {
    margin: 10% auto;
    padding: 20px;
    width: 95%;
  }

  .btn-primary, .btn-secondary, .btn-small, .btn-danger {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }
}




@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}