/* ===============================================
   DÉFINITION DES VARIABLES GLOBALES (Design Tokens)
   Ce bloc définit les couleurs, tailles, ombres et transitions
   utilisés dans tout le site, assurant une cohérence visuelle.
================================================ */
:root {
    /* --- 🎨 PALETTE DE COULEURS DE BASE --- */
    
    /* COULEURS SECONDAIRES / FONCÉES (Arrière-plans, Header, Footer) */
    --navy-dark: #0a192f;      /* Bleu marine très foncé (Base des fonds sombres) */
    --navy: #1c2b42;           /* Bleu marine standard (Utilisé pour le contraste) */
    --navy-soft: #283747;      /* Bleu marine doux (Fonds moins agressifs ou titres) */

    /* COULEURS PRIMAIRES / ACCENT (Boutons, Icônes, Éléments interactifs) */
    --primary: #5eead4;        /* Vert/Cyan vif (Couleur d'accentuation principale du thème) */
    --primary-dark: #2dd4bf;   /* Variante plus foncée de l'accent (ex: au survol) */
    --primary-light: #99f6e4;  /* Variante plus claire de l'accent (ex: fonds légers) */

    /* COULEURS NEUTRES / TYPOGRAPHIE */
    --white: #ffffff;          /* Blanc pur */
    --gray-light: #f8fafc;     /* Gris très clair (Arrière-plans légers des sections) */
    --gray: #e2e8f0;           /* Gris clair (Bordures, lignes de séparation) */
    --text: #1e293b;           /* Gris très foncé (Couleur principale du texte pour le fond blanc) */
    --muted: #64748b;          /* Gris moyen/bleuté (Texte secondaire ou descriptions) */
    --text-light: #e0e6f0;     /* Texte clair (Utilisé sur les fonds --navy-dark) */
    
    /* UTILITAIRES DE COULEUR */
    --primary-rgb: 94, 234, 212; /* Valeur RGB de --primary (Utilisée uniquement pour générer des ombres translucides) */

    /* --- 📏 TAILLES & STYLISME --- */

    /* RAYONS DE BORDURE (Border Radius) */
    --radius-lg: 30px;         /* Grand rayon (Utilisé pour les cartes, blocs principaux) */
    --radius-md: 18px;         /* Rayon moyen (Utilisé pour les boutons, champs de formulaire) */

    /* TRANSITIONS */
    --transition: 0.3s ease-out; /* Durée et type de transition (pour des animations douces) */

    /* OMBRES (Box Shadow) */
    --shadow: 0 25px 60px rgba(15, 23, 42, 0.18);   /* Ombre principale (pour les blocs mis en avant) */
    --shadow-soft: 0 15px 35px rgba(15, 23, 42, 0.12); /* Ombre douce (pour les cartes ou blocs standards) */
    --shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.08); /* Petite ombre (pour les éléments discrets) */
}

/* Texte noir pour toutes les sections du body sauf coordonnées */
body .section:not(#contact) {
  color: #000; /* texte noir pour toutes les sections */
}

body .section:not(#contact) p,
body .section:not(#contact) li,
body .section:not(#contact) h2,
body .section:not(#contact) h3 {
  color: #000;
}
/* Forcer les icônes spécifiques à rester droites */
.collapsible-header .fa-truck, 
.collapsible-header .fa-leaf,
.collapsible-header .fa-user-tie,
.collapsible-header .fa-handshake {
    transform: none !important;
}
.collapsible-header .fa-leaf,
.collapsible-header .fa-charging-station,
.collapsible-header .fa-smog {
    transform: none !important;
}

/* =============================
   SECTIONS & CARDS HOMOGENES
============================= */
.section {
    padding: 50px 20px;
    background-color: var(--gray-light);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 30px;
    color: var(--muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* =============================
   GRID LAYOUT
============================= */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

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

/* =============================
   COLLAPSIBLE CARDS
============================= */
.collapsible-item {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 250px; /* hauteur minimale uniforme */
}

.collapsible-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
    font-size: 1rem;
    color: var(--text);
}

.collapsible-header h3 {
    margin: 0;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-service {
    font-size: 1.4rem;
    color: var(--primary);
}

.toggle-icon {
    transition: transform var(--transition);
}

/* On cible le header de cette carte spécifique */
.service-card .collapsible-header {
  justify-content: flex-start !important; /* Force tout le monde à gauche */
  gap: 15px; /* Définit l'espace entre l'icône undo et le texte */
}

/* On s'assure que le titre ne prend pas toute la place */
.service-card .collapsible-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  width: 100%; /* Permet de gérer la flèche à l'intérieur */
  justify-content: space-between; /* Pousse la petite flèche (chevron) au bout du texte */
}

/* =============================
   COLLAPSIBLE CONTENT
============================= */
.collapsible-content {
    padding: 15px 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.collapsible-item.active .collapsible-content {
    max-height: 900px;
}

/* Listes compactes sans puces */
.collapsible-content ul {
    list-style: none; /* supprime les points noirs */
    padding-left: 0;
    margin: 10px 0 0 0;
}

.collapsible-content li {
    margin-bottom: 5px;
}

/* Boutons */
.collapsible-content a.btn-primary {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background-color: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background-color var(--transition);
}

.collapsible-content a.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Rotation icône */
.collapsible-item.active .toggle-icon {
    transform: rotate(180deg);
}

/* Texte secondaire */
.secondary-text {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* =============================
   RESPONSIVE
============================= */
@media (max-width: 768px) {
    .section {
        padding: 40px 15px;
    }
    .section-title {
        font-size: 1.7rem;
    }
    .section-subtitle {
        font-size: 0.95rem;
    }
}
