/* =====================================================
   VARIABLES CSS - Portfolio Julien Rougerie
   =====================================================
   Ce fichier centralise toutes les variables de couleurs,
   espaces, boutons et typographie pour une meilleure
   lisibilité et maintenance du code.
   ===================================================== */

:root {
  /* ==================== COULEURS PRINCIPALES ==================== */
  --color-primary: #26267b;
  --color-primary-light: #7b7bd4;
  --color-primary-dark: #1a1a5a;
  --color-accent: #F1EBFD;
  --color-success: #198754;
  --color-warning: #ffc107;
  
  /* ==================== COULEURS DE FOND ==================== */
  --bg-color: #EDE9DE;
  --bg-gradient-light: radial-gradient(ellipse at 70% 20%, #EDE9DE 10%, #e0ecfb 35%, #EDE9DE 50%);
  --bg-card: rgba(241, 235, 253, 0.4);
  --bg-glass: rgba(241, 235, 253, 0.55);
  --bg-popup: #181824;
  --bg-popup-option: #23233a;
  --bg-popup-option-hover: #2d2d4a;
  
  /* ==================== COULEURS DE TEXTE ==================== */
  --text-color: #374151;
  --text-muted: #374151;
  --text-light: #e0e0e0;
  --text-white: #ffffff;
  --text-dark: #555555;
  
  /* ==================== COULEURS DE BORDURES ==================== */
  --border-color: rgba(38, 38, 123, 0.08);
  --border-glass: rgba(38, 38, 123, 0.12);
  --border-light: rgba(38, 38, 123, 0.1);
  
  /* ==================== OMBRES ==================== */
  --shadow-sm: 0 2px 8px rgba(26, 35, 126, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.22);
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.08);
  --shadow-popup: 0 2px 12px rgba(0, 0, 0, 0.10);
  
  /* ==================== ESPACES ==================== */
  --space-xs: 0.25rem;    /* 4px */
  --space-sm: 0.5rem;     /* 8px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-section: 100px;
  
  /* ==================== GAPS ==================== */
  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 1.5rem;
  --gap-lg: 2rem;
  --gap-xl: 3rem;
  --gap-section: 64px;
  
  /* ==================== TYPOGRAPHIE ==================== */
  --font-family-primary: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-family-heading: 'Rufina', serif;
  --font-family-secondary: 'Poppins', sans-serif;
  
  /* Tailles de texte */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md: 1.05rem;     /* ~17px */
  --text-lg: 1.13rem;     /* ~18px */
  --text-xl: 1.18rem;     /* ~19px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 2rem;       /* 32px */
  
  /* Poids de police */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* ==================== TITRES DE PROJETS ==================== */
  /* Style unifié pour tous les titres de projets (.projet-titlev2) */
  --title-project-size: clamp(2.4rem, 5vw, 3.2rem);
  --title-project-size-mobile: 2rem;
  --title-project-weight: 700;
  --title-project-spacing: -0.5px;
  --title-project-margin: 2.2rem;
  
  /* Titres de sections */
  --title-section-size: clamp(20px, 3.2vw, 36px);
  --title-popup-size: 2rem;
  
  /* ==================== BOUTONS ==================== */
  --btn-padding-x: 1.5rem;
  --btn-padding-y: 0.7rem;
  --btn-padding-lg-x: 2.2em;
  --btn-padding-lg-y: 0.85em;
  --btn-font-size: 1.1rem;
  --btn-font-size-lg: 1.18rem;
  --btn-font-weight: 600;
  --btn-border-radius: 5px;
  --btn-border-radius-lg: 8px;
  --btn-min-width: 160px;
  
  /* Couleurs boutons */
  --btn-primary-bg: var(--color-primary);
  --btn-primary-color: var(--text-white);
  --btn-primary-hover-bg: var(--color-primary-dark);
  --btn-success-bg: var(--color-success);
  --btn-success-color: var(--text-white);
  
  /* ==================== TRANSITIONS ==================== */
  --transition-fast: 0.18s;
  --transition-base: 0.2s;
  --transition-slow: 0.3s;
  --transition-popup: 0.25s;
  --easing-default: ease;
  --easing-smooth: cubic-bezier(0.4, 1.6, 0.4, 1);
  
  /* ==================== BORDER RADIUS ==================== */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 50%;
  
  /* ==================== Z-INDEX ==================== */
  --z-dropdown: 100;
  --z-sticky: 500;
  --z-navbar: 1000;
  --z-modal: 9999;
  --z-cursor: 99999;
  
  /* ==================== BREAKPOINTS (pour référence) ==================== */
  /* --breakpoint-sm: 576px; */
  /* --breakpoint-md: 768px; */
  /* --breakpoint-lg: 992px; */
  /* --breakpoint-xl: 1200px; */
}

/* ==================== DARK THEME VARIABLES ==================== */
body.dark-theme {
  --bg-color: #0f0f1e;
  --bg-gradient-dark: radial-gradient(ellipse at 70% 20%, #0f0f1e 10%, #230131 35%, #0f0f1e 50%);
  --color-primary: #7b7bd4;
  --color-accent: #1a1a2e;
  --text-muted: #b8b8c8;
  --bg-glass: rgba(26, 26, 46, 0.55);
  --border-glass: rgba(123, 123, 212, 0.12);
  --text-color: #e0e0e8;
  --bg-card: rgba(26, 26, 46, 0.6);
  --border-color: rgba(123, 123, 212, 0.15);
  
  /* Ombres dark theme */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* ==================== VARIABLES RESPONSIVE MOBILE ==================== */
@media (max-width: 768px) {
  :root {
    --text-main-mobile: 0.9rem;
    --text-subtitle-mobile: 0.75rem;
    --text-desc-mobile: 0.75rem;
    --text-btn-mobile: 0.82rem;
    
    /* Titres projets mobile */
    --title-project-size: var(--title-project-size-mobile);
    
    /* Espaces réduits mobile */
    --gap-section: 32px;
    --space-section: 50px;
  }
}

/* ==================== CLASSES UTILITAIRES ==================== */

/* Classe unifiée pour les titres de projets */
.project-title {
  font-size: var(--title-project-size);
  font-weight: var(--title-project-weight);
  letter-spacing: var(--title-project-spacing);
  margin-bottom: var(--title-project-margin);
  line-height: 1.2;
}

/* Classe pour les boutons unifiés */
.btn-unified {
  min-width: var(--btn-min-width);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  border-radius: var(--btn-border-radius) !important;
  box-shadow: var(--shadow-sm);
  border: none;
  transition: background var(--transition-base), color var(--transition-base);
  outline: none;
  display: inline-block;
}

/* Bouton large */
.btn-unified-lg {
  font-size: var(--btn-font-size-lg);
  padding: var(--btn-padding-lg-y) var(--btn-padding-lg-x);
  border-radius: var(--btn-border-radius-lg);
}
