/* ==============================
   CONTACT PAGE STYLES
   ============================== */

.contact-main {
    padding-top: 100px;
    min-height: 100vh;
    background: #fff;
}

.contact-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 15px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: flex-start;
    transition: padding 0.5s ease, gap 0.5s ease;
    position: relative;
    padding-right: 380px;
}

/* ==============================
   CARTE DE FRANCE
   ============================== */
.contact-map {
    flex: 1 1 auto;
    max-width: 700px;
    min-width: 400px;
    transition: none;
}

/* ==============================
   PANNEAU ENTREPRISE (toujours visible)
   ============================== */
.contact-entreprise {
    position: absolute;
    right: 15px;
    top: 40px;
    width: 340px;
    padding: 0;
    z-index: 20;
    background: #fff;
}

.contact-entreprise .entreprise-heading {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #333;
    margin: 0 0 25px 0;
    text-transform: uppercase;
}

.entreprise-block {
    margin-bottom: 25px;
}

.entreprise-block .block-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
}

.entreprise-block .block-title img {
    height: 24px;
    width: auto;
}

.entreprise-block .block-subtitle {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin: 0 0 12px 0;
}

.entreprise-block .block-bar {
    width: 100%;
    height: 6px;
    background: #555;
    margin-bottom: 20px;
}

.entreprise-block .block-info {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    margin: 0;
}

.entreprise-block .block-info a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entreprise-block .block-info a:hover {
    color: #1a237e;
}

/* L'entreprise reste toujours visible */

.map-instructions {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 3px solid #999;
}

.map-instructions p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.map-instructions p:first-child {
    font-style: italic;
    color: #444;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 700px;
    background: transparent;
    overflow: visible;
}

/* Régions de la carte */
.france-region {
    position: absolute;
    user-select: none;
    width: auto;
    height: auto;
    max-width: 400px;
    z-index: 5;
    pointer-events: none;
    transition: filter 0.3s ease;
}

.france-region.hover {
    filter: drop-shadow(0 0 15px rgba(26, 35, 126, 0.8)) drop-shadow(0 0 30px rgba(26, 35, 126, 0.5));
    z-index: 10;
}

.france-region.active {
    filter: drop-shadow(0 0 20px rgba(26, 35, 126, 1)) drop-shadow(0 0 40px rgba(26, 35, 126, 0.7));
    z-index: 15;
}

/* Positions et tailles des régions de la carte */
#nordouest { left: 190.068px; top: 131.864px; transform: scale(1.7); }
#nordest { left: 190.005px; top: 131.583px; transform: scale(1.7); }
#sudouest { left: 190.005px; top: 132.036px; transform: scale(1.7); }
#sudest { left: 190.005px; top: 131.741px; transform: scale(1.7); }
#region-7473 { left: 200px; top: 137px; transform: scale(1.6); }

/* ==============================
   PANNEAU DE DÉTAILS
   ============================== */
.contact-details {
    display: none;
    flex: 0 0 auto;
    width: auto;
    min-width: 280px;
    max-width: 400px;
    background: #fff;
    padding: 0;
    border-left: none;
    opacity: 1;
    pointer-events: all;
    position: sticky;
    top: 120px;
    align-self: flex-start;
    min-height: auto;
    overflow: visible;
    margin-left: 100px;
}

.contact-container.details-open .contact-details {
    display: block;
    padding: 0;
}

/* Entreprise reste toujours visible */

.close-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    margin: 0 0 12px auto;
}

.close-details:hover {
    color: #1a237e;
}

.details-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
    padding-right: 40px;
}

.details-bar {
    width: 100%;
    height: 6px;
    background: #999;
    margin-bottom: 25px;
}

.contact-person {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.contact-person:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.person-name {
    font-size: 15px;
    font-weight: 400;
    color: #333;
    margin: 0 0 5px 0;
}

.person-email,
.person-phone {
    margin: 0 0 3px 0;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.person-email .icon,
.person-phone .icon {
    font-size: 18px;
}

.person-email a,
.person-phone a {
    color: #1a237e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.person-email a:hover,
.person-phone a:hover {
    color: #2a6b5a;
}

/* ==============================
   INFORMATIONS DE CONTACT
   ============================== */
.contact-info {
    flex: 1;
    max-width: 600px;
}

.contact-title {
    font-size: 32px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #333;
    margin: 0 0 40px 0;
}

/* Cartes de contact */
.contact-card {
    display: none;
    background: #f8f8f8;
    padding: 30px;
    margin-bottom: 30px;
    border-left: 4px solid #1a237e;
    transition: all 0.3s ease;
}

.contact-card.active {
    display: block;
}

.contact-card.hover {
    background: #f0f0f0;
}

.card-location {
    font-size: 22px;
    font-weight: 600;
    color: #1a237e;
    margin: 0 0 20px 0;
}

.card-details p {
    margin: 0 0 12px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

.card-details .company-name {
    font-size: 17px;
    color: #222;
}

.card-details .label {
    color: #666;
    margin-right: 5px;
}

.card-details a {
    color: #1a237e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-details a:hover {
    color: #2a6b5a;
}

/* ==============================
   FORMULAIRE DE CONTACT
   ============================== */
.contact-form-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.contact-form-section h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin: 0 0 25px 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row input,
.form-row select,
.form-row textarea {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #ddd;
    background: #f8f8f8;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    transition: all 0.3s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #1a237e;
    background: #fff;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: #999;
}

.form-row select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    align-self: flex-start;
    padding: 15px 50px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: #333;
}

/* ==============================
   RESPONSIVE
   ============================== */

/* Tablette paysage + petits écrans desktop */
@media screen and (max-width: 1400px) {
    .contact-entreprise {
        width: 300px;
    }
    
    .contact-container {
        padding-right: 340px;
    }

    .contact-map {
        width: 600px;
    }

    .map-wrapper {
        height: 550px;
    }

    #nordouest { left: 120px; top: 90px; transform: scale(1.3); }
    #nordest { left: 120px; top: 90px; transform: scale(1.3); }
    #sudouest { left: 120px; top: 90px; transform: scale(1.3); }
    #sudest { left: 120px; top: 90px; transform: scale(1.3); }
    #region-7473 { left: 130px; top: 95px; transform: scale(1.2); }
}

@media screen and (max-width: 1200px) {
    .contact-container {
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px;
        padding-right: 20px;
        align-items: flex-start;
    }

    .contact-map {
        order: 1;
        width: 100%;
        max-width: 600px;
        margin: 0;
    }

    .contact-details {
        order: 2;
        position: relative;
        top: auto;
        width: 100%;
        max-width: 600px;
        margin-left: 0;
    }

    .contact-entreprise {
        order: 3;
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        max-height: none;
        overflow-y: visible;
        z-index: 1;
    }

    .contact-entreprise .entreprise-heading {
        width: 100%;
        margin-bottom: 15px;
    }

    .entreprise-block {
        flex: 1;
        min-width: 250px;
        margin-bottom: 10px;
    }
    
    .contact-map {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    .map-wrapper {
        height: 500px;
    }

    #nordouest { left: 100px; top: 70px; transform: scale(1.2); }
    #nordest { left: 100px; top: 70px; transform: scale(1.2); }
    #sudouest { left: 100px; top: 70px; transform: scale(1.2); }
    #sudest { left: 100px; top: 70px; transform: scale(1.2); }
    #region-7473 { left: 110px; top: 75px; transform: scale(1.1); }

    .contact-container.details-open .contact-details {
        display: block;
        flex: 0 0 100%;
        width: 100%;
        max-width: 600px;
        padding: 25px 20px;
    }

    .contact-container.details-open .contact-entreprise {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .contact-main {
        padding-top: 80px;
    }
    
    .contact-container {
        padding: 20px 10px;
        gap: 20px;
        align-items: flex-start;
    }

    .contact-map {
        margin-left: -10px;
    }

    .contact-entreprise {
        position: relative;
        top: auto;
        width: 100%;
        max-height: none;
        overflow-y: visible;
        flex-direction: column;
        gap: 15px;
    }

    .entreprise-block {
        min-width: 100%;
    }

    .entreprise-block .block-title {
        font-size: 16px;
    }

    .entreprise-block .block-info {
        font-size: 13px;
    }
    
    .contact-map {
        max-width: 100%;
    }

    .map-wrapper {
        height: 450px;
    }

    #nordouest { left: 40px; top: 50px; transform: scale(1.1); }
    #nordest { left: 40px; top: 50px; transform: scale(1.1); }
    #sudouest { left: 40px; top: 50px; transform: scale(1.1); }
    #sudest { left: 40px; top: 50px; transform: scale(1.1); }
    #region-7473 { left: 45px; top: 55px; transform: scale(1.05); }

    .contact-container.details-open .contact-details {
        display: block;
        padding: 20px 15px;
    }

    .details-title {
        font-size: 16px;
    }

    .person-name {
        font-size: 14px;
    }

    .person-email,
    .person-phone {
        font-size: 13px;
    }

    .map-instructions p {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .contact-main {
        padding-top: 70px;
    }

    .contact-container {
        padding: 15px 10px;
    }

    .map-wrapper {
        height: 380px;
    }

    #nordouest { left: 15px; top: 35px; transform: scale(0.9); }
    #nordest { left: 15px; top: 35px; transform: scale(0.9); }
    #sudouest { left: 15px; top: 35px; transform: scale(0.9); }
    #sudest { left: 15px; top: 35px; transform: scale(0.9); }
    #region-7473 { left: 20px; top: 40px; transform: scale(0.85); }

    .entreprise-block .block-title {
        font-size: 15px;
        gap: 8px;
    }

    .entreprise-block .block-title img {
        height: 20px;
    }

    .entreprise-block .block-subtitle {
        font-size: 13px;
    }

    .contact-entreprise .entreprise-heading {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .contact-container.details-open .contact-details {
        padding: 15px 12px;
    }

    .contact-person {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
}
