:root {
    --primary-color: #492362;
    --secondary-color: #7D4C8F;
    --tertiary-color: #2E4056;
    --text-color: #4C5C6C;
    --text-light: #CFCFCF;
    --white: #ffffff;
    --bg-light: #f9f9f9;
    --focus-color: #FF0000; /* Red for RGAA Focus */

    /* Breakpoints (Note: CSS variables cannot be used in @media queries, but stored here for reference) */
    --breakpoint-xs: 450px;
    --breakpoint-md: 1150px;
    --breakpoint-lg: 2300px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    overflow-x: hidden; /* Empêche le scroll horizontal */
    width: 100%;
}
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0; /* Suppression du padding pour permettre aux liens de prendre toute la hauteur */
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1250px;
    height: 80px; /* Hauteur fixe pour alignement précis */
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-radius: 15px; /* Bord arrondi */
    transition: all 0.3s ease;
    overflow: hidden; /* Pour que le background hover ne dépasse pas des bords arrondis */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 0 30px; /* Pas de padding vertical, padding gauche pour le logo */
    height: 100%;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 0; /* Gap géré par les liens directement */
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.logo-img {
    height: 60px; /* Ajustement pour la nouvelle hauteur */
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    height: 100%;
}

.nav-links li {
    height: 100%;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    transition: background-color 0.3s ease;
}

.nav-links a:hover, 
.nav-links a.active {
    background-color: var(--secondary-color);
    color: var(--white); /* Texte blanc au hover et actif */
    outline: none;
}

.nav-links a.active {
    border-bottom: 6px solid var(--white); /* Bordure basse blanche 6px pour le menu actif */
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 35px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Doit être au-dessus du dropdown */
    margin-right: 20px;
}

.burger-menu span {
    width: 35px;
    height: 4px;
    background-color: var(--white);
    display: block;
    border-radius: 4px;
    transition: all 0.3s ease;
    transform-origin: left center;
}

.burger-menu.open span:nth-child(1) {
    transform: rotate(45deg);
}

.burger-menu.open span:nth-child(2) {
    width: 0%;
    opacity: 0;
}

.burger-menu.open span:nth-child(3) {
    transform: rotate(-45deg);
}

.nav-auth {
    padding: 0 30px;
    display: flex;
    align-items: center;
    height: 100%;
}

.btn-client {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 8px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-client:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-white {
    background-color: var(--white);
    color: var(--secondary-color);
}

/* Sections communes */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
}

.section-title h2 {
    font-size: 2.5rem;
}

/* Section Petits Plus */
.petits-plus {
    background-color: var(--white);
    text-align: center;
}

.petits-plus .subtitle {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.petits-plus .main-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 800;
}

.petits-plus .intro-text {
    max-width: 800px;
    margin: 0 auto 50px;
    color: var(--text-color);
    line-height: 1.6;
}

.plus-card {
    border: 1px solid #ddd;
    padding: 40px 30px;
    min-height: 210px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plus-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

.plus-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.plus-card.wide {
    height: 60px;
    min-height: 0;
    padding: 0 40px;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
}

.plus-card.wide .plus-icon-small {
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.plus-card.wide h3 {
    margin-bottom: 0;
    font-size: 1.2rem;
}

.plus-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.plus-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* Home Cards / Features */
.features {
    padding: 80px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 25px;
}

.card-body h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Footer */
footer {
    background-color: #222;
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-content h4 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

.footer-content ul {
    list-style: none;
}

.footer-content ul li {
    margin-bottom: 10px;
}

.footer-content a {
    color: #ccc;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

/* Accessibility */
a:focus, button:focus, [tabindex]:focus {
    outline: 3px dashed var(--focus-color) !important;
    outline-offset: 2px;
}

.nav-links a:focus {
    outline-offset: -3px !important; /* Pour être visible des 4 côtés sans être coupé par l'overflow du header */
}

/* Responsivité Tablette / Smartphone (Breakpoint MD < 1150px) */
@media (max-width: 1150px) {
    header {
        width: 100%;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
        height: auto;
        padding: 0;
    }

    nav {
        padding: 0 20px;
        height: 70px;
        position: relative;
    }

    .logo-img {
        height: 50px;
    }

    .burger-menu {
        display: flex;
        margin-right: 0;
    }

    .nav-content {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        padding: 40px;
        transition: right 0.4s ease-in-out;
        z-index: 1000;
        box-shadow: -10px 0 20px rgba(0,0,0,0.3);
    }

    .nav-content.active {
        right: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        width: 100%;
        height: auto;
        margin-bottom: 40px;
    }

    .nav-links li {
        width: 100%;
        height: auto;
    }

    .nav-links a {
        display: block;
        padding: 15px 0;
        width: 100%;
        height: auto;
        font-size: 1.2rem;
        border-bottom: none !important; /* Pas de ligne blanche en mobile dropdown */
    }

    .nav-links a.active {
        background-color: var(--secondary-color);
        color: var(--white);
    }

    .nav-auth {
        width: 100%;
        justify-content: center;
        padding: 10px 0 20px;
        height: auto;
    }

    /* Ajustement Hero sur mobile */
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
        padding: 0 15px;
    }

    .main-title {
        font-size: 2.2rem !important;
    }

    /* Ajustement de la card wide sur tablette */
    .plus-card.wide {
        height: auto;
        min-height: 210px;
        padding: 40px 30px;
        flex-direction: column;
        justify-content: center;
    }

    .plus-card.wide .plus-icon-small {
        margin-bottom: 20px;
    }

    .plus-card.wide .plus-icon-small svg {
        width: 40px;
        height: 40px;
    }
}

/* Responsivité Smartphone (Breakpoint XS < 450px) */
@media (max-width: 450px) {
    /* La card wide repasse au format horizontal 60px car elle est en 12/12 sur smartphone */
    .plus-card.wide {
        height: 60px;
        min-height: 0;
        padding: 0 20px;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }

    .plus-card.wide .plus-icon-small {
        margin-bottom: 0;
    }

    .plus-card.wide .plus-icon-small svg {
        width: 24px;
        height: 24px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }
}
