/* 
 * base.css
 * Styles de base pour l'ensemble du site
 * Définitions des variables CSS et styles généraux
*/

:root {
    /* Palette de couleurs */
    --color-primary: rgb(255, 0, 212);       /* Rose vif */
    --color-secondary: rgb(0, 162, 255);     /* Bleu clair */
    --color-background: rgb(227, 242, 255);  /* Bleu très pâle */
    --color-text: rgb(9, 9, 9);              /* Presque noir */
    --color-light: rgb(162, 212, 255);       /* Bleu ciel */
    --color-card: rgb(240, 248, 255);        /* Bleu très pâle, presque blanc */
    
    /* Variables RGB pour faciliter les transparences */
    --color-primary-rgb: 255, 0, 212;
    --color-secondary-rgb: 0, 162, 255;
    --color-text-rgb: 9, 9, 9;
    
    /* Espacements */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* Typographie */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2rem;
    
    /* Effets */
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

    /* Layout */
    --container-width: 1200px;
    --content-width: 800px;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #1c1c1e;
        --color-text: #fefefe;
        --color-primary: #ee5fe2;
        --color-secondary: #5fa9ee;
        --color-card: #2a2a2c;
        
        /* Mise à jour des variables RGB pour le mode sombre */
        --color-primary-rgb: 238, 95, 226;
        --color-secondary-rgb: 95, 169, 238;
        --color-text-rgb: 254, 254, 254;
    }
}

/* Styles de base */
body {
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    margin: 0 auto;
    max-width: var(--container-width); 
    padding: 0 var(--spacing-lg);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    font-weight: 600;
}

h1 {
    font-size: var(--font-size-xxl);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 80px;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

h2 {
    font-size: var(--font-size-xl);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    color: var(--color-primary);
}

h3 {
    font-size: var(--font-size-lg);
    margin-top: var(--spacing-lg);
    color: var(--color-secondary);
}

p {
    margin-bottom: var(--spacing-lg);
    max-width: var(--content-width);
    line-height: 1.7;
}

/* Liens */
a {
    color: var(--color-primary);
    transition: color var(--transition-speed), border-bottom var(--transition-speed);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

a:hover, a:focus {
    color: var(--color-secondary);
    border-bottom: 1px solid var(--color-secondary);
}

/* Listes */
ul.normal {
    list-style-type: square;
    margin-left: 5%;
    margin-bottom: var(--spacing-lg);
    max-width: var(--content-width);
}

ul.normal li {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-sm);
}

/* Images */
img {
    border-radius: var(--border-radius);
    max-width: 100%;
    box-shadow: var(--box-shadow);
}

/* Espacement des sections */
section {
    margin-bottom: var(--spacing-xxl);
    padding: var(--spacing-lg) 0;
}

.content-container {
    max-width: var(--content-width);
    margin: 0 auto;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

/* Responsive */
@media screen and (max-width: 1280px) {
    :root {
        --container-width: 95%;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding: 0 var(--spacing-md);
    }
    
    h1 {
        font-size: var(--font-size-xl);
    }
    
    h2 {
        font-size: var(--font-size-lg);
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
}
