/* ==========================================================================
   Base Styles & Variables - Fondations CSS
   ========================================================================== */

/* --- Variables --- */
:root {
    /* Palette "ATRIAL Logo" */
    --color-primary: #4A4A4A;       /* Gris Foncé Neutre (pour titres Hn, footer bg...) */
    --color-secondary: #C02026;    /* Rouge Foncé/Bordeaux Logo (pour boutons primaires, liens forts) */
    --color-accent: #FADCD9;        /* Rose Pâle Logo (pour fonds légers, hovers discrets) */
    --color-light: #FCFCFC;         /* Blanc Très Clair (fond principal) */
    --color-dark: #1A1A1A;          /* Quasi-Noir (texte principal) */
    --color-text-secondary: #757575; /* Gris Moyen Foncé (texte secondaire, plus lisible que le gris logo) */
    --color-background: #FEF6F5;    /* Blanc cassé très légèrement rosé (fond alternatif) */
    --color-border: #EAEAEA;       /* Gris Très Clair (bordures) */
    --color-success: #38a169;       /* Vert Succès (Standard) */
    --color-error: #D32F2F;         /* Rouge Erreur (Distinct du rouge logo) */

    /* Typographie */
    --font-family-heading: 'Poppins', sans-serif;
    --font-family-body: 'Open Sans', sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 600;
    --font-weight-bold: 700;

    /* Espacements (Système basé sur 8px) */
    --space-xs: 0.5rem;  /* 8px */
    --space-sm: 1rem;    /* 16px */
    --space-md: 1.5rem;  /* 24px */
    --space-lg: 2.5rem;  /* 40px */
    --space-xl: 4rem;    /* 64px */
    --space-xxl: 6rem;   /* 96px */

    /* Ombres */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-duration: 0.3s;
    --transition-timing: ease-in-out;

    /* Largeurs Conteneur */
    --container-max-width: 1200px;
    --container-padding: 1rem; /* Padding mobile */

    /* Header height */
    --header-height: 70px;
}

/* --- Réinitialisation Moderne --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    /* Mise à jour couleur bordure par défaut */
    border-color: var(--color-border);
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--font-family-body);
    scroll-behavior: smooth;
    height: 100%;
}

body {
    margin: 0;
    font-family: inherit;
    line-height: inherit;
    color: var(--color-dark);
    /* Mise à jour couleur fond principale */
    background-color: var(--color-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1; /* Pousse le footer vers le bas */
}


h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
    font-family: var(--font-family-heading);
    /* Mise à jour couleur titre par défaut */
    color: var(--color-primary);
    margin: 0 0 var(--space-sm) 0;
}

p {
    margin: 0 0 var(--space-sm) 0;
    /* Utilisation de la couleur de texte secondaire par défaut pour les paragraphes */
    color: var(--color-text-secondary);
}
/* Assurer que le texte direct dans .container ou section utilise bien --color-dark si nécessaire */
/* Ou ajuster les couleurs spécifiques dans style.css au besoin */


a {
    color: inherit;
    text-decoration: inherit;
    transition: color var(--transition-duration) var(--transition-timing);
}

/* Style de base pour les liens dans le contenu principal */
main p a:not(.button) {
    color: var(--color-secondary); /* Rouge Logo */
    text-decoration: underline;
    font-weight: var(--font-weight-medium);
}
main p a:not(.button):hover,
main p a:not(.button):focus {
    color: var(--color-primary); /* Gris Foncé */
    text-decoration: none;
}


img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
}

img, video {
    max-width: 100%;
    height: auto;
}

ol, ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button, [role="button"] {
  cursor: pointer;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  background-color: transparent;
  border: none;
}

button:focus, input:focus, select:focus, textarea:focus {
    /* Mise à jour couleur outline */
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

fieldset {
    margin: 0;
    padding: 0;
    border: none;
}
legend { padding: 0; }

/* --- Typographie Globale --- */
body {
    font-size: 1rem;
    line-height: 1.7;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: var(--font-weight-bold); line-height: 1.2; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: var(--font-weight-bold); line-height: 1.25;}
h3 { font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: var(--font-weight-medium); line-height: 1.3; }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.25rem); font-weight: var(--font-weight-medium); line-height: 1.4; }

/* --- Utilitaires --- */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Espacements margin/padding inchangés */
.margin-bottom-xs { margin-bottom: var(--space-xs); }
.margin-bottom-sm { margin-bottom: var(--space-sm); }
.margin-bottom-md { margin-bottom: var(--space-md); }
.margin-bottom-lg { margin-bottom: var(--space-lg); }
.margin-bottom-xl { margin-bottom: var(--space-xl); }
.margin-bottom-xxl { margin-bottom: var(--space-xxl); }

.margin-top-xs { margin-top: var(--space-xs); }
.margin-top-sm { margin-top: var(--space-sm); }
.margin-top-md { margin-top: var(--space-md); }
.margin-top-lg { margin-top: var(--space-lg); }
.margin-top-xl { margin-top: var(--space-xl); }
.margin-top-xxl { margin-top: var(--space-xxl); }

.padding-top-lg { padding-top: var(--space-lg); }
.padding-top-xl { padding-top: var(--space-xl); }
.padding-top-xxl { padding-top: var(--space-xxl); }
.padding-bottom-lg { padding-bottom: var(--space-lg); }
.padding-bottom-xl { padding-bottom: var(--space-xl); }
.padding-bottom-xxl { padding-bottom: var(--space-xxl); }

.section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}
.section--bg {
    /* Mise à jour couleur fond alternatif */
    background-color: var(--color-background);
}

/* Classe pour masquer visuellement mais garder accessible */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* --- Accessibilité : Focus Visible --- */
*:focus-visible {
  /* Mise à jour couleur focus */
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(192, 32, 38, 0.3); /* Rouge Logo alpha */
  border-radius: 4px;
}
*:focus:not(:focus-visible) {
  outline: none; /* Pas d'outline si le focus n'est pas dû au clavier */
}


/* --- Media Queries pour Adaptation --- */
@media (min-width: 768px) {
    :root {
        --container-padding: 1.5rem;
    }
     .section {
        /* Augmenter l'espacement vertical des sections sur grand écran */
        padding-top: var(--space-xxl);
        padding-bottom: var(--space-xxl);
    }
}