/* Styles généraux pour le corps et les éléments de base */
body {
    background-color: #fcfcfc;
    color: #041e42;
    font-family: quicksand, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

/* Styles pour les titres */
body p {
    font-family: inherit;
    font-style: normal;
    font-size: 2.0em;
    text-align: center;
    text-indent: 0em;
    color: #041e42;
    margin: 5% 0% 5% 0%;
    text-decoration: underline;
    text-decoration-color: #ff8000;
}

/* Style pour la phrase clé */
.slogan {
  font-size: 1.0em;
  font-style: italic;
  font-weight: normal;
  color: #fff;
  text-decoration: none;
  text-align: right;
  padding-right: 20px; /* Ajout d'espace à droite */
}

/* Styles pour les images en pleine largeur */
.full-width-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Styles pour le header (en-tête) */
header {
    width: 100%;
    background-color: #fff;
    padding: 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 50px;
    box-sizing: border-box;
}

header h2 {
    font-family: quicksand, sans-serif;
    font-size: 0.9em;
    padding: 11px 20px;
    text-align: right;
    color: #ff8000;
    margin: 0;
    background: #041e42;
    word-spacing: 15px;
    width: auto;
}

/* Correction : Supprime le soulignement des liens dans l'en-tête */
header h2 a {
    text-decoration: none;
    color: inherit;
}

.logo {
    height: auto;
    max-width: 370px; /* MODIFIÉ : Taille maximale du logo pour toutes les plateformes */
}

/* Styles pour la barre de navigation */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #041e42;
    padding: 6px 20px;
    margin: 20px auto;
    border-radius: 8px;
    gap: 15px; /* Ajoute de l'espace entre le slogan et les liens */
}

/* Liens dans la navbar */
.navbar a {
    font-size: 16px;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

/* Hover sur les liens */
.navbar a:hover,
.dropdown:hover .dropbtn {
    background-color: #ff8000;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown .dropbtn {
    font-size: 16px;
    border: none;
    outline: none;
    color: white;
    padding: 14px 16px;
    background-color: inherit;
    font-family: inherit;
    margin: 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    flex-direction: column;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

.dropdown:hover .dropdown-content {
    display: flex;
}

/* Styles pour le carrousel */
.slideshow-container {
    width: 100%;
    height: 670px; /* MODIFIÉ : Hauteur augmentée */
    position: relative;
    overflow: hidden;
}

.mySlides {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    animation: fadeEffect 1.5s;
}

.slider-image {
    width: 100%;
    height: 670px; /* MODIFIÉ : Hauteur augmentée */
    object-fit: cover;
    display: block;
}

@keyframes fadeEffect {
    from {
        opacity: 0.4;
    }
    to {
        opacity: 1;
    }
}

.dots-container {
    text-align: center;
    position: relative;
    top: 20px;
}

.dot {
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s;
    cursor: pointer;
}

.active-dot {
    background-color: #ff8000;
}

/* Styles pour les tableaux de services */
.table-wrapper {
    overflow-x: auto;
    padding: 20px 10px;
    width: 100%;
    /* Conserve l'image de fond */
    background-image: url('../jpg/Hockai.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 40px;
    margin: 0px auto;
}

table {
    border-collapse: separate;
    border-spacing: 30px;
    width: 80%;
    max-width: 1200px; /* MODIFIÉ : Largeur maximale du tableau augmentée */
    margin: auto;
    text-align: center;
    table-layout: fixed;
}

td {
    width: 400px; /* MODIFIÉ : Largeur des cellules augmentée */
    height: 300px;
    border: 0px solid #041e42;
    padding: 5px;
    /* Correction : Nouvelle couleur de fond unie */
    background-color: #444; /* Gris foncé */
    transition: background-color 0.3s;
    vertical-align: middle;
    text-align: center;
    overflow: hidden;
    justify-content: start;
    align-items: center;
    /* Ajout de bords arrondis */
    border-radius: 15px;
}

td:hover {
    /* Correction : Nouvelle couleur de survol */
    background-color: #555; /* Gris un peu plus clair au survol */
    cursor: pointer;
}

.tableau-image {
    width: 270px; /* MODIFIÉ : Taille de l'image augmentée */
    height: 270px; /* MODIFIÉ : Taille de l'image augmentée */
    object-fit: contain;
}

/* Flip-card styles */
.rotatable-cell {
    transition: transform 0.5s;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card {
    width: 100%;
    height: 100%;
    position: relative;
}

.flip-card-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.rotated .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    text-align: center;
    align-items: center;
}

.flip-card-front {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Correction : Nouvelle couleur de fond pour la face avant */
    background-color: #444; /* Gris foncé */
}

.flip-card-back {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Correction : Nouvelle couleur de fond pour la face arrière */
    background-color: #444; /* Gris foncé */
    transform: rotateY(180deg);
}

.cell-text,
.cell-text1,
.contact-text {
    transition: opacity 0.3s;
    word-wrap: break-word;
    overflow: hidden;
    text-align: auto;
    margin: 10px;
}

/* Correction : Texte de titre des cartes en blanc */
.cell-text {
    margin-top: 15px;
    font-size: 1.5em;
    color: #fff;
    font-weight: normal;
    text-decoration: underline;
    text-decoration-color: #ff8000;
    text-align: center;
}

/* Correction : Texte de description des cartes en blanc */
.cell-text1 {
    margin-top: 10px;
    font-size: 1.0em;
    color: #fff;
    font-weight: normal;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.6;
}

/* Correction : Rétablit la couleur d'origine pour les liens de contact */
.contact-text a {
    text-decoration: none;
    color: #041e42;
}

/* Correction : Crée la classe spécifique pour le texte de contact */
.contact-text {
    margin-top: 10px;
    font-size: 1.0em;
    color: #041e42;
    font-weight: normal;
}

/* Correction : Rétablit la couleur d'origine pour le texte de contact principal */
.cell-text2 {
    margin-top: 10px;
    font-size: 1.4em;
    color: #041e42;
    font-weight: normal;
}

/* Styles pour le tableau de contact */
.contact-table {
    width: 100%;
    max-width: 1100px;
    margin: 20px auto;
    border-spacing: 50px;
}

.contact-table td {
    padding: 10px;
    font-size: 1em;
}

.cell-style2 {
    width: 150px;
    height: 150px;
    border: 1px solid #041e42;
    padding: 20px;
    background-color: #f0f0f0;
    vertical-align: middle;
}

td.cell-style2:hover {
    background-color: #f0f0f0 !important;
    cursor: default !important;
}

.map-button {
    display: inline-block;
    padding: 12px 20px;
    background-color: #ff8000;
    color: white;
    font-family: quicksand, sans-serif;
    font-size: 1em;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.map-button:hover {
    background-color: #e67000;
}

/* Styles pour le pied de page */
footer {
    width: 100%;
    background-color: #041e42;
    padding: 10px 0;
}

.footer-text {
    font-family: quicksand, sans-serif;
    font-size: 1.0em;
    text-align: center;
    color: #fff;
    margin: 0;
    text-decoration: none;
}

/* ----------------------------------------------------------------------------------------------------------------------------------------------------- */

/* Styles pour les appareils mobiles (écran jusqu'à 768px de largeur) */
@media (max-width: 768px) {
    /* Correction de la marge à droite sur le corps de la page */
    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    /* Header */
    .header-container {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        padding: 10px 0;
    }

    .navbar a {
        font-size: 14px;
        padding: 10px;
    }

    header h2 {
        font-size: 0.75em;
        padding: 10px;
        text-align: center;
        word-spacing: 5px;
    }
    
    /* Correction de la marge à droite pour le footer */
    footer {
        width: 100%;
        padding: 10px 0;
    }

    /* Carrousel */
    .slideshow-container,
    .slider-image {
        height: 300px;
    }

    /* Titre "Nos services" */
    .section-title,
    body p {
        font-size: 1.5em;
        margin: 20px 10px;
    }

    /* Table des services */
    table {
        width: 100%;
        border-spacing: 0;
    }

    .table-wrapper td {
        display: block;
        width: 100% !important; 
        height: 420px; 
        margin-bottom: 20px;
        box-sizing: border-box;
        padding: 10px;
        overflow: hidden; 
        position: relative;
    }
    
    .flip-card-front,
    .flip-card-back {
        width: 100%;
        height: 100%; 
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .flip-card-front {
        box-sizing: border-box;
    }

    .flip-card-front img {
        width: 270px;  /* MODIFIÉ : Taille augmentée pour mobile */
        height: 270px; /* MODIFIÉ : Taille augmentée pour mobile */
        object-fit: contain;
        margin: 0; 
    }

    .cell-text {
        font-size: 1.4em !important; 
        margin-top: 20px !important;
        color: #fff !important;
        text-align: center;
    }

    .flip-card-back {
        background-color: #444 !important; /* Nouvelle couleur pour mobile */
        padding: 25px !important;
        box-sizing: border-box !important;
    }

    .table-wrapper {
        padding: 20px 10px;
        background-size: cover;
    }

    /* Contact table */
    .contact-table {
        width: 100%;
        display: block;
    }

    .contact-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 20px;
        text-align: center;
    }

    .cell-style2 {
        width: 100%;
        height: auto;
        padding: 10px;
    }

    .map-button {
        width: 80%;
        font-size: 1em;
    }
}