
/* Définition des couleurs vertes originales */
:root {
    --banner-bg: #212E3C;
    --title-text: #316C6C;
    --nav-text: #e0e0e0;
    --button-service-bg: #316C6C;
    --button-service-text: #FFFFFF;
    --primary-100: #0D6E6E;
    --primary-200: #4a9d9c;
    --primary-300: #afffff;
    --accent-100: #FF3D3D;
    --accent-200: #ffe0c8;
    --text-100: #FFFFFF;
    --text-200: #e0e0e0;
    --bg-100: #0D1F2D;
    --bg-200: #1d2e3d;
    --bg-300: #354656;
}

/* Style de base */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--bg-300);
    opacity: 0;
    animation: fadeIn 1s forwards;
    scroll-behavior: smooth;
    background-color: var(--bg-200);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

header {
    display: flex;
    flex-direction: column; /* Disposition en colonne */
    align-items: center; /* Centre les éléments horizontalement */
    padding: 0.1em 0.2em; /* Espace interne réduit */
    background-color: var(--bg-300);
    color: var(--text-100);
}

.header-title {
    margin-bottom: 0.1em; /* Espace minimal sous le titre */
    text-align: center;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.2em; /* Espacement minimal entre les liens et le bouton */
}

nav {
    display: flex;
    gap: 0.3em; /* Réduit l'espace entre les liens */
}

nav a {
    padding: 0.05em 0.2em; /* Espacement interne réduit */
    color: var(--primary-100);
    text-decoration: none;
    font-weight: bold;
    font-size: 1em; /* Taille de police conservée */
    transition: color 0.3s, transform 0.2s;
}

.cta-emergency {
    background-color: var(--accent-100);
    color: var(--text-100);
    border: none;
    padding: 0.4em 0.4em; /* Taille ajustée pour un bouton moins large */
    border-radius: 8px; /* Coins légèrement arrondis */
    font-weight: bold;
    font-size: 1.2em; /* Taille de texte maintenue pour visibilité */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-emergency:hover {
    background-color: var(--accent-200);
    transform: scale(1.05);
}
ul li::before {
    content: attr(data-icon); /* Ajoute l'emoji défini dans l'attribut data-icon */
    margin-right: 0.5em; /* Ajoute un espace entre l'emoji et le texte */
    font-size: 1.2em; /* Taille des emojis */
    vertical-align: middle; /* Aligne l'emoji au centre verticalement */
    color: var(--primary-100); /* Couleur de l'emoji (modifiable) */
}

/* Section d'accueil */
#home {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 80px 5%;
    background-color: #4a4a4a; /* Gris très foncé */
    text-align: center;
    box-sizing: border-box;
}

.hero-text {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.hero-text h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--text-100); /* Texte en blanc */
}

.hero-text p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-100); /* Texte en blanc */
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1em;
    text-decoration: none;
    border-radius: 5px;
    background-color: var(--primary-100);
    color: white;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--primary-200);
}


.phone-link {
    color: white; /* Texte en blanc */
    text-decoration: none; /* Supprime le soulignement par défaut */
    font-weight: bold; /* Texte en gras pour meilleure visibilité */
    transition: color 0.3s ease; /* Effet de transition pour le survol */
}

.phone-link:hover {
    color: var(--accent-200); /* Change la couleur lors du survol */
}
/* Section des services */
#services {
    padding: 4em 1em;
    text-align: center;
}

.services-container {
    display: flex;
    justify-content: center;
    gap: 2em; /* Espacement entre les cartes */
    flex-wrap: wrap; /* Permet le retour à la ligne si l'espace est insuffisant */
}

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 2em;
    width: 280px; /* Largeur fixe des cartes */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    cursor: pointer;
    text-align: center;
}

.service-card h3 {
    margin-bottom: 0.5em;
    font-size: 1.5em;
}

.service-card p {
    font-size: 1.1em;
    color: #555;
}

.service-card:hover {
    transform: translateY(-10px); /* Animation au survol */
}
/* Style des listes de la modale */


.catalogue-details li {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: var(--bg-200); /* Fond des items */
    color: var(--text-100); /* Couleur du texte */
    border-radius: 8px; /* Coins arrondis */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Ombre légère */
    font-family: 'Inter', sans-serif; /* Typographie générale */
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Icônes dans les listes */
.catalogue-details li::before {
    content: attr(data-icon); /* Utilise une icône définie dans l'attribut data-icon */
    margin-right: 10px;
    font-size: 1.5em;
    color: var(--primary-100); /* Couleur des icônes */
}

/* Effet de survol */
.catalogue-details li:hover {
    background-color: var(--primary-200); /* Couleur de survol */
    transform: scale(1.02); /* Légère mise en avant */
}

/* Styles pour les modales */
.modal-content {
    padding: 20px;
    background-color: var(--bg-300); /* Fond de la modale */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Ombre subtile */
    color: var(--text-100); /* Texte clair */
}
/* À propos */
#about {
    padding: 4em 1em;
    background-color: var(--bg-300);
    text-align: center;
}

.about-section {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    padding: 2em;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-section h3 {
    color: var(--primary-100);
    margin-top: 1em;
    font-size: 1.5em;
}

.about-section p {
    margin: 0.5em 0 1.5em;
    line-height: 1.6;
    color: var(--bg-300);
}

/* Témoignages */
#testimonials {
    padding: 4em 1em;
    text-align: center;
}

.testimonial-card {
    max-width: 500px;
    margin: 1.5em auto;
    padding: 2em;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-style: italic;
}

.testimonial-card span {
    display: block;
    margin-top: 1em;
    font-weight: bold;
    color: var(--primary-100);
}

/* Contact */
#contact {
    padding: 4em 1em;
    text-align: center;
}

#contact p {
    margin-bottom: 1em;
    font-size: 1.1em;
}

form {
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
}

label, input, textarea, button {
    margin: 0.5em 0;
}

input, textarea {
    padding: 0.7em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

/* Bouton de soumission dans le formulaire */
button.cta-button {
    background-color: var(--primary-100);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    padding: 0.7em 1.5em;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

button.cta-button:hover {
    background-color: var(--primary-200);
    transform: scale(1.05);
}

/* Historique des Vulnérabilités */
#compact-vulnerability-table {
    padding: 20px;
    text-align: center;
}

#compact-vulnerability-table h2 {
    text-align: center;
    margin-bottom: 20px;
}

.description-table-container,
.table-description-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Style du tableau */
.compact-table-container,
.table-container {
  flex: 2; /* Augmente la flexibilité pour prendre plus de place */
  max-width: 700px; /* Largeur maximale augmentée pour le tableau */
  width: 100%; /* Assure que le tableau prend toute la largeur disponible */
  margin: 0 auto; /* Centre le tableau horizontalement */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Style général du tableau */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

thead {
    background-color: var(--primary-100);
    color: white;
}

th, td {
    padding: 8px;
    text-align: center;
}

/* Style pour le texte de description */
.description {
    flex: 1;
    max-width: 300px;
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-200);
    text-align: left;
}

/* Barres de Criticité */
.color-bar {
    width: 50px;
    height: 10px;
    border-radius: 5px;
    margin: auto;
    animation: pulse 2s infinite alternate;
}

.critical {
    background-color: var(--accent-100);
}

.moderate {
    background-color: var(--primary-200);
}

.low {
    background-color: var(--primary-300);
}

/* Animation barres */
.blue-bar {
    width: 60px;
    height: 10px;
    background-color: rgba(135, 206, 250, 0.5);
    border-radius: 5px;
    margin: auto;
    position: relative;
    overflow: hidden;
}

.animated-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--primary-100);
    border-radius: 5px;
    transform: scaleX(0);
    transform-origin: left;
    animation: fillFadeLoop 4s ease-in-out infinite;
}

@keyframes fillFadeLoop {
    0% {
        transform: scaleX(0);
        opacity: 1;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(1);
        opacity: 0;
    }
}

/* Délais d'animation en cascade pour chaque ligne */
tbody tr:nth-child(1) .animated-bar::before {
    animation-delay: 0s;
}

tbody tr:nth-child(2) .animated-bar::before {
    animation-delay: 0.5s;
}

tbody tr:nth-child(3) .animated-bar::before {
    animation-delay: 1s;
}

tbody tr:nth-child(4) .animated-bar::before {
    animation-delay: 1.5s;
}

/* Responsivité */
@media (max-width: 768px) {
    .description-table-container,
    .table-description-container {
        flex-direction: column;
        align-items: center;
    }
    .compact-table-container,
    .table-container {
        max-width: 100%;
    }
    .description {
        max-width: 100%;
        text-align: center;
    }
    .services-container {
        flex-direction: column; /* Les cartes s'empilent verticalement */
        align-items: center; /* Centre les cartes */
        gap: 1.5em; /* Espacement entre les cartes */
    }

    .service-card {
        width: 90%; /* Prend presque toute la largeur sur mobile */
        max-width: 400px; /* Limite la largeur maximale */
    }


}


.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Fond semi-transparent */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex; /* Affiche la modale */
}

.modal-content {
    background-color: var(--bg-300);
    color: var(--text-100);
    border-radius: 10px;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: left;
}

.catalogue-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1000; /* S'assurer qu'elle est au-dessus de tout */
}

.close-btn:hover {
    color: white;
}

.highlight-blue {
    color: var(--primary-100); /* Bleu personnalisé */
}




/* Style des statuts */
.status {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 3px;
    color: white;
}

/* Statut En cours en rouge */
.status.pending {
    background-color: var(--accent-100); /* Rouge vif */
}

/* Statut Bloqué en vert */
.status.blocked {
    background-color: var(--primary-300); /* Vert */
}

/* Statut Investiguer en orange */
.status.investig {
    background-color: var(--primary-200); /* Orange */
}

/* Style général pour les lignes "new-alert" */
.new-alert {
    font-weight: bold;
}


/* Style plus sobre pour les titres */
#services h2,
#compact-vulnerability-table h3 {
    font-size: 2em; /* Taille standard pour les titres */
    color: var(--text-200); /* Gris correspondant à "Bienvenue chez Les Compagnons de la Cyber" */
    text-transform: none; /* Aucun changement sur les majuscules */
    text-shadow: none; /* Suppression de l'ombre */
    margin-bottom: 15px; /* Espacement standard */
}


/* Restaurer les styles des tableaux */
.compact-table-container,
.table-container {
    background-color: white; /* Fond blanc originel */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre originelle */
    overflow: hidden;
}

/* Style général du tableau */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

thead {
    background-color: #0073e6; /* Bleu originel */
    color: white;
}

th, td {
    padding: 8px;
    text-align: center;
}


/* Restaurer les styles pour compact-table-container et table-container */
.compact-table-container,
.table-container {
    background-color: white; /* Fond blanc */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Style des tables */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

thead {
    background-color: #0073e6; /* Bleu */
    color: white;
}

th, td {
    padding: 8px;
    text-align: center;
}

/* Barres de Criticité */
.color-bar {
    width: 50px;
    height: 10px;
    border-radius: 5px;
    margin: auto;
    animation: pulse 2s infinite alternate;
}

.critical {
    background-color: #FF4C4C; /* Rouge critique */
}

.moderate {
    background-color: #FFA500; /* Orange modéré */
}

.low {
    background-color: #4CAF50; /* Vert faible */
}

/* Animation des barres */
.blue-bar {
    width: 60px;
    height: 10px;
    background-color: rgba(135, 206, 250, 0.5); /* Bleu clair */
    border-radius: 5px;
    margin: auto;
    position: relative;
    overflow: hidden;
}

.animated-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #0073e6; /* Bleu */
    border-radius: 5px;
    transform: scaleX(0);
    transform-origin: left;
    animation: fillFadeLoop 4s ease-in-out infinite;
}

@keyframes fillFadeLoop {
    0% {
        transform: scaleX(0);
        opacity: 1;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(1);
        opacity: 0;
    }
}

/* Statuts */
.status.pending {
    background-color: #FF4C4C; /* Rouge pour en cours */
}

.status.blocked {
    background-color: #4CAF50; /* Vert pour bloqué */
}

.status.investig {
    background-color: #FFA500; /* Orange pour investiguer */
}


/* Mettre à jour la couleur de la section Contact */
#contact p {
    color: #ffffff; /* Couleur identique à celle du texte dans la section d'accueil */
    font-size: 1.2em; /* Taille légèrement augmentée pour uniformité */
    line-height: 1.6; /* Espacement pour une meilleure lisibilité */
}


@media (max-width: 768px) {
  header {
      padding: 0.05em 0.1em; /* Presque aucun espace interne */
  }
  .nav-container {
      gap: 0.1em; /* Espacement minimal entre les éléments */
  }
  nav a {
      font-size: 1em; /* Taille de police inchangée */
      padding: 0.05em 0.1em; /* Espacement interne ultra-réduit */
  }
  .cta-emergency {
      padding: 0.3em 0.6em; /* Réduction légère du padding pour les écrans étroits */
      font-size: 1.1em; /* Taille de texte légèrement réduite */
  }

    nav {
      flex-direction: column; /* Empile les liens verticalement sur petits écrans */
      gap: 0.5em;
    }
    body {
        padding: 1em;
    }

    p {
        text-align: justify; /* Justification pour un alignement plus esthétique */
        line-height: 1.8; /* Espacement entre les lignes */
        word-spacing: 0.1em; /* Espacement entre les mots */
        font-size: clamp(1em, 2.5vw, 1.2em); /* Taille de texte adaptative */
    }

    h2, h3 {
        font-size: clamp(1.2em, 3vw, 1.5em); /* Titres adaptatifs pour mobile */
    }
}


/* Garantir la visibilité du titre "À propos de nous 👤" */
#about h2 {
    font-size: 1.8em; /* Taille légèrement augmentée pour mobile */
    color: var(--text-100); /* Couleur blanche pour un bon contraste */
    text-align: center;
    margin-bottom: 20px;
}

/* S'assurer que ce titre reste visible sur mobile */
@media (max-width: 768px) {
    #about h2 {
        font-size: 1.5em; /* Ajustement de taille pour écrans étroits */
        padding: 0.5em; /* Ajout d'un espacement interne */
    }
}


/* Ajustements pour la section "Nos Services" sur mobile */
@media (max-width: 768px) {
  /* En-tête - Responsivité */
  header {
      flex-direction: column; /* Empile les éléments verticalement */
      padding: 1em; /* Maintient un espacement agréable */
  }

  .nav-container {
      flex-direction: column; /* Les liens et le bouton passent en colonne */
      gap: 1em; /* Espacement uniforme entre les éléments */
      width: 100%; /* Prend toute la largeur disponible */
      align-items: center; /* Centre les éléments horizontalement */
  }

  nav {
      justify-content: center;
      flex-wrap: wrap; /* Permet aux liens de s'adapter si nécessaire */
  }

  .cta-emergency {
      width: 90%;
      max-width: 300px;
      text-align: center;
  }

    container {
        display: flex;
        flex-direction: column; /* Les cartes s'empilent verticalement */
        align-items: center;
        gap: 1.5em; /* Espacement entre les cartes */
    }

    .service-card {
        width: 90%; /* Les cartes occupent presque toute la largeur */
        padding: 1.5em; /* Ajout d'espacement interne pour un rendu harmonieux */
        font-size: 1em; /* Taille de texte légèrement augmentée */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Ombre subtile */
    }

    .service-card h3 {
        font-size: 1.2em; /* Augmenter la taille des titres */
        margin-bottom: 0.5em;
    }

    .service-card p {
        font-size: 1em; /* Améliorer la lisibilité du texte */
        line-height: 1.6; /* Espacement entre les lignes */
    }
    .modal-content {
    max-width: 90%; /* Largeur maximale sur mobile */
    }
}


/* Ajuster la lisibilité des titres */
#about h2, #contact h2 {
    font-size: 2em; /* Augmenter légèrement la taille */
    color: var(--text-100); /* Couleur blanche pour un bon contraste */
    text-align: center;
    margin-bottom: 20px;
}

/* Styles pour les labels des champs de formulaire */
form label {
    font-size: 1.1em; /* Taille légèrement augmentée */
    color: var(--text-200); /* Texte gris clair pour le contraste */
    margin-bottom: 0.5em;
}

/* Styles pour les champs de formulaire */
form input, form textarea {
    background-color: var(--bg-200); /* Fond gris clair pour contraste */
    color: var(--text-100); /* Texte blanc pour bonne lisibilité */
    border: 1px solid var(--primary-200); /* Bordure visible */
    padding: 0.7em;
    border-radius: 5px;
    font-size: 1em;
}

/* Styles pour le bouton de formulaire */
form button.cta-button {
    font-size: 1.2em; /* Taille légèrement augmentée */
    padding: 0.8em 1.5em; /* Espacement harmonieux */
    background-color: var(--accent-100); /* Couleur d'accent pour visibilité */
    color: var(--text-100); /* Texte en blanc */
}

form button.cta-button:hover {
    background-color: var(--accent-200); /* Couleur plus claire au survol */
}

/* Ajustements pour mobile */
@media (max-width: 768px) {
    #about h2, #contact h2 {
        font-size: 1.8em; /* Réduction pour écrans étroits */
    }

    form input, form textarea {
        font-size: 1.1em; /* Taille adaptée pour mobile */
    }

    form button.cta-button {
        width: 90%; /* Bouton plus large sur mobile */
        max-width: 300px; /* Limiter la largeur maximale */
        font-size: 1em; /* Taille adaptée */
    }
}

/* Apply the banner background and title text */
header {
    background-color: var(--banner-bg);
}

.header-title h1 {
    color: var(--title-text);
}

/* Navigation links in gray */
nav a {
    color: var(--nav-text);
    font-weight: bold;
    text-decoration: none;
}

nav a:hover {
    color: var(--title-text);
}

/* Service button styles */
.cta-button {
    background-color: var(--button-service-bg);
    color: var(--button-service-text);
    font-weight: bold;
    border: none;
    padding: 0.7em 1.5em;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: var(--title-text);
    transform: scale(1.05);
}
