/* =========================================================
   🎨 formations.css — Styles globaux pour les FORMATIONS
========================================================= */

/* =========================================================
   🎨 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: 5px;
    --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: var(--color-text-medium);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.content-align-logo {
    margin-top: var(--spacing-xl);
}

/* Grille 3 colonnes */
.formations-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: min(90%, 1600px);
    box-sizing: border-box;
    margin: 40px auto;
    padding: 0 20px;
}

/* Carte */
.formation-card {
    background: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.formation-text-content {
    width: 100%; /* Occupe toute la largeur */
    flex-grow: 1;
}

.formation-text-content ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.formation-text-content li {
    margin-bottom: 8px;
    line-height: 1.45;
    font-size: 18px;
    color: #707070;
}

.formation-card + .formation-card .formation-text-content {
    border-left: 1px solid #ccc;
    margin-left: -10px;
    /*padding-left: 40px;*/
}

/* Images */
.formation-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

/* Titre */
.formation-title {
    background-color: #278EE1;
    color: #fff;
    padding: 15px;
    font-size: 1.2rem;
    margin: 0;
    /*text-align: center;*/
    font-weight: 700;
}

/* Texte */
.formation-card p {
    padding: 20px;
    margin: 0;
    color: #707070;
    line-height: 1.6;
    font-size: 18px;
    text-align: justify;
}

/* Responsive tablette */
@media (max-width: 992px) {
    .formations-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive mobile */
@media (max-width: 768px) {
    .formations-layout {
        grid-template-columns: 1fr;
        max-width: 95%; /* On élargit un peu sur mobile */
        gap: 30px; /* Espace entre les cartes empilées */
    }

    /* 1. SUPPRIMER LES LIGNES VERTICALES */
    /* On cible la bordure qu'on avait mise sur la description */
    .formation-card + .formation-card .formation-text-content {
        border-left: none !important;
        margin-left: 0 !important;
        padding-left: 20px !important;
        border-top: none !important; /* Au cas où une autre règle en aurait mis une */
    }

    /* 2. RÉDUIRE LA TAILLE DE LA POLICE */
    .formation-title {
        font-size: 1rem; /* Taille réduite (ex: 16px au lieu de 1.2rem) */
        padding: 10px;   /* On réduit aussi un peu le rembourrage bleu */
    }

    .formation--text-content p {
        font-size: 0.9rem; /* Réduit aussi le texte du paragraphe si besoin */
        line-height: 1.4;  /* Améliore la lisibilité sur petit écran */
    }

    /* Optionnel : Ajuster la hauteur de l'image sur mobile */
    .formation-card img {
        height: 200px;
    }

    .formation-card p {
        padding: 20px 5px;
    }
}
