/* =========================================================
   🎨 directory.css — Styles globaux pour le SAR
   ========================================================= */

/* =========================================================
   🎨 VARIABLES GLOBALES (Design Tokens)
   ========================================================= */
:root {
    /* Couleurs principales */
    --color-primary: #278FE2;          /* Bleu principal utilisé pour titres/links */
    --color-primary-dark: #1e3d7b;     /* Bleu foncé au survol */
    --color-dark-blue: #092851;        /* Bleu foncé pour boutons non-actifs */
    --color-orange: #f28c00;           /* Orange accent / département */
    --color-accent: #f57c00;           /* autre orange (breadcrumbs) */

    /* Textes et fonds */
    --color-text-dark: #333;
    --color-text-medium: #444;
    --color-text-light: #999;
    --color-background-light: #e0e0e0;
    --color-background-off-white: #f1f1f1;
    --color-row-even: #ffffff;
    --color-row-odd: #eeeeee;
    --color-row-hover: #d7dff2;

    /* Espacement */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;

    /* Rayons */
    --radius-sm: 10px;
    --radius-lg: 25px;

    /* Typographie */
    --font-family: 'Raleway', sans-serif;
    --font-size-sm: 12px;
    --font-size-md: 14px;
    --font-size-lg: 1.8rem;
}

/* =========================================================
   🧱 STRUCTURE GLOBALE
   ========================================================= */
* { box-sizing: border-box; }

body {
    margin: 0;
    padding-top: 0 !important;
    font-family: var(--font-family);
    color: dimgrey;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sar-layout {
    display: flex;
    flex-direction: column;
    width: min(90%, 1600px);
    box-sizing: border-box;
    margin: var(--spacing-lg) auto;
    padding: 0 var(--spacing-lg);
    box-sizing: border-box;
    background-color: #fff;
}

.content-align-logo {
    margin-top: var(--spacing-xl);
}

/* Layout Principal */
.sar-main-container {
    display: flex;
    max-width: 100%;
    margin: 0 auto;
    gap: 30px;
    padding: 20px;
}

/* Sidebar */
.sar-sidebar {
    width: 250px;
    flex-shrink: 0;
}
.sar-sidebar ul { list-style: none; padding: 0; position: sticky; top: 150px; }
.sar-sidebar li { margin-bottom: 15px; padding-bottom: 5px; }
.sar-sidebar a { text-decoration: none; color: dimgray; font-weight: 600; transition: 0.3s; }
.sar-sidebar a:hover { color: orange; }
.sar-sidebar ul li a.active {
    color: orange !important;
    border-left: 3px solid orange; /* Optionnel : petit trait à gauche pour marquer la position */
    padding-left: 10px;
}

/* Contenu */
.sar-content { flex-grow: 1; }

.blue-banner {
    background-color: #0056b3;
    color: white;
    padding: 15px 25px;
    font-weight: bold;
    margin-bottom: 25px;
}

/* Grille 2 colonnes */
.sar-grid-system {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Le texte est plus large que les vignettes */
    gap: 30px;
}

.sar-intro-section {
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: justify;
}

.sar-intro-section ul {
    list-style-type: disc; /* 'disc' pour des points pleins, 'circle' pour des vides */
    padding-left: 25px;    /* Important pour laisser de la place aux puces */
    margin-bottom: 20px;
}

.sar-intro-section ul li {
    margin-bottom: 8px;    /* Espace entre chaque point de la liste */
    line-height: 1.5;
}
/* Photos côte à côte */
.photo-pair {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
    overflow: hidden;
}
.sar-img {
    width: 50%;
    height: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.sar-img:hover {
    transform: scale(1.02); /* Petit zoom fluide */
    filter: brightness(1.1); /* Légère augmentation de la luminosité */
    z-index: 10; /* Pour que l'image zoomée passe au-dessus de l'autre */
}

/* Cartes Expertises */
.expertise-card {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom-right-radius: 25px; /* Ton arrondi spécifique */
}
.expertise-card h3 {
    font-size: 1.1rem;
    margin-top: 0;
    color: var(--tertiary-blue);
}
.expertise-card ul {
    list-style-type: disc;
    font-size: 0.9rem;
    padding-left: 20px;
}

.expertise-card ul li {
    line-height: 1.6em;
}

.sar-intro-section ul li {
    margin-bottom: 8px;    /* Espace entre chaque point de la liste */
    line-height: 1.5;
}

/* Gestion des sections et ancres */
.sar-section {
    padding-top: 20px;
    margin-bottom: 50px;
}

.sar-section p {
    text-align: justify;
}

/* Plateformes sur 2 colonnes */
.plateformes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: #fdfdfd;
    padding: 15px;
    border: 1px solid #eee;
}
.plateformes-grid ul { list-style-type: disc; padding-left: 20px; }

.plateformes-container {
    margin-top: 20px;
}

.plat-row {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px dashed #ddd; /* Optionnel : une petite séparation entre les deux groupes */
    padding-bottom: 20px;
}

/* Colonne de gauche (le titre du groupe) */
.plat-label {
    width: 200px;         /* Largeur fixe pour que les listes commencent au même niveau */
    flex-shrink: 0;      /* Empêche le titre de se rétrécir */
    font-weight: 700;
    color: gray;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding-right: 20px;
    line-height: 1.2;
}

/* Colonne de droite (la liste) */
.plat-list {
    flex-grow: 1;
}

.plat-list ul {
    display: grid;
    grid-template-columns: 1fr 1fr; /* On peut même mettre la liste sur 2 colonnes en interne */
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
    color: gray;
}

.plat-list li {
    margin-bottom: 5px;
    font-size: 0.95rem;
}

/* Thématiques */
.blue-banner-thematique {
    background-color: var(--tertiary-blue);
    color: white;
    padding: 10px;
    text-align: left;
    border-radius: 5px 5px 0 0;
    margin-top: 20px;
    font-weight: bold;
}

.thematiques-box {
    background-color: white; /* Ton background "blank" */
    border: 2px solid var(--tertiary-blue, #00aaff); /* Ta bordure bleue */
    border-top: none; /* TRÈS IMPORTANT : supprime le trait entre le bleu et le blanc */

    /* Arrondi uniquement en bas à droite */
    border-bottom-right-radius: 25px;

    padding: 15px 20px;
    margin-bottom: 30px;

    /* On force l'absence de marge haute pour coller à la bannière */
    margin-top: 0;

    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--tertiary-blue);
}

/* Composition sur 3 colonnes */
.composition-three-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Force 3 colonnes égales */
    gap: 30px;
    margin-top: 20px;
}

.comp-col h3 {
    font-size: 1rem;
    color: #0056b3;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.comp-col p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Smooth Scroll pour les ancres */
html {
    scroll-behavior: smooth;
}

/* Conteneur des 3 vignettes */
.composition-vignettes-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    align-items: stretch; /* Pour que toutes les vignettes fassent la même hauteur */
}

/* Style commun aux vignettes */
.vignette {
    flex: 1; /* Les 3 colonnes ont la même largeur */
    padding: 20px;
    border-bottom-right-radius: 25px; /* Ton arrondi signature */
    font-size: 0.9rem;
    line-height: 1.5;
}

.vignette h3 {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--tertiary-blue);
    text-transform: uppercase;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.vignette p {
    margin-bottom: 15px;
    line-height: 1.6em;
}

/* Variante 1 : Fond Gris */
.vignette-grey {
    background-color: #f2f2f2;
}

/* Variante 2 & 3 : Fond Blanc, Bordure Grise */
.vignette-border {
    background-color: white;
    border: 1px solid #cccccc;
}

#presentation, #plateformes, #thematiques, #composition {
    scroll-margin-top: 130px;
}

/* --- CONFIGURATION DES ÉCRANS MOBILES & TABLETTES --- */
@media (max-width: 768px) {
    .sar-layout {
        max-width: 100%;
    }
    /* 1. On passe le conteneur principal en colonne (plus de côte à côte) */
    .sar-main-container {
        flex-direction: column;
        padding: 10px;
    }

    /* 2. Transformation de la Sidebar en Menu Horizontal Sticky */
    .sar-sidebar {
        display: none;
    }

    .sar-sidebar ul {
        display: flex;
        justify-content: space-around;
        overflow-x: auto; /* Permet de swiper si les mots sont trop longs */
        white-space: nowrap;
        padding: 5px 10px;
        border: none;
    }

    .sar-sidebar ul li {
        margin: 0 10px;
        border: none;
        padding: 0;
    }

    .sar-sidebar ul li a {
        font-size: 0.85rem;
        padding: 8px 12px;
        background: #f8f9fa;
        border-radius: 20px;
        border: 1px solid #eee;
    }

    /* État actif en mobile */
    .sar-sidebar ul li a.active {
        background: orange;
        color: white !important;
        border-color: orange;
    }

    /* 3. Ajustement de la grille de contenu */
    .sar-grid-system {
        grid-template-columns: 1fr; /* Le texte et les vignettes s'empilent */
    }

    .photo-pair {
        flex-direction: column; /* Photos l'une sous l'autre sur petit écran */
    }

    .sar-img {
        width: 100%;
        height: auto;
    }

    /* 4. Composition (3 colonnes -> 1 colonne) */
    .composition-vignettes-container {
        flex-direction: column;
    }

    /* 5. Plateformes (On empile les labels au dessus des listes) */
    .plat-row {
        flex-direction: column;
    }

    .plat-label {
        width: 100%;
        margin-bottom: 10px;
    }

    .sar-intro-section {
        font-size: 14px;
    }

    .sar-section p {
        font-size: 14px !important;
    }

    .plat-list li {
        font-size: 14px;
    }
}