/* Layout principal */
.main-container {
    height: calc(100vh - 80px); /* Hauteur totale moins la hauteur du header */
    background: #FFF;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1; /* Prendre tout l'espace disponible */
    padding: 26px 33px;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.panier-container {
    display: flex;
    gap: 41px;
    height: 100%;
}

/* Partie gauche - Liste des intérêts */
.interests-section {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.section-title {
    color: #004439;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    line-height: 30px; /* 125% */
}

/* Badges de filtre */
.filter-badges {
    display: flex;
    gap: 15px;
    margin-bottom: 26px;
}

.filter-badge {
    padding: 7px 24px;
    border-radius: 20px;
    border: 1px solid #DDE9E7;
    background: #FFF;
    color: #7E9894;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-badge:hover {
    border-color: #6BBE46;
}

.filter-badge.active {
    color: #004439;
    border-radius: 20px;
    border: 1px solid #004439;
    background: rgba(0, 68, 57, 0.10);
    font-weight: 700;
}

/* Cards des intérêts */
.interest-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    overflow-y: auto;
    width: 100%;
}

.interest-card {
    background: #FFF;
    border-radius: 15px;
    border: 1px solid #DDE9E7;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Styles spécifiques pour les opportunités */
.sector-badge {
    align-self: flex-start;
    padding: 0 22px;
    border-radius: 15px;
    color: #3B605A;
    font-size: 10px;
    font-weight: 600;
    line-height: 28px;
    margin-bottom: 18px;
    border: 1px solid #DDE9E7;
}

.opportunity-title {
    color: #004439;
    font-size: 14px;
    font-weight: 700;
    line-height: 28px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.pole-title {
    color: #004439;
    font-size: 24px;
    font-weight: 700;
    line-height: 20px;
    flex-grow: 1;
}

.investment-badge, .opportunities-count {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #004439;
    font-size: 14px;
    font-weight: 700;
    line-height: 22px;
    margin-top: auto;
    border-radius: 10px;
    background: #F1F4F4;
    padding: 8px 19px 8px 12px;
}

.opportunities-count {
    gap: 5px;
}

.opportunities-count span {
    color: #59B224;
}

.badge-icon {
    width: 20px;
    height: 20px;
}

/* Styles spécifiques pour les pôles */
.resource-info {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #3B605A;
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
    margin-bottom: 25px;
}

.resource-icon {
    width: 16px;
    height: 16px;
}

/* Partie droite - Formulaire de contact */
.contact-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-form {
    border: 1px solid #DDE9E7;
    border-radius: 20px;
    padding: 24px 34px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: scroll;
}

.form-title {
    color: #004439;
    margin-bottom: 34px;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px; /* 120% */
}

.form-group {
    margin-bottom: 9px;
}

.form-group label {
    display: block;
    color: #7E9894;
    margin-bottom: 1px;
    font-size: 12px;
    font-weight: 500;
    line-height: 24px; /* 200% */
}

.form-input {
    width: calc(100% - 30px);
    padding: 10px 15px;
    border: 1px solid #DDE9E7;
    background: #F1F4F4;
    color: #3B605A;
    font-size: 14px;
    border-radius: 20px;
    height: 28px;
}

.form-input:focus {
    outline: none;
    border-color: #6BBE46;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.form-check label {
    color: #004439;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px; /* 171.429% */
}

.form-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid #DDE9E7;
    cursor: pointer;
}

.divider {
    border-top: 1px solid #DDE9E7;
    margin: 27px 0;
}

.form-info {
    color: #7E9894;
    margin-bottom: 13px;
    text-align: center;
    font-size: 10px;
    font-weight: 400;
    line-height: 17px; /* 170% */
}

.form-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.primary-btn {
    padding: 12px;
    border-radius: 20px;
    background: #59B224;
    color: #FFF;
    font-family: "Open Sans";
    font-size: 16px;
    font-weight: 600;
    line-height: 24px; /* 150% */
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    height: 48px;
}

.primary-btn:hover {
    background: #4a9b1d;
}

.secondary-btn {
    padding: 12px;
    border-radius: 20px;
    background: #FFF;
    color: #004439;
    font-family: "Open Sans";
    font-size: 16px;
    font-weight: 600;
    border: 1px solid #DDE9E7;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.secondary-btn:hover {
    background: #F1F4F4;
    text-decoration: none;
    color: #004439;
}

/* Styles pour le bouton désactivé */
.primary-btn:disabled {
    background: #F1F4F4;
    cursor: not-allowed;
}

/* Modal de confirmation */
.modal {
    display: none;
    position: fixed;
    z-index: 100001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.modal.show {
    display: block;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal.show .modal-content {
    animation: modalSlideIn 0.3s ease-out forwards;
}

.modal.hide {
    background-color: rgba(0, 0, 0, 0);
}

.modal.hide .modal-content {
    animation: modalSlideOut 0.25s ease-in forwards;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border-radius: 20px;
    width: 80%;
    max-width: 490px;
    opacity: 0;
}

.modal-header {
    padding: 20px 30px;
    text-align: center;
}

.success-title {
    margin: 0;
    color: #59B224;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px; /* 125% */
    margin-bottom: 22px;
    text-align: center;
}

.close {
    position: absolute;
    right: 30px;
    top: 20px;
    color: #7E9894;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-body {
    padding: 37px;
}

.confirmation-message {
    color: #7E9894;
    margin-bottom: 36px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px; /* 166.667% */
}

.next-steps {
    padding: 14px 18px;
    margin-bottom: 30px;
    border-radius: 10px;
    background: rgba(89, 178, 36, 0.10);
}

.next-steps h3 {
    margin-top: 0;
    color: #3B605A;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px; /* 183.333% */
}

.next-steps ul {
    padding-left: 20px;
    margin: 0;
    color: #3B605A;
    font-size: 12px;
    font-weight: 500;
    line-height: 22px; /* 183.333% */
}

.next-steps li {
    margin-bottom: 2px;
}

.next-steps li:last-child {
    margin-bottom: 0;
}

.modal-actions {
    text-align: center;
}

.home-btn,
.print-label-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background-color: #59B224;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.home-btn:hover,
.print-label-btn:hover {
    background-color: #4a9b1d;
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(89, 178, 36, 0.3);
}

.print-label-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(89, 178, 36, 0.2);
}

.print-icon {
    width: 20px;
    height: 20px;
    color: white;
}

/* Media Queries pour la responsivité */
@media screen and (max-width: 1200px) {
    .interest-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .main-content {
        padding: 16px 20px;
    }
    
    .panier-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .interest-cards {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        width: 100%;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .filter-badges {
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-badge {
        flex-shrink: 0;
    }
    
    .form-actions {
        position: sticky;
        bottom: 0;
        background: white;
        padding-top: 15px;
        margin-top: 20px;
    }
    
    .form-input {
        width: calc(100% - 30px);
        font-size: 16px; /* Plus grand pour les mobiles */
    }
    
    /* Ajustement de la section vide */
    .empty-cart-illustration {
        width: 120px;
        height: 120px;
    }
    
    .empty-cart-actions {
        width: 100%;
    }
    
    /* Modal plus adapté au mobile */
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
}

/* Styles pour très petits écrans */
@media screen and (max-width: 480px) {
    .main-content {
        padding: 12px 15px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .interest-card {
        padding: 15px;
    }
    
    .opportunity-title, .pole-title {
        font-size: 16px;
        line-height: 22px;
        margin-bottom: 12px;
    }
    
    .pole-title {
        font-size: 20px;
    }
    
    .investment-badge, .opportunities-count {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .form-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    /* Fixer le formulaire en bas sur mobile */
    .main-container {
        height: auto;
        min-height: calc(100vh - 80px);
    }
    
    .interests-section {
        margin-bottom: 20px;
    }
}

/* Optimiser le scroll sur mobile */
@media screen and (max-height: 700px) and (max-width: 768px) {
    .main-container {
        height: auto;
    }
    
    .interest-cards {
        max-height: 50vh;
        overflow-y: auto;
    }
}

/* Styles pour le panier vide */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    width: 100%;
    grid-column: 1 / -1; /* Prendre toute la largeur dans la grille */
    margin-top: 40px; /* Espace supplémentaire après les filtres */
}

.empty-cart-illustration {
    margin-bottom: 25px;
    width: 150px;
    height: 150px;
}

.empty-cart-illustration img {
    object-fit: contain;
}

.empty-cart-title {
    margin-bottom: 15px;
    color: #004439;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px; /* 125% */
}

.empty-cart-text {
    color: #7E9894;
    margin-bottom: 43px;
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    line-height: 22px; /* 183.333% */
}

.empty-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 19px;
    width: 100%;
    max-width: 320px;
}

/* Styles pour les boutons du panier vide avec icônes alignées à gauche et texte centré */
.btn-explore, .btn-view-poles {
    display: flex;
    align-items: center;
    padding: 11px 21px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 15px;
    line-height: 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative; /* Pour permettre le positionnement absolu de l'icône */
}

/* Positionner l'icône à gauche */
.btn-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    left: 20px; /* Marge à gauche */
}

/* Centrer le texte dans le bouton */
.btn-explore span, .btn-view-poles span {
    flex: 1;
    text-align: center; /* Centrer le texte */
    margin-left: 20px; /* Compenser l'espace pris par l'icône */
}

.btn-explore {
    background-color: #59B224;
    color: white;
}

.btn-explore:hover {
    background-color: #4a9b1d;
    color: white;
    text-decoration: none;
}

.btn-view-poles {
    background-color: transparent;
    color: #3B605A;
    border: 1px solid #DDE9E7;
}

.btn-view-poles:hover {
    background-color: #F1F4F4;
    text-decoration: none;
    color: #004439;
}

/* Responsive styles pour le panier vide */
@media screen and (min-width: 768px) {
    .empty-cart-actions {
        flex-direction: column;
        max-width: 320px;
    }
}

/* Correction du précédent: Ne pas centrer le contenu de la section interests */
.interests-section:has(.empty-cart) {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligné à gauche au lieu de centré */
    justify-content: flex-start; /* Commencer en haut */
}

/* Ajustement pour que le panier vide occupe tout l'espace disponible */
.interests-section:has(.empty-cart) .interest-cards {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* S'assurer que le titre et les filtres restent alignés à gauche */
.section-title, .filter-badges {
    align-self: flex-start;
    text-align: left;
}

/* Styles spécifiques pour les pôles */
.pole-header {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 23px;
}

.pole-label {
    color: #3B605A;
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
}

.pole-title {
    color: #004439;
    font-size: 24px;
    font-weight: 700;
    line-height: 24px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.opportunities-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3B605A;
    font-size: 14px;
    font-weight: 500;
    background: #F1F4F4;
    padding: 8px 12px;
    border-radius: 10px;
    margin-top: auto;
}

.opportunities-count span {
    color: #59B224;
    font-weight: 700;
}

.opportunities-label {
    color: #004439 !important;
    font-weight: 500 !important;
}
