/* =========================================================
   LAYOUT.CSS
   Fondations + structure globale du site
   - Design system (variables)
   - Reset / base
   - Layout helpers (container, grid)
   - Typography
   - Header/Nav (structure)
   - Footer
   - Accessibilité, Print, Reduced motion
   ========================================================= */

    /* ===== CSS VARIABLES & DESIGN SYSTEM ===== */
    :root {
      /* Couleurs primaires & secondaires */
      --primary: #0A3D91;
      --primary-light: #1a5bb8;
      --primary-lighter: #e8f1f8;
      --secondary: #F58634;
      --secondary-light: #ffa347;
      --secondary-lighter: #fff4eb;

      /* Neutrals */
      --white: #FFFFFF;
      --bg-light: #f8fafc;
      --bg-lighter: #f1f5f9;
      --surface: #ffffff;
      --border: #e2e8f0;
      --text-primary: #0f172a;
      --text-secondary: #475569;
      --text-tertiary: #64748b;
      --text-disabled: #94a3b8;

      /* Accents */
      --success: #10b981;
      --warning: #f59e0b;
      --error: #ef4444;

      /* Shadows & Depth */
      --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
      --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.1), 0 1px 2px 0 rgba(15, 23, 42, 0.06);
      --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
      --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
      --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
      --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
      --shadow-elevator: 0 15px 40px rgba(10, 61, 145, 0.15);

      /* Spacing System */
      --spacing-xs: 0.25rem;
      --spacing-sm: 0.5rem;
      --spacing-md: 1rem;
      --spacing-lg: 1.5rem;
      --spacing-xl: 2rem;
      --spacing-2xl: 3rem;
      --spacing-3xl: 4rem;
      --spacing-4xl: 6rem;

      /* Border Radius */
      --radius-sm: 0.375rem;
      --radius-md: 0.75rem;
      --radius-lg: 1.25rem;
      --radius-xl: 1.875rem;
      --radius-2xl: 2.5rem;
      --radius-full: 9999px;

      /* Typography */
      --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      --font-display: 'Poppins', sans-serif;

      /* Transitions */
      --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
      --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
      --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
      --transition-extra: 500ms cubic-bezier(0.4, 0, 0.2, 1);

      /* Layout */
      --container-max: 1280px;
      --container-padding: 1.5rem;

      /* Z-index */
      --z-dropdown: 1000;
      --z-sticky: 1020;
      --z-fixed: 1030;
      --z-modal-backdrop: 1040;
      --z-modal: 1050;
      --z-popover: 1060;
      --z-tooltip: 1070;
    }

    /* ===== RESET & BASE STYLES ===== */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    *::before, *::after {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    body {
      font-family: var(--font-sans);
      background-color: var(--white);
      color: var(--text-primary);
      line-height: 1.6;
      overflow-x: hidden;
    }

    img {
      display: block;
      max-width: 100%;
      height: auto;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    button {
      font-family: inherit;
      cursor: pointer;
      border: none;
    }

    /* ===== FOCUS VISIBLE (ACCESSIBILITY) ===== */
    *:focus-visible {
      outline: 3px solid var(--secondary);
      outline-offset: 2px;
    }

    button:focus-visible,
    a:focus-visible {
      border-radius: var(--radius-md);
    }

    /* ===== SKIP LINK ===== */
    .skip-link {
      position: absolute;
      top: -100vh;
      left: 0;
      background: var(--primary);
      color: var(--white);
      padding: var(--spacing-md) var(--spacing-lg);
      border-radius: var(--radius-md);
      font-weight: 600;
      z-index: var(--z-modal);
      transition: top var(--transition-fast);
    }

    .skip-link:focus {
      top: var(--spacing-md);
    }

    /* ===== CONTAINER & GRID ===== */
    .container {
      width: 100%;
      max-width: var(--container-max);
      margin: 0 auto;
      padding: 0 var(--container-padding);
    }

    .grid {
      display: grid;
      gap: var(--spacing-lg);
    }

    .grid-2 {
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .grid-3 {
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .grid-4 {
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    /* ===== TYPOGRAPHY ===== */
    h1, h2, h3, h4, h5, h6 {
      font-family: var(--font-display);
      font-weight: 700;
      line-height: 1.2;
      color: var(--text-primary);
    }

    h1 {
      font-size: clamp(2rem, 5vw, 3.5rem);
      letter-spacing: -0.02em;
    }

    h2 {
      font-size: clamp(1.75rem, 4vw, 2.5rem);
      letter-spacing: -0.015em;
      margin-bottom: var(--spacing-xl);
    }

    h3 {
      font-size: clamp(1.25rem, 3vw, 1.5rem);
      margin-bottom: var(--spacing-md);
    }

    h4 {
      font-size: 1.125rem;
      margin-bottom: var(--spacing-sm);
    }

    p {
      color: var(--text-secondary);
      line-height: 1.7;
    }


    /* ===== Header & NAVIGATION premium ===== */

    .nav-container{
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
    }

    /* Bloc logo */
    .logo{
      display: flex;
      align-items: center;
      gap: 12px;
      padding-right: 28px;
      margin-right: 28px;
      border-right: 1px solid var(--border); /* ← trait élégant */
      text-decoration: none;
      font-weight: 800;
      font-family: var(--font-display);
      letter-spacing: -0.01em;
      text-transform: uppercase; 
      white-space: nowrap;
    }

    .logo-text{
      display: flex;
      flex-direction: column;
      line-height: 1.1;
      color: var(--text-primary);  
    }

    .logo-text strong{
      font-size: 17px;
      letter-spacing: 0.6px;
      color: var(--primary);
      font-size: 1.5rem;
    }

    .logo span{ 
      color: var(--secondary); 
    }
    
    /* Partie droite */
    .nav-right{
      display: flex;
      align-items: center;
      gap: 32px;
    }

    /* Menu */
    .nav-menu{
      display: flex;
      align-items: center;
      gap: 26px; /* ← espace premium entre items */
      margin: 0;
      padding: 0;
      list-style: none;
    }

    /* Liens du menu */
    .nav-menu a{
      position: relative;
      font-weight: 500;
      color:var(--text-primary);
      text-decoration: none;
      padding: 6px 0;
      transition: color .2s ease;
    }

    /* Effet underline élégant */
    .nav-menu a::after{
      content: "";
      position: absolute;
      left: 0;
      bottom: -4px;
      width: 0%;
      height: 2px;
      background: var(--primary);
      transition: width .25s ease;
    }

    .nav-menu a:hover{
      color: var(--primary);
    }

    .nav-menu a:hover::after{
      width: 100%;
    }

    /* Mobile : cacher le texte logo */
  @media (max-width: 768px){

    .nav-menu{
      display: none;
    }

    .nav-menu.active{
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 70px;        /* hauteur du header mobile */
      left: 0;
      right: 0;
      width: 100vw;
      padding: 16px;
      background: var(--white);
      border-top: 1px solid var(--border);
      gap: 10px;
      z-index: 9999;
    }

    .nav-menu.active a{
      padding: 12px 6px;
      border-bottom: 1px solid var(--border);
    }

    .nav-menu.active a:last-child{
      border-bottom: none;
    }
  }


    /* ===== BURGER MENU ===== */
    .burger {
      display: flex;
      flex-direction: column;
      gap: 5px;
      padding: var(--spacing-sm);
      background: transparent;
      width: 40px;
      height: 40px;
      border-radius: var(--radius-md);
      transition: background var(--transition-base);
    }

    .burger:hover {
      background: var(--bg-light);
    }

    .burger span {
      display: block;
      width: 24px;
      height: 2px;
      background: var(--primary);
      border-radius: 1px;
      transition: all var(--transition-base);
      transform-origin: center;
    }

    .burger[aria-expanded="true"] span:nth-child(1) {
      transform: rotate(45deg) translate(10px, 10px);
    }

    .burger[aria-expanded="true"] span:nth-child(2) {
      opacity: 0;
    }

    .burger[aria-expanded="true"] span:nth-child(3) {
      transform: rotate(-45deg) translate(8px, -8px);
    }

    @media (min-width: 768px) {
      .burger {
        display: none;
      }
    }

    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .nav-menu.active a {
      padding: var(--spacing-md) 0;
      border-bottom: 1px solid var(--border);
      color: var(--text-primary);
    }

    .nav-menu.active a:last-child {
      border-bottom: none;
    }