@import url('config.css');

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--color-beige-earth);
    color: var(--color-text);
}

header {
    position: relative;
    top: 0;
    width: 100%;
    background: var(--color-beige-earth);
    color: var(--color-gray-stone);
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0px -3px 13px -7px #000000;
    opacity: 1; /* Opacité par défaut */
    transition: all 0.3s ease, opacity 0.3s ease; /* Transition fluide */
    z-index: 1000;
}

header .logo {
    font-family: var(--font-title), sans-serif;
    font-size: 24px;
    display: flex;
    align-items: center;
}

header .logo > img {
    height: 50px;
}

header .logo > span {
    margin-left: 10px;
}

/* Lorsque le header devient sticky */
header.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--color-beige-earth);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Ajout d'une ombre pour distinguer */
    height: 60px; /* Hauteur réduite */
    opacity: 0.9; /* Légère transparence pour un effet plus léger */
    transition: all 0.3s ease, opacity 0.3s ease;
}

/* Réduction des éléments internes pendant sticky */
header.sticky .logo img {
    height: 30px; /* Réduction de la hauteur du logo */
}

header.sticky .logo span {
    font-size: 1rem; /* Réduction de la taille de la police */
}

header.sticky nav {
    font-size: 0.9rem; /* Réduction de la taille de la navigation */
}

nav ul {
    font-family: var(--font-title), sans-serif;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
}

nav ul li {
    font-size: 16px;
}

nav ul li a {
    color: var(--color-gray-stone);
    text-decoration: none;
}

.hero {
    /*background: url('../img/hero-image.jpg') center bottom/cover no-repeat;*/
    background: url('../img/hero-image2.jpg') center bottom/cover no-repeat;
    /*background: url('https://placehold.co/1280x720') center bottom/cover no-repeat;*/
    height: 500px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    color: var(--color-text-hero);
    font-family: var(--font-title), sans-serif;
    /*font-size: 36px;*/
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    position: relative;
}

.hero > div {
    margin-top: 40px;
    width: 33%;
}

.hero > div p {
    margin-top: 20px;
}

.hero h1 {
    font-size: 36px;
}

.featured-tools {
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border: 1px solid var(--color-gray-stone);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 15px;
}

.card img {
    width: 100px;
    margin-right: 15px;
    border-radius: 5px;
}

h3, h2 {
    font-family: var(--font-title), sans-serif;
    color: var(--color-green-pixel);
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

h3 {
    margin-bottom: 10px;
}

footer {
    background: var(--color-brown-wood);
    color: var(--color-text-footer);
    padding: 10px;
    text-align: center;
}


footer a:hover {
    color: var(--color-gray-stone);
}

/* Outils en desktop : 4 colonnes */
.tool-cards {
    display: flex;
    flex-wrap: wrap; /* Permet aux cartes de passer à la ligne si nécessaire */
    justify-content: center; /* Centre les cartes horizontalement */
    gap: 20px; /* Espacement entre les cartes */
    position: relative;
    top: -40px;
}

/* Chaque carte */
.tool-cards > a {
    text-decoration: none; /* Supprime les soulignements */
    flex: 0 0 calc(25% - 20px);
    box-sizing: border-box;
}

.tool-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    color: var(--color-text);

}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.tool-card img {
    width: 100px;
    margin-right: 15px;
    border-radius: 5px;
}

.tool-card p {
    font-size: 1rem;
}

section {
    padding: 50px 20px;
}

section:nth-of-type(even) {
    background-color: var(--color-beige-earth);
    color: var(--color-text); /* Texte sur fond clair */
}

section:nth-of-type(even) h2 {
    color: var(--color-text); /* Texte sur fond clair */
}

section:nth-of-type(odd) {
    background-color: var(--color-gray-stone);
    color: var(--color-text-footer); /* Texte sur fond sombre */
}

section:nth-of-type(odd) h2 {
    color: var(--color-text-footer); /* Texte sur fond clair */
}

/* Section Why Us */
.why-us {
    background-color: var(--color-beige-earth);
    text-align: center;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.feature {
    background-color: var(--color-gray-stone);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: var(--color-text-footer);
    width: 250px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.feature img {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.feature p {
    font-size: 1rem;
}

.cta {
    margin-top: 20px;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* Section Tous nos outils */
.all-tools {
    background-color: var(--color-beige-earth);
    text-align: center;
}

.all-tools p {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 colonnes égales */
    gap: 20px; /* Espacement entre les éléments */
}

.tool {
    background-color: var(--color-gray-stone);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: var(--color-text-footer);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.tool:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.tool img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

.tool p {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--color-text-darkbg);
}

.tool .btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-blue-diamond);
    color: var(--color-text-footer);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.tool .btn-primary:hover {
    background-color: var(--color-green-pixel);
}

/* Section about */

.about {
    background: var(--color-brown-wood);
    color: var(--color-text-footer);
    text-align: left; /* Aligne le texte à gauche */
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.about-text {
    flex: 1 1 60%;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.about-text p strong {
    color: var(--color-green-pixel); /* Mise en valeur des éléments importants */
}

.about-text blockquote {
    margin: 20px 0;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-left: 5px solid var(--color-green-pixel);
    font-style: italic;
    font-size: 1.2rem;
}

.about-image {
    flex: 1 1 30%;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-blue-diamond);
    color: var(--color-text-footer);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--color-green-pixel);
}

/* Bouton de menu pour mobile */
.menu-toggle {
    display: none; /* Caché par défaut */
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 40px; /* Plus grande zone cliquable */
    height: 40px; /* Plus grande zone cliquable */
    align-items: center;
    justify-content: center;
}

.menu-toggle .menu-icon {
    position: relative;
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 2px;
}

.menu-toggle .menu-icon::before,
.menu-toggle .menu-icon::after {
    content: "";
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    position: absolute;
    left: 0;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.menu-toggle .menu-icon::before {
    top: -8px;
}

.menu-toggle .menu-icon::after {
    top: 8px;
}

/* Menu en mobile */
.menu {
    display: flex;
    gap: 15px;
}

.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
}

.menu ul li {
    font-size: 16px;
}

.menu ul li a {
    color: var(--color-text);
    text-decoration: none;
}

.menu ul li a:hover {
    color: var(--color-blue-diamond);
    text-decoration: underline;
}

/*   confidentialité   */
#privacy h3 {
    color: var(--color-text); /* Texte sur fond clair */
}

.privacy-policy {
    background-color: var(--color-beige-earth);
    color: var(--color-text);
    padding: 50px 20px;
    line-height: 1.6;
}

.privacy-policy p {
    margin-bottom: 20px;
}

.privacy-policy a {
    color: var(--color-blue-diamond);
    text-decoration: underline;
}

.privacy-policy a:hover {
    color: var(--color-green-pixel);
}


/*   terms-of-use   */
#terms-of-use h3 {
    color: var(--color-text); /* Texte sur fond clair */
}

.terms-of-use p {
    margin-bottom: 20px;
}

.terms-of-use a {
    color: var(--color-blue-diamond);
    text-decoration: underline;
}

.terms-of-use a:hover {
    color: var(--color-green-pixel);
}


/* Responsive Adjustments */
@media (max-width: 768px) {

    h2 {
        font-size: 2rem;
    }

    header {
        padding: 10px;
    }

    header .logo {
        font-size: 12px;
    }

    header.sticky {
        height: 50px; /* Hauteur encore plus réduite sur mobile */
    }

    header.sticky .menu-toggle {
        top: 10px; /* Ajuster la position du bouton de menu */
    }

    /*   MENU    */
    .menu {
        display: none; /* Cacher par défaut */
        position: absolute;
        top: 50px;
        right: 0;
        background-color: var(--color-beige-earth);
        padding: 15px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        gap: 10px; /* Espacement entre les éléments */
        width: 200px; /* Largeur fixe pour le menu mobile */
        z-index: 10;
    }

    .menu ul {
        flex-direction: column; /* Correction de la direction */
    }

    .menu.show {
        display: flex; /* Affiche le menu déroulant */
    }

    .menu-toggle {
        display: flex; /* Affiche le bouton hamburger */
    }

    /*   HERO    */
    .hero {
        background: url('../img/hero-image2_mb.jpg') center bottom/cover no-repeat;
    }


    .hero > div {
        margin-top: 10px;
        width: 100%;
    }

    .featured-tools {
        padding: 50px 20px;
    }

    /*   CARDS    */
    .tool-cards {
        grid-template-columns: 1fr; /* Une seule colonne */
        top: 0;
    }

    .tool-card {
        flex: 0 0 100%; /* Occupe toute la largeur sur mobile */
    }

    /*     TOOLS      */
    .tools-grid {
        grid-template-columns: 1fr; /* Une seule colonne */
        top: 0;
    }

    /*   ABOUT    */
    .about-content {
        flex-direction: column; /* Passe en colonne */
        align-items: flex-start; /* Alignement à gauche */
    }

    .about-content .about-image {
        order: -1; /* Affiche l'image en premier */
        margin-bottom: 20px; /* Espacement sous l'image */
    }

    /*  PRIVACY - TERMS OF USE  */
    #privacy .hero h1, #terms-of-use .hero h1 {
        font-size: 25px;
    }

    #privacy h2, #terms-of-use h2 {
        font-size: 1.5rem;
    }
}
