/* ==========================================================================
   Decoupe-Pro.fr - Custom CSS
   Thème artisanat/bois + spécificités métier
   ========================================================================== */

/* Variables CSS pour le thème bois/artisanat */
:root {
  --primary: #6b4423;
  --primary-color: #6b4423;
  --primary-hover: #5a3a1e;
  --secondary: #8b6834;
  --success: #22c55e;
  --success-color: #059669;
  --success-hover: #16a34a;
  --warning-color: #f59e0b;
  --text-color: #374151;
  --text-light: #6b7280;
  --border-color: #d1d5db;
  --bg-gray: #f9fafb;
  --bg-primary: #fefefe;
  --text-secondary: #6b7280;
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --font-size-sm: 0.875rem;
  --font-size-2xl: 1.5rem;
  --font-weight-medium: 500;
  --font-weight-extrabold: 800;
  --letter-spacing-wide: 0.025em;
  --transition-base: all 0.2s ease;
  --admin-primary: #7c3aed;
  --admin-bg: #faf8ff;
  --danger-color: #dc2626;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --radius: 6px;
}

/* Styles personnalisés spécifiques au métier */

/* Boutons custom avec effet bois */
.btn-wood {
  background: linear-gradient(to right, #a68b5b, #8b6834);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-wood:hover {
  background: linear-gradient(to right, #8b6834, #6b4423);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(107, 68, 35, 0.25);
}

.btn-wood-outline {
  border: 2px solid #a68b5b;
  color: #8b6834;
  background: transparent;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-wood-outline:hover {
  background: #a68b5b;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(166, 139, 91, 0.25);
}

/* Bouton vert pour succès */
.btn-green {
  background: #22c55e;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.btn-green:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(34, 197, 94, 0.25);
}

/* Navigation spécifique */
.nav-link {
  color: #374151;
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: #6b4423;
}

.nav-link.active {
  color: #6b4423;
  font-weight: 600;
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #6b4423;
  border-radius: 1px;
}

/* Cards artisanales */
.card-wood {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #f3f4f6;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-wood:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

/* Hero section */
.hero-gradient {
  background: linear-gradient(135deg, #faf9f7 0%, #f5f3f0 50%, #e8e2d8 100%);
}

/* Animations custom */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

/* Responsive utilities spécifiques */
@media (max-width: 768px) {
  .mobile-hide {
    display: none !important;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states améliorés */
.focus-wood:focus {
  outline: none;
  ring: 2px solid rgba(166, 139, 91, 0.5);
}


/* Shadows custom avec teinte bois */
.shadow-wood {
  box-shadow: 0 4px 15px rgba(107, 68, 35, 0.15);
}

.shadow-wood-lg {
  box-shadow: 0 8px 25px rgba(107, 68, 35, 0.2);
}

/* Footer */
.footer-main {
  background: linear-gradient(135deg, #6b4423 0%, #5a3a1e 50%, #4a2f18 100%);
  color: white;
  padding: 3rem 0 1rem 0;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.footer-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.footer-section p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-section a:hover {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  transform: translateX(2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Text shadows pour titres */
.text-shadow-lg {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Hero sections avec background image */
.hero-section {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

/* Classe supprimée - overlay directement dans les templates pour éviter les conflits */

.hero-title {
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title-yellow {
  color: #f8d47f;
  text-shadow: 0 2px 10px rgba(248, 212, 127, 0.5);
}

/* ==========================================================================
   Navigation States - Default Layout (Espace connecté)
   ========================================================================== */

/* Navigation liens authentifiés */
.nav-link-auth {
  color: #374151;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-link-auth:hover {
  background-color: #f3f4f6;
  color: #6b4423;
}

.nav-link-auth.active {
  background-color: #fef3c7;
  color: #6b4423;
  font-weight: 600;
}

/* Navigation liens publics */
.nav-link-public {
  color: #374151;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-link-public:hover {
  background-color: #f3f4f6;
  color: #6b4423;
}

/* Navigation mobile */
.nav-link-mobile {
  display: block;
  color: #374151;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
  margin: 0.25rem 0;
}

.nav-link-mobile:hover {
  background-color: #f3f4f6;
  color: #6b4423;
}

/* ==========================================================================
   Navigation Active States (Page courante)
   ========================================================================== */

/* Navigation liens authentifiés - état actif */
.nav-link-auth-active {
  color: #ffffff;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.9rem;
  background: linear-gradient(to right, #a68b5b, #8b6834);
  box-shadow: 0 2px 8px rgba(107, 68, 35, 0.15);
}

.nav-link-auth-active:hover {
  background: linear-gradient(to right, #8b6834, #6b4423);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 68, 35, 0.25);
}

/* Navigation liens publics - état actif */
.nav-link-public-active {
  color: #ffffff;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.9rem;
  background: linear-gradient(to right, #a68b5b, #8b6834);
  box-shadow: 0 2px 8px rgba(107, 68, 35, 0.15);
}

.nav-link-public-active:hover {
  background: linear-gradient(to right, #8b6834, #6b4423);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 68, 35, 0.25);
}

/* Navigation mobile - état actif */
.nav-link-mobile-active {
  display: block;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
  margin: 0.25rem 0;
  background: linear-gradient(to right, #a68b5b, #8b6834);
  box-shadow: 0 2px 8px rgba(107, 68, 35, 0.15);
}

.nav-link-mobile-active:hover {
  background: linear-gradient(to right, #8b6834, #6b4423);
  color: #ffffff;
}

/* ==========================================================================
   Order Show Page Styles
   ========================================================================== */

.order-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.order-summary {
  min-height: 500px;
}

.order-info {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
}

.info-row .label {
  font-weight: 600;
  color: var(--text-light);
  min-width: 120px;
}

.info-row .value {
  color: var(--text-color);
  font-weight: 500;
}

.info-row .duration {
  color: var(--primary-color);
  font-weight: 600;
}

.order-lines-summary h4 {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.material-group {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-gray);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.material-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.material-header strong {
  color: var(--primary-color);
  font-size: 1.125rem;
}

.thickness {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
}

.ref {
  color: var(--text-light);
  font-size: 0.875rem;
  font-style: italic;
}

.cut-line {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e5e5;
  font-family: 'Courier New', monospace;
}

.cut-line:last-of-type {
  border-bottom: none;
}

.dimensions {
  font-weight: 600;
  color: var(--text-color);
}

.quantity {
  color: var(--text-light);
  font-weight: 500;
  text-align: center;
}

.surface {
  font-weight: 600;
  color: var(--primary-color);
  text-align: right;
}

.price {
  font-weight: 600;
  color: var(--success-color);
  text-align: right;
}

.material-subtotal {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border-color);
  text-align: right;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.order-totals {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--primary-color);
}

.total-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.total-main {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.order-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.status-card .card-body {
  text-align: center;
  padding: 2rem 1rem;
}

.status-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.status-icon {
  font-size: 3rem;
  line-height: 1;
}

.status-text h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
}

.status-text p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.875rem;
}

.status-cutting .status-text h3 {
  color: var(--warning-color);
}

.status-completed .status-text h3 {
  color: var(--success-color);
}

.cutting-timer {
  margin-top: 2rem;
  text-align: center;
}

.timer-display {
  font-size: 3rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  color: var(--warning-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.timer-label {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
}

.actions-card .card-body {
  padding: 2rem 1.5rem;
}

.btn-full {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  white-space: normal;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.actions-separator {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.actions-separator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
  z-index: 1;
}

.actions-separator span {
  background: white;
  padding: 0 1rem;
  color: var(--text-light);
  font-size: 0.875rem;
  position: relative;
  z-index: 2;
}

.btn-outline {
  background: transparent;
  border: 2px solid currentColor;
}

.btn-outline:hover {
  background: currentColor;
  color: white;
}

/* Animation de pulsation pour les états actifs */
.status-cutting .status-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.btn-primary.btn-large {
  font-size: 1.1rem;
  padding: 1.25rem;
}

.btn-success.btn-large {
  font-size: 1.1rem;
  padding: 1.25rem;
}

/* Order Show Page Mobile Styles */
@media (max-width: 768px) {
  .order-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .page-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .material-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .cut-line {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: left;
  }
  
  .cut-line > span {
    display: flex;
    justify-content: space-between;
  }
  
  .cut-line > span::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-light);
  }
  
  .actions-card .card-body {
    padding: 1.5rem 1rem;
  }
  
  .timer-display {
    font-size: 2.5rem;
  }
  
  .total-line {
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
  }
  
  .dimensions::before { content: "Dimensions: "; }
  .quantity::before { content: "Quantité: "; }
  .surface::before { content: "Surface: "; }
  .price::before { content: "Prix: "; }
}

/* ==========================================================================
   Order Create Page Styles
   ========================================================================== */

/* Mobile styles for order lines */
@media (max-width: 1024px) {
  .order-line > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .order-line > div:not(.col-actions)::before {
    content: attr(data-label);
    font-weight: 600;
    min-width: 120px;
    color: #4b5563;
  }
  
  .col-actions {
    justify-content: flex-end !important;
    margin-top: 0.5rem;
  }
}

/* ==========================================================================
   Orders List and Filters Styles
   ========================================================================== */

.filters {
  margin-bottom: 2rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  margin: 0;
  color: var(--text-color);
}

.filter-clear {
  color: var(--primary-color);
  text-decoration: none;
}

.filter-clear:hover {
  text-decoration: underline;
}

.filters-form {
  width: 100%;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.875rem;
}

.filter-group input,
.filter-group select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
}

.filtered-notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #e0f2fe;
  border: 1px solid #0288d1;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.filter-info {
  color: #0277bd;
}

/* Orders list styles */
.orders-list {
  margin-bottom: var(--space-8);
}

.orders-summary-period {
  margin-top: var(--space-8);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(107, 68, 35, 0.08);
}

.orders-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.orders-stats .stat-item {
  text-align: center;
  padding: var(--space-4);
  background: var(--bg-gray);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.orders-stats .stat-item:hover {
  background: var(--bg-primary);
  box-shadow: 0 2px 8px rgba(107, 68, 35, 0.1);
  transform: translateY(-1px);
}

.orders-stats .stat-number {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.orders-stats .stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  font-weight: var(--font-weight-medium);
}

.period-actions {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

/* Export button harmonization */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--success);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: var(--transition-base);
  border: none;
  cursor: pointer;
}

.btn-export:hover {
  background: var(--success-hover);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(34, 139, 34, 0.2);
}

/* Orders List and Filters Mobile Styles */
@media (max-width: 768px) {
  .filter-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .filter-actions {
    justify-content: center;
  }
  
  .filtered-notice {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .orders-stats .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

/* ==========================================================================
   Toast Notifications Styles
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 400px;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-left: 4px solid;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hiding {
  transform: translateX(100%);
  opacity: 0;
}

.toast-success {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.toast-error {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.toast-warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.toast-info {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  position: relative;
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-message {
  flex: 1;
  line-height: 1.5;
  color: var(--text-color);
  font-size: 14px;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  transition: color 0.2s;
  flex-shrink: 0;
}

.toast-close:hover {
  color: #6b7280;
}

/* Progress bar pour auto-dismiss */
.toast[data-auto-dismiss="true"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  animation: toast-progress 4s linear forwards;
}

.toast-success::after {
  background: #10b981;
}

.toast-error::after {
  background: #ef4444;
}

.toast-warning::after {
  background: #f59e0b;
}

.toast-info::after {
  background: #3b82f6;
}

@keyframes toast-progress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Toast Mobile Styles */
@media (max-width: 768px) {
  .toast-container {
    right: 10px;
    left: 10px;
    top: 70px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* ==========================================================================
   Admin Layout Styles
   ========================================================================== */

.admin-layout body {
  background: var(--admin-bg);
}

.admin-header {
  background: var(--admin-primary);
  color: white;
  padding: 1rem 0;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.admin-nav h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.admin-nav-links {
  display: flex;
  gap: 1rem;
  margin-left: 2rem;
}

.admin-nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background 0.2s;
  font-weight: 500;
}

.admin-nav a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.admin-nav a.active {
  background: rgba(255,255,255,0.2);
}

.admin-nav .admin-user {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
}

.admin-nav .admin-user a {
  padding: 0.375rem 0.75rem;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
}

/* Style pour les cartes admin */
.stats-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-admin-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid #e5e7eb;
}

.stat-admin-number {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--admin-primary);
  margin-bottom: 0.5rem;
}

.stat-admin-label {
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Activité et alertes */
.activity-feed {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.activity-icon.order { background: #dbeafe; color: #1e40af; }
.activity-icon.auth { background: #d1fae5; color: #059669; }
.activity-icon.admin { background: #fde68a; color: #92400e; }
.activity-icon.error { background: #fee2e2; color: #dc2626; }

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-action {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.activity-details {
  font-size: 0.875rem;
  color: var(--text-light);
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.alert-item .btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Admin Mobile Styles */
@media (max-width: 768px) {
  .admin-nav {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .admin-nav-links {
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .admin-nav .admin-user {
    margin-left: 0;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .stats-admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Content Pages Styles (Legal pages, etc.)
   ========================================================================== */

.content-page {
  max-width: 800px;
  margin: 2rem auto;
}

.content-page h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.content-page h2:first-child {
  margin-top: 0;
}

.content-page p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.content-page a {
  color: var(--primary-color);
  text-decoration: underline;
}

.content-page a:hover {
  color: var(--primary-hover);
}

/* ==========================================================================
   ROI Calculator Compact Styles - Moved from inline styles
   ========================================================================== */

/* ROI Calculator Compact Styles */
.roi-input-compact {
    position: relative;
}

/* Nouveaux conteneurs fitted qui épousent parfaitement les boutons */
.roi-input-container-fitted {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    overflow: hidden;
    height: 3rem;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.roi-input-container-fitted:hover {
    border-color: #6b4423;
    box-shadow: 0 4px 8px -2px rgba(107, 68, 35, 0.15);
}

.roi-input-container-fitted:focus-within {
    border-color: #6b4423;
    box-shadow: 0 0 0 2px rgba(107, 68, 35, 0.1);
}

.roi-input-value-fitted {
    flex: 1;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 0.25rem;
    border: none;
    background: transparent;
    color: #374151;
    width: 100%;
    -moz-appearance: textfield;
}

.roi-input-value-fitted:focus {
    outline: none;
    color: #6b4423;
}

.roi-input-value-fitted::-webkit-inner-spin-button,
.roi-input-value-fitted::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Boutons qui épousent parfaitement le contour du conteneur */
.roi-btn-left {
    width: 2rem;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border: none;
    border-radius: 0.5rem 0 0 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b4423;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.roi-btn-right {
    width: 2rem;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border: none;
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b4423;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.roi-btn-left:hover,
.roi-btn-right:hover {
    background: linear-gradient(135deg, #6b4423 0%, #5a3a1e 100%);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 2px 4px rgba(107, 68, 35, 0.2);
}

.roi-btn-left:active,
.roi-btn-right:active {
    transform: scale(0.98);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Enhanced result cards animations */
.roi-result-animation {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.roi-result-animation:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Pulse animation for dynamic values */
@keyframes roi-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.roi-value-animate {
    animation: roi-pulse 0.6s ease-in-out;
}

/* Enhanced hover states */
.roi-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.roi-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

/* Mobile optimizations for ROI calculator */
@media (max-width: 1024px) {
    /* Amélioration de l'espacement et taille sur mobile */
    .roi-input-container-fitted {
        height: 3.5rem;
        margin-bottom: 0.75rem;
    }
    
    .roi-input-value-fitted {
        font-size: 1.125rem;
        font-weight: 700;
        padding: 0.75rem 0.5rem;
    }
    
    .roi-btn-left,
    .roi-btn-right {
        width: 2.5rem;
        font-size: 1rem;
        font-weight: 700;
    }
    
    /* Amélioration des labels sur mobile */
    .roi-input-compact label {
        font-size: 0.875rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.2 !important;
    }
    
    /* Section économies plus lisible */
    .roi-result-card-mobile .text-xl {
        font-size: 1.75rem !important;
        font-weight: 900 !important;
    }
    
    /* Espacement des colonnes de résultats */
    .roi-result-mobile-spacing {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }
}

@media (max-width: 640px) {
    /* Encore plus d'ajustements pour très petits écrans */
    .roi-input-container-fitted {
        height: 4rem;
        box-shadow: 0 3px 8px -2px rgba(107, 68, 35, 0.2);
    }
    
    .roi-input-value-fitted {
        font-size: 1.25rem;
        font-weight: 800;
    }
    
    .roi-btn-left,
    .roi-btn-right {
        width: 2rem;
        font-size: 1rem;
    }
}

/* ==========================================================================
   Cookie Consent Banner - GDPR Compliance
   ========================================================================== */

/* Bannière principale */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.98));
    backdrop-filter: blur(10px);
    border-top: 3px solid var(--primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    padding: 1.5rem;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-banner.hidden {
    transform: translateY(100%);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    color: var(--primary);
    margin: 0;
}

.cookie-banner-text p {
    color: var(--text-color);
    margin: 0;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Boutons de la bannière */
.btn-cookie-accept {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.btn-cookie-accept:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-cookie-necessary {
    background: white;
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: 2px solid #e5e7eb;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.btn-cookie-necessary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-cookie-details {
    background: transparent;
    color: var(--primary);
    padding: 0.75rem 1rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: underline;
    font-size: 0.9rem;
}

.btn-cookie-details:hover {
    color: var(--primary-hover);
}

/* Modal des détails */
.cookie-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-details-modal.hidden {
    display: none;
}

.cookie-details-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.cookie-details-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.cookie-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-details-header h2 {
    margin: 0;
    color: var(--primary);
}

.cookie-details-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-base);
}

.cookie-details-close:hover {
    background: #f3f4f6;
    color: var(--primary);
}

.cookie-details-body {
    padding: 1.5rem;
}

.cookie-category {
    margin-bottom: 2rem;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-category-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

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

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: var(--success);
    cursor: not-allowed;
}

.cookie-details-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

.btn-cookie-save {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-cookie-save:hover {
    background: var(--primary-hover);
}

/* Responsive design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-banner-actions {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-banner-actions button {
        flex: 1;
        min-width: 120px;
    }
    
    .cookie-details-content {
        margin: 1rem;
        max-height: 90vh;
    }
    
    .cookie-details-footer {
        flex-direction: column;
    }
    
    .cookie-details-footer button {
        width: 100%;
    }
}