* {
    box-sizing:border-box
}

main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0px 40px 80px 40px; /* /!\ valeur d'origine : padding: 48px 40px; *//* haut / droite / bas / gauche */
    min-height: calc(100vh - 120px); /* 100vh moins hauteur approximative header + footer */
}


h2 {
    color: #5a9ba0;
    font-size: 36px;
    font-weight: 600;
    padding-bottom: 3%;
    text-align: center;
    width: 100%;
    margin: auto;
    padding-top: 25px;
    font-family: "Heebo", sans-serif;

}

/* ===================================================================== */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9fafb; /* background: linear-gradient(to right, #f3f8f9, #f9fcfd); */
    margin: 0;
    color: #333;
}

/* Fil d'Ariane */
.breadcrumb {
    text-align: center;
    font-size: 1rem;
    margin-top: 40px;
    margin-bottom: 40px;
    color: #555;
}

.breadcrumb span {
    color: #81C3C9;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

.breadcrumb span:hover {
    color: #649fa3;
    text-decoration: underline;
}

.breadcrumb i {
    margin: 0 8px;
    color: #999;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1160px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease-in-out;
}

.grid.active {
    opacity: 1;
    transform: translateY(0);
}

.card {
    background: white;
    padding: 40px 20px;
    border-radius: 16px;
    box-shadow: 0px 6px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s, background 0.3s;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1a2a44;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #81C3C9;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0px 10px 25px rgba(0,0,0,0.15);
    background: #F6FCFD;
}

.hidden {
    display: none;
}

.back-btn {
    grid-column: 1 / -1;
    margin-top: 15px;
    padding: 12px 25px;
    border: none;
    background: #81c3c9;
    color: white;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.back-btn:hover {
    background: #6eaeb3;
    transform: translateY(-3px);
}

/* Modal background */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(26, 42, 68, 0.6); /* bleu foncé transparent */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

/* Contenu de la popup */
.modal-content {
    position: relative; /* pour que la croix se place bien */
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0px 15px 35px rgba(0,0,0,0.2);
    animation: slideUp 0.35s ease;
    text-align: center;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: #1a4344;
    font-weight: 600;
    border-bottom: 2px solid #eef2f7;
    padding-bottom: 10px;
}

/* Tableau des tarifs */
.modal-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.modal-content th {
    background: #f0f5ff; /* A changer */
    color: #1a2a44;
    padding: 12px;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

.modal-content td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #444;
}

.modal-content tr:last-child td {
    border-bottom: none;
}

/* Bouton fermer */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #e74c3c;
}

/* Animation */
@keyframes slideUp {
    from {opacity: 0; transform: translateY(40px);}
    to {opacity: 1; transform: translateY(0);}
}

.cta-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 20px;
    background: #81c3c9;
    color: white;
    font-size: 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.3s;
}

.cta-btn:hover {
    background: #6eaeb3;
}

/* ============================ */
/* -------- Responsive -------- */
/* ============================ */
@media (max-width: 1134px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        max-width: calc(220px * 3 + 50px);
        gap: 25px;
    }

    .card {
    font-size: 0.974rem;
    }

}

@media (max-width: 998px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
        max-width: calc(220px * 2 + 50px)
    }

    .card {
        font-size: 1.04rem;
    }

}

@media (max-width: 569px) {
    .card {
        font-size: 1.03rem;
    }
}

@media (max-width: 565px) {
    .card {
        font-size: 1.015rem;
    }
}

@media (max-width: 557px) {
    .card {
        font-size: 0.98rem;
    }
}

@media (max-width: 547px) {
    .card {
        font-size: 0.975rem;
    }
}

@media (max-width: 546px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
        max-width: calc(220px * 1 + 50px);
    }

    .card {
        font-size: 1.1rem;
    }
}

/* === moins de 480px === */
@media (max-width: 480px) {


    .grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        max-width: calc(220px * 1 + 50px);
        gap: 25px;
    }

    .card {
    font-size: 1.1rem;
    font-weight: 500;
    }

    h2 {
        font-size: 36px;
    }

    /* modal */
    .modal-content {
        padding: 18px;
    }

    .modal-content h2 {
        font-size: 1.45rem;
        font-weight: 500;
        padding-bottom: 8px;
    }

    .modal-content th {
    padding: 10px;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    }

    .modal-content td {
    padding: 10px;
    }
}

@media (max-width: 323px) {
    .card {
        font-size: 1.09rem;
    }
}

@media (max-width: 321px) {
    .card {
        font-size: 1.08rem;
    }
}