:root {
    --primary-color: #3a42ff;
    --bg-color: #f5f7fa;
    --text-color: #1a1a1a;
    --card-bg: #ffffff;
    --border-light: #eee;
    --footer-bg: #000000;
    --footer-text: #ffffff;
    --footer-padding-v: 40px;        /* espace haut/bas du footer */
    --footer-gap: 25px;              /* espace entre logo et texte */
    --footer-line-gap: 18px;         /* espace entre legal / adresse / copyright */	
	--footer-frise: 50px;            /* hauteur de la frise décorative */	
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);
    --font-main: "Segoe UI", Arial, sans-serif;
    --radius: 8px;
    --gap-grid: 20px 60px;
    --container-max: 1280px;
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Structure de base */
html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
}

main {
    flex: 1;
}

/* Container centré */
.container {
    max-width: var(--container-max);
    margin: auto;
    padding: 20px;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
    background-color: var(--card-bg);
    border-bottom: 3px solid var(--primary-color);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 60px;
}

.titles h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    text-align: center;
}

.lang-switch a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
}

/* ── Sous-titre ──────────────────────────────────────────── */
.sub-titles {
    font-size: 1.25rem;
    font-weight: 500;
    text-align: center;
    color: #555;
    margin-top: 20px;
    margin-bottom: 30px;
}

/* ── Grille des blocs ────────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 300px));
    gap: var(--gap-grid);
    justify-content: center;
    align-items: start;       /* blocs alignés en haut quand hauteurs différentes */
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

/* ── Carte ───────────────────────────────────────────────── */
.card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Image */
.card img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    display: block;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

/* Texte */
.card-text {
    flex: 1;                  /* s'étire pour égaliser la hauteur des cartes */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    font-weight: bold;
    text-align: center;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    position: relative;
    width: 100%;
    flex-shrink: 0;
    padding: var(--footer-padding-v) 0;
    font-family: var(--font-main);
    margin-top: 50px;
}

/* Frise décorative */
.footer::after {
    content: "";
    background: url("/img/footer-pattern.svg") repeat-x;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    z-index: 1;
}

.footer-inner {
    max-width: var(--container-max);
    margin: auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--footer-gap);
}

.footer-logo img {
    height: 60px;
}

.footer-text {
    max-width: 900px;
    font-size: 1rem;
    line-height: 1.6;
}

.footer-text .legal {
    margin-bottom: 0;
}

.footer-text .contact-address {
    margin-top: var(--footer-line-gap);
    line-height: 1.6;
}

.footer-text .contact-address a {
    color: var(--footer-text);
    text-decoration: underline;
    opacity: 0.85;
}

.contact-links {
    margin-top: var(--footer-line-gap);
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-links a {
    color: var(--footer-text);
    text-decoration: underline;
    opacity: 0.85;
}

.contact-links a:hover {
    opacity: 1;
}

.contact-links .separator {
    opacity: 0.4;
    user-select: none;     /* le | ne se sélectionne pas lors d'un copier-coller */
}

.footer-text .contact-address a:hover {
    opacity: 1;
}

.footer-text .copyright {
    margin-top: var(--footer-line-gap);
    margin-bottom: var(--footer-frise);  /* remplace le 60px fixe */
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px 40px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .logo img {
        margin-bottom: 10px;
    }

    /* Grille : 2 colonnes fixes sur mobile pour éviter
       les cartes à hauteurs disparates sur une seule colonne */
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px 20px;
        padding: 0 10px;
        align-items: stretch;   /* ← correction hauteur : toutes les cartes d'une ligne s'égalisent */
    }

    .card {
        max-width: 100%;
    }

    .card img {
        height: 120px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-text {
        text-align: center;
    }
}

@media (max-width: 400px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .card img {
        height: auto;
    }
}
