/* ========================================================= */
/* PAGE CONTACT — VERSION PREMIUM */
/* ========================================================= */

/* ========================================================= */
/* LAYOUT GLOBAL + SÉPARATION PREMIUM */
/* ========================================================= */

#contact-page h1 {
    text-align: center;
    color: var(--color-text);
    font-family: "Poiret One", sans-serif;
    font-size: 2.4rem;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(0,0,0,0.6);
}

.contact-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 75px;
    margin: 0 auto;
    max-width: 1050px;
    position: relative;
    margin-top: 20px;
}

.contact-layout::before {
    content: "";
    width: 4px;
    background: linear-gradient(to bottom, #c9b89a, #a88c6d);
    border-radius: 2px;
    height: 80%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-1px, -53%);
    opacity: 0.4;
}

#contact-page .contact-section,
#contact-page .contact-layout,
#contact-page .contact-intro,
#contact-page .contact-form,
#contact-page .contact-sideblock {
    font-family: "Poiret One", sans-serif;
    font-size: 1.7rem;
    line-height: 1.6;
}

:root {
    --burger-center: 34px;
}

@media (max-width: 900px) {
    h1 {
        margin-top: calc(var(--burger-center) - 24px + 12px);
    }
}

/* Champs */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="file"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 6px;
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1.6rem !important;
    font-family: "Poiret One", sans-serif;
    box-sizing: border-box;
}

.contact-form label {
    font-size: 1.6rem;
    font-family: "Poiret One", sans-serif;
    display: block;
    text-align: left;
    margin-top: 14px;
    margin-bottom: 6px;
    color: var(--color-text);
}

/* Desktop */
@media (min-width: 901px) {
    .contact-col:first-child {
        transform: translateX(20px);
    }
}

/* Mobile */
@media (max-width: 900px) {
    .contact-layout::before { display: none; }

    .contact-layout {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        margin-top: 15px;
    }

    .contact-col:first-child {
        position: relative;
        padding-bottom: 40px;
    }

    .contact-col:first-child::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        width: 80%;
        height: 2px;
        background: linear-gradient(to right, #f0a748, #a88c6d);
        opacity: 0.4;
        border-radius: 2px;
    }
}

/* ========================================================= */
/* FORMULAIRE PREMIUM */
/* ========================================================= */

.form-wrapper {
    width: 100%;
    max-width: 500px;
}

.form-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 25px 25px;
    background: var(--color-bg);
    overflow: hidden;
    transition: all 0.35s ease;
}

.contact-form {
    text-align: center;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--color-border);
}

.champ-compact {
    width: 60%;
    max-width: 350px;
    margin: 0 auto 10px auto;
    display: block;
}

/* Bouton envoyer */
.btn-envoyer {
    width: auto !important;
    padding: 10px 20px;
    display: inline-block;
    margin: 20px auto 0 auto;
    transition: all 0.25s ease;
    font-size: 24px;
    font-family: "Poiret One", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-weight: bold;
    border: 2px solid var(--color-border);
}


/* Hover : inversion des couleurs */
.btn-envoyer:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-border);
}

.btn-envoyer.loading {
    background-color: #c9b89a !important;
    color: var(--color-text);
    cursor: wait;
    opacity: 0.9;
    transform: scale(0.97);
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
    0%   { transform: scale(0.97); }
    50%  { transform: scale(1.02); }
    100% { transform: scale(0.97); }
}

.btn-envoyer:active {
    transform: scale(0.94);
}

/* Validation */
.invalid { border-color: #b44 !important; }
.valid   { border-color: #4b8 !important; }

/* ========================================================= */
/* UPLOAD DE PIÈCES JOINTES — VERSION PREMIUM */
/* ========================================================= */

.pj-block {
    text-align: left;
    margin: 20px 0 10px;
}

.pj-block label {
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--color-text);
    display: block;
    margin-bottom: 6px;
}

.pj-desc {
    font-size: 1.3rem;
    color: var(--color-text);
    line-height: 1.4;
    margin-left: 2px;
    text-align: left !important;
}

/* Wrapper du bouton fichier — ÉTENDU (pour largeur PJ) */
.file-upload-wrapper {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    margin: 10px auto 0 auto;
    box-sizing: border-box;
}

/* Bouton compact et centré */
.file-upload-button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;

    width: 60%;
    max-width: 350px;
    margin: 0 auto;

    padding: 12px;

    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 6px;

    color: var(--color-text);
    font-family: "Poiret One", sans-serif;
    font-size: 1.6rem;

    cursor: pointer;
    transition: all 0.25s ease;
}

/* Hover premium */
.file-upload-button:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-border);
}

/* Input invisible couvrant tout le bouton */
.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%); /* centré */
    width: 60%;
    max-width: 350px;
    height: 100%; /* couvre toute la hauteur */
    opacity: 0;
    cursor: pointer;
}

/* Hover rétabli via le wrapper */
.file-upload-wrapper:hover .file-upload-button {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-border);
}

/* Preview pleine largeur */
#file-preview {
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
}

#file-preview .file-item {
    width: 100%;
    box-sizing: border-box;
}

/* Compteur */
#file-counter {
    margin-top: 6px;
    font-size: 1.4rem;
    color: var(--color-text)fff;
}

/* Message d’erreur */
#file-errors {
    margin-top: 12px;
    padding: 0;
    background: none;
    border-left: none;
    color: #b00000 !important;
    font-size: 1.5rem;
    font-family: "Poiret One", sans-serif;
}

#file-errors:not(:empty) {
    padding: 10px 12px;
    background: #f8eaea;
    border-left: 4px solid #b00000;
    border-radius: 6px;
}

/* Correction accents sur iphone */
#file-preview .file-item {
    font-family: "Poiret One", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Empêche les noms de fichiers longs de casser la mise en page */
#file-preview .file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* Le nom du fichier doit pouvoir se réduire */
#file-preview .file-item > *:nth-child(2) {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* La croix ne doit jamais rétrécir */
#file-preview .file-item > *:last-child {
    flex-shrink: 0;
}


/* ========================================================= */
/* CONFIRMATION */
/* ========================================================= */

.contact-confirmation {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 20px;
    padding: 15px 20px;
    border: 1px solid #ffd900e0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--color-accent)e0;
    font-size: 1.4rem;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.contact-confirmation.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.contact-confirmation-icon {
    margin-right: 10px;
    font-size: 22px;
    display: inline-block;
    transform: scale(0);
    animation: check-pop 0.4s ease forwards;
    animation-delay: 0.2s;
}

@keyframes check-pop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); }
}

.hidden { display: none !important; }
.honeypot { display: none !important; }

/* ========================================================= */
/* BLOC DROITE */
/* ========================================================= */

.contact-sideblock {
    width: 100%;
    max-width: 500px;
    margin-top: 0 !important;
}

.contact-side-inner {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 40px 25px 40px;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    gap: 90px;
    min-height: 920px;
}

.contact-info {
    color: var(--color-text);
    font-size: 1.7rem;
    flex-shrink: 0;
}

.map-container {
    flex: none;
    width: 100%;
    border-radius: 6px;
    height: 450px;
    overflow: hidden;
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.contact-illustration {
    width: 100%;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--color-border);
    background: #fff; /*laissé exprès pour theme jour nuit*/
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.contact-illustration img {
    width: 100%;
    height: auto;
    display: block;
}

.contact-illustration {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.contact-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.contact-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    color: var(--color-text);
    padding-left: 10px;  /* léger, premium */
    padding-right: 10px;
    line-height: 1.5;
}

@media (max-width: 900px) and (orientation: portrait) {
    .contact-side-inner {
        min-height: auto !important;
        height: auto !important;
    }
}
