/*----------------------------------------------------------------------------*/
/*                             Fonts & Variables                              */
/*----------------------------------------------------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700&display=swap');

:root {
    --primary-color: #eaeaea;
    --secondary-color: #000000;
    --tertiary-color: #ffffff;
    --accent-color: #fef629;
    --background-color: #f4f4f4;
    --text-color: #000000;
}

/*----------------------------------------------------------------------------*/
/*                             Base & Body                                    */
/*----------------------------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    width: 100%;
}

footer {
    width: 100%;
}
/*----------------------------------------------------------------------------*/
/*                             Layout Container                               */
/*----------------------------------------------------------------------------*/
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center; /* centre les items à l'intérieur du container */
    gap: 60px; 
    width: 100%;
}

a {
    text-decoration: none;
}
.main-content {
    flex: 1;
    display: flex;
    justify-content: center; /* centre horizontalement */
    align-items: center;     /* centre verticalement */
    padding: 20px;
}
/*----------------------------------------------------------------------------*/
/*                                Square Box                                  */
/*----------------------------------------------------------------------------*/
.square {
    background-color: var(--primary-color);
    width: 400px;
    height: 400px;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.062);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid #ccc; /* ajoute une bordure si besoin */
}

.square:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Couleurs spécifiques pour chaque square au hover */
.square:nth-child(1):hover {
    background-color: #D0FF03; 
}

.square:nth-child(2):hover {
    background-color: #ef4444; 
}

.square:nth-child(3):hover {
    background-color: #fbe134;
    color: black;
}

/* Pour que les icônes SVG suivent la couleur du texte */
.square svg {
    transition: all 0.3s ease;
    stroke: currentColor;
}


/* Title inside box */
.square .title {
    padding-top: 2rem;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

/* Icon container */
.square .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

.square .icon img {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
}

/* Description */
.square .desc {
    font-size: 1rem;
    text-align: center;
    line-height: 1.4;
}

/*----------------------------------------------------------------------------*/
/*                                Button Centered                             */
/*----------------------------------------------------------------------------*/
.wrapper-center {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.center-btn {
    padding: 12px 3rem; 
    border: 2px solid var(--secondary-color);
    background-color: var(--primary-color);
    color: var(--text-color);
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    user-select: none;
    touch-action: manipulation;
    transition: all 0.3s ease;
}

.center-btn:hover {
    color: var(--tertiary-color);
    background-color: var(--secondary-color);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.center-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/*----------------------------------------------------------------------------*/
/*                                Responsive                                  */
/*----------------------------------------------------------------------------*/
@media (max-width: 1024px) {
    .container {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        gap: 30px;
        padding: 20px 10px;
    }

    .square {
        width: 250px;
        height: 280px;
        padding: 18px;
    }

    .square .title {
        font-size: 1.6rem;
    }

    .square .icon img {
        max-width: 80px;
        max-height: 80px;
    }

    .square .desc {
        font-size: 0.95rem;
    }

    .center-btn {
        padding: 12px 2.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .container {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .square {
        width: min(300px, 85vw);
        height: auto;
        min-height: 280px;
        padding: 20px;
    }

    .square .title {
        font-size: 1.7rem;
        margin-bottom: 15px;
    }

    .square .icon {
        margin: 20px 0;
    }

    .square .icon img {
        max-width: 90px;
        max-height: 90px;
    }

    .square .desc {
        font-size: 1rem;
        margin-top: 15px;
    }

    .wrapper-center {
        margin-top: 10px;
    }

    .center-btn {
        padding: 12px 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .square {
        width: min(280px, 90vw);
    }
    
    .square .title {
        font-size: 1.5rem;
    }
}
