/* ==========================================================================
   VERTURA SOLUTIONS - STYLES PRINCIPAUX
   Version améliorée avec accessibilité, performance et maintenabilité
   ========================================================================== */

/* --- VARIABLES CSS --- */
:root {
    /* Couleurs */
    --primary-color: #22C5CF;
    --primary-hover: #1ba3ac;
    --primary-light: #e0f7fa;
    --dark-blue: #020A1E;
    --dark-blue-hover: #1a253a;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #757575; /* Amélioré pour WCAG AA - ratio 4.54:1 */
    --light-gray: #F4F6F8;
    --white: #ffffff;
    --accent-orange: #FF6B6B;
    --accent-purple: #9B59B6;
    --accent-yellow: #FFB347;

    /* Couleurs des produits */
    --color-enfance: #25985B;
    --color-portail: #856af9;
    --color-resa: #E69239;
    --color-cimetiere: #4D56A3;
    --color-etatcivil: #3B6384; /* Etatcivil.services */

    /* Polices */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Espacements */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-xxl: 80px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;

    /* Breakpoints (pour référence dans le code) */
    --breakpoint-mobile: 768px;
    --breakpoint-tablet: 1024px;
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Compense la hauteur du header sticky */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* --- SKIP LINK (Accessibilité) --- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--dark-blue);
    color: var(--white);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* --- TYPOGRAPHIE --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark-blue);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- UTILITAIRES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.highlight {
    color: var(--primary-color);
}

.text-center {
    text-align: center;
}

.visually-hidden,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- BOUTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    text-decoration: none;
    font-family: var(--font-body);
}

.btn:focus-visible {
    outline: 3px solid var(--dark-blue);
    outline-offset: 3px;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 207, 0.3);
}

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

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--dark-blue-hover);
    border-color: var(--dark-blue-hover);
}

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

.btn-white:hover,
.btn-white:focus {
    background-color: var(--dark-blue);
    color: var(--white);
    border-color: var(--dark-blue);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover,
.btn-outline:focus {
    background: var(--primary-color);
    color: var(--white);
}

/* --- HEADER --- */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-blue);
    letter-spacing: -1px;
    transition: var(--transition-normal);
    display: inline-block;
}

.logo a:hover,
.logo a:focus {
    color: var(--primary-color);
    opacity: 0.9;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
    transition: var(--transition-normal);
}

.logo span {
    color: var(--primary-color);
}

/* Navigation */
.navbar > ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

.navbar > ul > li {
    position: relative;
}

.navbar a {
    font-weight: 600;
    color: var(--dark-blue);
    font-size: 0.95rem;
    padding: var(--spacing-xs) 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.navbar a:hover::after,
.navbar a:focus::after {
    width: 100%;
}

.navbar a:hover,
.navbar a:focus {
    color: var(--primary-color);
}

/* Dropdown Menu */
.navbar .dropdown {
    position: relative;
}

.navbar .dropdown-toggle {
    font-weight: 600;
    color: var(--dark-blue);
    font-size: 0.95rem;
    padding: var(--spacing-xs) 0;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    font-family: inherit;
}

.navbar .dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.navbar .dropdown-toggle:hover::after,
.navbar .dropdown-toggle:focus::after {
    width: 100%;
}

.navbar .dropdown-toggle:hover,
.navbar .dropdown-toggle:focus {
    color: var(--primary-color);
}

.navbar .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    padding: var(--spacing-xs) 0;
    margin-top: 10px;
    z-index: 1000;
}

.navbar .dropdown:hover .dropdown-menu,
.navbar .dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar .dropdown-menu li {
    list-style: none;
}

.navbar .dropdown-menu a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-md);
    color: var(--dark-blue);
    transition: all var(--transition-fast);
}

.navbar .dropdown-menu a::after {
    display: none;
}

.navbar .dropdown-menu a:hover,
.navbar .dropdown-menu a:focus {
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding-left: calc(var(--spacing-md) + 5px);
}

.navbar .dropdown-toggle .fa-chevron-down {
    font-size: 0.7rem;
    transition: transform var(--transition-normal);
}

.navbar .dropdown:hover .dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

/* --- BREADCRUMB --- */
.breadcrumb-nav {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-normal);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb [aria-current="page"] {
    color: var(--text-light);
    font-weight: 600;
}

/* Menu Mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-blue);
    cursor: pointer;
    padding: 12px 16px;
    z-index: 1001;
    min-width: 50px;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.mobile-menu-toggle:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle i {
    pointer-events: none;
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Empêcher les icônes de bloquer les clics sur les boutons */
button i,
button svg,
.btn i,
.btn svg {
    pointer-events: none;
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    padding: var(--spacing-xxl) 0 100px;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    margin-bottom: var(--spacing-md);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Barre de recherche projet */
.project-finder {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

.finder-label {
    font-weight: 700;
    color: var(--dark-blue);
    padding-left: 10px;
}

.project-finder select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    min-width: 250px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition-normal);
}

.project-finder select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 207, 0.1);
}

/* --- TRUST BAR --- */
.trust-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.trust-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
    gap: var(--spacing-lg);
}

.trust-item .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.trust-item .label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: var(--spacing-xs);
    display: block;
}

/* --- SECTIONS --- */
.section {
    padding: var(--spacing-xxl) 0;
}

.bg-light {
    background-color: var(--light-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header.text-left {
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

/* --- CARDS --- */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Hub Layout pour page logiciels (Portail.services au centre) */
.solutions-grid.hub-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    padding-bottom: 20px;
}

/* Ligne horizontale de connexion sous le Portail */
.solutions-grid.hub-layout::before {
    content: '';
    position: absolute;
    top: calc(50% - 15px);
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg,
        var(--color-enfance) 0%,
        var(--color-resa) 25%,
        var(--color-portail) 50%,
        var(--color-cimetiere) 75%,
        var(--color-etatcivil) 100%
    );
    z-index: 0;
    border-radius: 2px;
}

/* Connecteur central vertical (de la ligne au Portail) */
.solutions-grid.hub-layout::after {
    content: '';
    position: absolute;
    top: calc(50% - 75px);
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 60px;
    background: var(--color-portail);
    z-index: 0;
    border-radius: 2px;
}

.card.hub-center {
    grid-column: 1 / -1; /* Prend toute la largeur (4 colonnes) */
    grid-row: 1 / 2;
    background: linear-gradient(135deg, rgba(133, 106, 249, 0.08) 0%, rgba(133, 106, 249, 0.03) 100%);
    border: 2px solid var(--color-portail);
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 40px rgba(133, 106, 249, 0.2);
    margin-bottom: 20px;
}

.card.hub-center::before {
    content: "Portail Citoyen";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-portail);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    /* text-transform: uppercase; */
    letter-spacing: 0.5px;
}

/* Connecteurs verticaux depuis chaque logiciel */
.card.hub-peripheral {
    z-index: 1;
    background: var(--white);
    position: relative;
}

.card.hub-peripheral::after {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    z-index: 0;
}

.card.hub-peripheral:nth-child(2)::after {
    background: var(--color-enfance);
}

.card.hub-peripheral:nth-child(3)::after {
    background: var(--color-resa);
}

.card.hub-peripheral:nth-child(4)::after {
    background: var(--color-cimetiere);
}

.card.hub-peripheral:nth-child(5)::after {
    background: var(--color-etatcivil);
}

.card {
    background: var(--white);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
    border-top: 4px solid transparent;
    position: relative;
}

.card:hover,
.card:focus-within {
    transform: translateY(-5px);
    border-top-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    line-height: 1;
}

.color-1 { color: var(--color-cimetiere); }  /* Cimetiere.services */
.color-2 { color: var(--color-enfance); }    /* Famille.services */
.color-3 { color: var(--color-resa); }       /* Resa.services */
.color-4 { color: var(--color-portail); }    /* Portail.services */
.color-5 { color: var(--color-etatcivil); }  /* Etatcivil.services */

/* --- LOGOS SOLUTIONS (Homepage) --- */
.solution-logo-box {
    flex-shrink: 0;
}

.solution-logo {
    max-height: 100px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.solution-logo-box-small {
    margin-bottom: var(--spacing-md);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.solution-logo-small {
    height: 80px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .solution-logo {
        max-height: 80px;
        max-width: 160px;
    }

    .solution-logo-box-small {
        height: 60px;
    }

    .solution-logo-small {
        height: 60px;
        max-width: 120px;
    }
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.link-arrow {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap var(--transition-normal);
}

.link-arrow:hover,
.link-arrow:focus {
    gap: 12px;
}

/* --- SERVICES LIST --- */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-item {
    padding: var(--spacing-md);
}

.service-item svg,
.service-item i {
    font-size: 2.5rem;
    color: var(--dark-blue);
    margin-bottom: 15px;
}

.service-item h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.service-item p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --- ACTUALITÉS --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    padding: 28px;
    border-radius: 10px;
    border-left: 4px solid var(--dark-blue);
    transition: var(--transition-normal);
}

.news-card:hover,
.news-card:focus-within {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-lighter);
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-card h3,
.news-card h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.news-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.news-card a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-card a:hover,
.news-card a:focus {
    gap: 8px;
}

/* --- CTA SECTION --- */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 15px;
}

.cta-section p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--dark-blue);
    color: #b0b8c4;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    font-size: 0.9rem;
}

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

.footer-col h3,
.footer-col h4 {
    color: var(--white);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    transition: var(--transition-normal);
}

.footer-col ul li a:hover,
.footer-col ul li a:focus {
    color: var(--primary-color);
}

.footer-col p {
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.3rem;
    color: var(--white);
    transition: var(--transition-normal);
}

.social-links a:hover,
.social-links a:focus {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    /* Header mobile */
    .navbar {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: var(--spacing-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        z-index: 999;
    }

    .navbar.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .navbar > ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .navbar > ul > li {
        width: 100%;
        border-bottom: 1px solid var(--light-gray);
    }

    .navbar a {
        display: block;
        padding: 15px 10px;
    }

    .navbar .dropdown-toggle {
        width: 100%;
        text-align: left;
        padding: 15px 10px;
        justify-content: space-between;
    }

    /* Dropdown mobile */
    .navbar .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--light-bg);
        margin: 0;
        padding: 0;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .navbar .dropdown.open .dropdown-menu {
        max-height: 400px;
    }

    .navbar .dropdown-menu a {
        padding: 12px 10px 12px 30px;
        font-size: 0.9rem;
    }

    .navbar .dropdown-menu a:hover {
        padding-left: 35px;
    }

    .navbar .dropdown-toggle .fa-chevron-down {
        float: right;
    }

    .navbar .dropdown.open .dropdown-toggle .fa-chevron-down {
        transform: rotate(180deg);
    }

    .header-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Hero mobile */
    .hero {
        padding: var(--spacing-xl) 0 var(--spacing-xl);
    }

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

    .hero-content p {
        font-size: 1rem;
    }

    .project-finder {
        flex-direction: column;
        border-radius: 20px;
        width: 100%;
    }

    .project-finder select {
        width: 100%;
        min-width: auto;
    }

    .project-finder .btn {
        width: 100%;
    }

    /* Trust bar mobile */
    .trust-grid {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    /* Sections mobile */
    .section {
        padding: var(--spacing-xl) 0;
    }

    .section-header.text-left {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Cards mobile */
    .solutions-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* Hub Layout responsive */
    .solutions-grid.hub-layout {
        grid-template-columns: repeat(2, 1fr);
    }

    .card.hub-center {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .solutions-grid.hub-layout {
        grid-template-columns: 1fr;
    }

    .solutions-grid.hub-layout::before,
    .solutions-grid.hub-layout::after {
        display: none;
    }

    .card.hub-peripheral::after {
        display: none;
    }

    .card.hub-center {
        grid-column: 1 / -1;
        grid-row: auto;
        margin-top: 20px;
    }

    .services-list {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-xxl: 60px;
        --spacing-xl: 40px;
        --spacing-lg: 30px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .services-list {
        grid-template-columns: 1fr;
    }
}

/* --- ACTUALITÉS / NEWS --- */
.actualites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.actualite-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.actualite-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.actualite-image {
    height: 200px;
    overflow: hidden;
}

.actualite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.actualite-card:hover .actualite-image img {
    transform: scale(1.05);
}

.actualite-content {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.actualite-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-blue);
}

.actualite-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.actualite-card .btn {
    align-self: flex-start;
}

/* Page article individuel */
.actualite-detail-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.actualite-detail-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.actualite-image-principale {
    margin: calc(var(--spacing-lg) * -1) 0 var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.actualite-image-principale .container {
    max-width: 900px;
}

.actualite-image-principale img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.actualite-contenu {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.actualite-contenu h2,
.actualite-contenu h3 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.actualite-contenu p {
    margin-bottom: var(--spacing-md);
}

.actualite-contenu ul,
.actualite-contenu ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.actualite-contenu li {
    margin-bottom: var(--spacing-xs);
}

/* --- PRINT STYLES --- */
@media print {
    .header,
    .mobile-menu-toggle,
    .cta-section,
    .footer {
        display: none;
    }

    body {
        color: #000;
    }

    a {
        text-decoration: underline;
    }
}

/* Social Media List (Footer) - Added for updated footer */
.social-media-list {
    display: flex;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none; /* Ensure no bullets */
}

/* Reset li margin that might come from .footer-col ul li */
.footer-col .social-media-list li {
    margin-bottom: 0;
}

.social-media-list a {
    color: var(--white);
    font-size: 1rem; /* Reset base size, icon sets size */
    transition: var(--transition-normal);
    display: block;
    line-height: 1;
}

.social-media-list a:hover,
.social-media-list a:focus {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* --- MOBILE TOUCH TARGET & ACCESSIBILITY FIXES --- */
@media (max-width: 768px) {
    /* Minimum 48px touch targets (Google requirement) */
    .btn,
    .link-arrow,
    .navbar a,
    .navbar .dropdown-toggle {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }

    /* Footer links spacing */
    .footer-col ul li {
        margin-bottom: 4px;
    }

    .footer-col ul li a {
        display: block;
        padding: 8px 0;
        min-height: 44px;
        line-height: 28px;
    }

    /* Social media touch targets */
    .social-media-list a {
        min-width: 48px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Prevent horizontal overflow */
    .container {
        overflow-x: hidden;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    /* Ensure readable font sizes on mobile (min 14px) */
    .service-item p,
    .card p,
    .news-card p {
        font-size: 0.95rem;
    }

    .footer {
        font-size: 0.9rem;
    }
}
