/***********************************************
  Styles de la page Avantages
***********************************************/

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fc; /* Fond clair */
    color: #333; /* Texte principal */
    line-height: 1.7;
    margin: 0;
}
.advantages-page {
    font-family: 'Arial', sans-serif;
    color: #333;
    background-color: #f5f7fc;
    margin: 0 auto;
    padding: 0;
}

/* --- SECTION : Hero (bandeau) --- */
.hero {
    background-color: #274F57;
    padding: 80px 20px;
    text-align: center;
    color: #ffffff;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(39, 79, 87, 0.95), rgba(39, 79, 87, 0.8));
    z-index: 1;
}

.hero h1 {
    margin: 0;
    font-size: 42px;
    font-weight: 700;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

/* --- SECTION : Pourquoi choisir --- */
.why-choose {
    max-width: 1200px;
    margin: 0 auto 70px;
    padding: 0 20px;
}

/* Container de texte + image */
.why-choose-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    margin-bottom: 40px;
    align-items: center;
}

.text-block {
    flex: 1 1 450px;
}

.text-block h2 {
    font-size: 32px;
    color: #274F57;
    margin-bottom: 25px;
    position: relative;
}

/* Petite barre soulignée sous le h2 */
.text-block h2::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background-color: #e53935;
    margin-top: 10px;
    border-radius: 2px;
}

.text-block p {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 17px;
    color: #444;
}

.image-block {
    flex: 1 1 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-block img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.image-block img:hover {
    transform: scale(1.02);
}

/* Stats cards */
.why-choose-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
}

.stat-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    padding: 30px;
    flex: 1 1 250px;
    min-width: 250px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Ajouté pour les effets de surbrillance */
    overflow: hidden; /* Ajouté pour contenir les effets animés */
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Effet de fond subtil pendant l'animation */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(229, 57, 53, 0.05) 0%, rgba(229, 57, 53, 0) 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.stat-card:hover::before {
    opacity: 1;
}

/* Ajout d'un indicateur visuel subtil lors de l'animation */
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #274F57, #e53935);
    width: 0;
    transition: width 0.3s ease;
    border-radius: 0 0 0 12px;
}

.stat-card:has(.stat-value.animating)::after {
    width: 100%;
    transition: width calc(var(--duration, 2.5) * 1s) cubic-bezier(0.65, 0, 0.35, 1);
}

.stat-card:has(.stat-value.animated)::after {
    width: 100%;
}

.stat-value {
    font-size: 38px;
    font-weight: bold;
    color: #e53935;
    display: inline-block;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

/* Effet pendant l'animation */
.stat-value.animating {
    text-shadow: 0 0 8px rgba(229, 57, 53, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.1);
    }
    100% {
        filter: brightness(1);
    }
}

/* Effet de completion */
.stat-value.animated {
    position: relative;
}

.stat-value.animated::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -30%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.6) 0%, rgba(229, 57, 53, 0) 70%);
    border-radius: 50%;
    opacity: 0;
    animation: popEffect 0.5s ease forwards;
}

@keyframes popEffect {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.4);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.stat-text {
    font-size: 18px;
    color: #555;
    font-weight: 500;
    display: block;
    position: relative;
    z-index: 2;
}

/* Animation de l'entrée des cartes statistiques */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.why-choose-stats .stat-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* Délai progressif pour chaque carte */
.why-choose-stats .stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.why-choose-stats .stat-card:nth-child(2) {
    animation-delay: 0.3s;
}

.why-choose-stats .stat-card:nth-child(3) {
    animation-delay: 0.5s;
}

/* Animation des stats */
.stat-card span:not(.stat-text) {
    font-size: 38px;
    font-weight: bold;
    color: #e53935;
}

/* --- SECTION : Les principaux avantages --- */
.main-advantages {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.main-advantages h2 {
    font-size: 32px;
    color: #274F57;
    margin-bottom: 40px;
    position: relative;
    text-align: center;
}

.main-advantages h2::after {
    content: "";
    display: block;
    margin: 10px auto 0;
    width: 80px;
    height: 4px;
    background-color: #e53935;
    border-radius: 2px;
}

/* Grille de cartes d'avantages */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.advantage-card {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 35px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    text-align: left;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border-top: 5px solid transparent;
    display: flex;
    flex-direction: column;
}

.advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(39, 79, 87, 0.12);
    border-top: 5px solid #e53935;
}

.advantage-icon {
    background: linear-gradient(45deg, #274F57, #378291);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: all 0.4s ease;
}

.advantage-card:hover .advantage-icon {
    transform: scale(1.1);
    background: linear-gradient(45deg, #e53935, #ff5252);
}

.advantage-icon i {
    font-size: 28px;
    color: white;
}

.advantage-card h3 {
    margin-top: 0;
    font-size: 22px;
    color: #274F57;
    margin-bottom: 15px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.advantage-card:hover h3 {
    color: #e53935;
}

.advantage-card p {
    color: #555;
    line-height: 1.7;
    font-size: 16px;
    margin-bottom: 25px;
}

.advantage-link {
    color: #274F57;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    margin-top: auto;
    transition: all 0.3s ease;
}

.advantage-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.advantage-card:hover .advantage-link {
    color: #e53935;
}

.advantage-card:hover .advantage-link i {
    transform: translateX(5px);
}

/* --- SECTION : Comparaison (TABLEAU) --- */
.comparison {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.comparison h2 {
    font-size: 32px;
    color: #274F57;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.comparison h2::after {
    content: "";
    display: block;
    margin: 10px auto 0;
    width: 80px;
    height: 4px;
    background-color: #e53935;
    border-radius: 2px;
}

/* Style du tableau de comparaison */
.comparison-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid #eaeaea;
}

.comparison-table th {
    background-color: #274F57;
    color: white;
    font-weight: 600;
    font-size: 18px;
    padding: 20px;
    position: relative;
}

.portage-column {
    background-color: rgba(39, 79, 87, 0.05);
}

.feature-column {
    font-weight: 600;
    text-align: left;
    color: #444;
}

.comparison-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.comparison-table tr:hover {
    background-color: #f0f4f8;
}

/* Badges et icônes dans le tableau */
.table-header-content {
    position: relative;
    display: inline-block;
    padding-right: 40px;
}

.recommended-badge {
    position: absolute;
    top: -35px;
    right: -20px;
    background-color: #e53935;
    color: white;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
    transform: rotate(15deg);
}

.yes-icon {
    color: #4caf50;
    font-size: 20px;
}

.no-icon {
    color: #f44336;
    font-size: 20px;
}

.highlight {
    color: #274F57;
    font-weight: 700;
}

/* --- SECTION : Call-to-action --- */
.cta-section {
    background-color: #274F57;
    padding: 70px 20px;
    margin-top: 60px;
}

.cta-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: #ffffff;
}

.cta-container h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.cta-container p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: #e53935;
    color: #ffffff;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.cta-button:hover {
    background-color: #d32f2f;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(229, 57, 53, 0.4);
}

/* --- Responsivité --- */
@media (max-width: 992px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 12px 15px;
    }
}

@media (max-width: 768px) {
    .why-choose-content {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 36px;
    }

    .text-block h2, 
    .main-advantages h2, 
    .comparison h2,
    .cta-container h2 {
        font-size: 28px;
    }

    .why-choose-stats {
        flex-direction: column;
        align-items: center;
    }

    .stat-card {
        max-width: 100%;
        width: 100%;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table th {
        font-size: 16px;
    }
    
    .feature-column {
        font-size: 14px;
    }
    
    .stat-value {
        font-size: 32px;
    }
    
    .stat-value + span {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 15px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .text-block p {
        font-size: 16px;
    }

    .stat-value {
        font-size: 32px;
    }

    .advantage-card {
        padding: 25px 20px;
    }

    .advantage-icon {
        width: 60px;
        height: 60px;
    }

    .advantage-icon i {
        font-size: 24px;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 16px;
    }
    
    .comparison-table {
        font-size: 14px;
    }
}

/* Animation de chargement de page */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.page-loaded .advantages-page {
    animation: fadeIn 0.5s ease forwards;
}

/* Animation pulse pour le bouton CTA */
@keyframes pulse-attention {
    0% {
        box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    }
    50% {
        box-shadow: 0 0 0 rgba(229, 57, 53, 0.8), 0 0 20px rgba(229, 57, 53, 0.5);
    }
    100% {
        box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    }
}

.cta-button.pulse-attention {
    animation: pulse-attention 2s infinite;
}

/* Animation pour l'apparition des cartes d'avantages */
.advantage-card.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Animation de surlignage pour la ligne active du tableau de comparaison */
@keyframes highlightRow {
    0% {
        background-color: rgba(229, 57, 53, 0.05);
    }
    50% {
        background-color: rgba(229, 57, 53, 0.1);
    }
    100% {
        background-color: rgba(229, 57, 53, 0.05);
    }
}

.comparison-table tr:hover {
    animation: highlightRow 1s infinite;
}

/* Animation subtile pour les icônes dans les cartes d'avantages */
@keyframes iconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.advantage-card:hover .advantage-icon i {
    animation: iconPulse 1.5s ease infinite;
}

/* Animation pour le lien CTA */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.cta-button:hover {
    animation: bounce 1s infinite;
}