/* ======================================================================
   ALPES-SUD.NET — page contact premium
   Page unique inspirée de la logique index : image forte + panneau bleu.
   ====================================================================== */

.as-contact-page{
    --contact-blue:#002b55;
    --contact-blue-2:#073f63;
    --contact-blue-3:#0c4668;
    --contact-teal:#2d8a8f;
    --contact-teal-2:#3d7f9f;
    --contact-ice:#edf4f7;
    --contact-ice-2:#dbe7ed;
    --contact-text:#10283b;
    --contact-muted:#5f7481;
    --contact-line:rgba(0,43,85,.13);

    width:min(calc(100% - 72px),1220px);
    margin:0 auto;
    padding:34px 0 58px;
    color:var(--contact-text);
}

.as-contact-page *{
    box-sizing:border-box;
}

.as-contact-hero{
    display:grid;
    grid-template-columns:minmax(300px,.72fr) minmax(0,1.28fr);
    align-items:stretch;
    gap:0;
    overflow:hidden;
    background:rgba(255,255,255,.24);
    border:1px solid rgba(255,255,255,.28);
    box-shadow:0 22px 60px rgba(0,43,85,.12);
}

.as-contact-photo{
    position:relative;
    min-height:520px;
    margin:0;
    background:#c7d5dd;
    overflow:hidden;
}

.as-contact-photo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center center;
}

.as-contact-photo::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        linear-gradient(90deg,rgba(0,43,85,.10) 0%,transparent 36%,rgba(0,43,85,.16) 100%),
        linear-gradient(180deg,transparent 70%,rgba(0,25,45,.22) 100%);
}

.as-contact-photo figcaption{
    position:absolute;
    z-index:2;
    left:0;
    right:0;
    bottom:0;
    margin:0;
    padding:10px 18px 12px;
    color:rgba(255,255,255,.86);
    background:linear-gradient(180deg,transparent,rgba(0,28,55,.58));
    text-align:center;
    font-size:.82rem;
    line-height:1.35;
    font-style:italic;
    letter-spacing:.01em;
}

.as-contact-story{
    position:relative;
    isolation:isolate;
    min-height:520px;
    padding:48px 42px 44px;
    color:#fff;
    background:
        radial-gradient(circle at 88% 12%,rgba(45,138,143,.28),transparent 28%),
        linear-gradient(135deg,#002b55 0%,#073f63 62%,#0d4d70 100%);
    overflow:hidden;
}

.as-contact-story::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:-1;
    opacity:.16;
    background:
        linear-gradient(145deg,transparent 0 61%,rgba(255,255,255,.22) 61.2%,transparent 62%),
        radial-gradient(circle at 12% 12%,rgba(255,255,255,.22),transparent 24%);
}

.as-contact-story::after{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:6px;
    background:linear-gradient(180deg,var(--contact-teal),rgba(255,255,255,.20));
}

.as-contact-mark{
    display:none;
}

.as-contact-story h1{
    display:inline-flex;
    align-items:center;
    width:auto;
    max-width:none;
    margin:0 0 28px;
    padding:0;
    color:rgba(235,248,250,.78);
    border:0;
    font-size:.78rem;
    line-height:1.1;
    letter-spacing:.17em;
    font-weight:850;
    text-transform:uppercase;
}

.as-contact-text{
    display:grid;
    gap:18px;
    max-width:560px;
}

.as-contact-text p{
    margin:0;
    color:rgba(244,250,252,.91);
    font-size:1.02rem;
    line-height:1.72;
    font-weight:500;
}

/* .as-contact-text p:first-child{
    color:#fff;
    font-size:1.12rem;
    line-height:1.55;
    font-weight:500;
} */

.as-contact-signature{
    margin-top:8px !important;
    color:#fff !important;
    font-size:1rem !important;
    line-height:1.2 !important;
    font-weight:780 !important;
    letter-spacing:.05em;
    text-align:right;
}

.as-contact-signature::before{
    content:"";
    display:inline-block;
    width:42px;
    height:1px;
    margin:0 12px .34em 0;
    background:rgba(45,138,143,.86);
}

.as-contact-form-section{
    margin:28px 0 0;
}

.as-contact-form-card{
    display:grid;
    grid-template-columns:300px minmax(0,1fr);
    gap:34px;
    align-items:start;
    padding:34px;
    background:rgba(246,250,252,.74);
    border:1px solid rgba(0,43,85,.11);
    box-shadow:0 18px 46px rgba(0,43,85,.08);
}

.as-contact-form-heading{
    min-height:100%;
    padding:32px 30px;
    color:#fff;
    background:
        radial-gradient(circle at 82% 10%,rgba(45,138,143,.35),transparent 32%),
        linear-gradient(135deg,#002b55 0%,#073f63 100%);
}

.as-contact-form-icon{
    display:block;
    width:120px;
    max-width:58%;
    height:auto;
    margin:0 0 24px;
    opacity:.96;
    filter:none !important;
}

.as-contact-form-heading h2{
    margin:0;
    color:#fff;
    font-size:1.55rem;
    line-height:1.15;
    font-weight:760;
    letter-spacing:-.03em;
}

.as-contact-form{
    display:grid;
    gap:17px;
}

.as-contact-fields{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.as-contact-form label{
    display:grid;
    gap:7px;
    color:#23465a;
    font-size:.78rem;
    line-height:1.2;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.as-contact-form input,
.as-contact-form textarea{
    width:100%;
    border:1px solid rgba(0,43,85,.15);
    background:rgba(255,255,255,.86);
    color:#10283b;
    font:500 1rem/1.45 Inter,Arial,sans-serif;
    outline:0;
    transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}

.as-contact-form input{
    height:48px;
    padding:0 15px;
}

.as-contact-form textarea{
    min-height:158px;
    resize:vertical;
    padding:13px 15px;
}

.as-contact-form input:focus,
.as-contact-form textarea:focus{
    border-color:rgba(45,138,143,.70);
    background:#fff;
    box-shadow:0 0 0 4px rgba(45,138,143,.12);
}

.as-contact-form button{
    justify-self:end;
    min-width:150px;
    height:48px;
    padding:0 24px;
    border:0;
    color:#fff;
    background:linear-gradient(135deg,#002b55,#073f63);
    font:850 .86rem/1 Inter,Arial,sans-serif;
    letter-spacing:.06em;
    text-transform:uppercase;
    cursor:pointer;
    box-shadow:0 12px 26px rgba(0,43,85,.18);
    transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}

.as-contact-form button:hover,
.as-contact-form button:focus-visible{
    background:linear-gradient(135deg,#073f63,#2d8a8f);
    transform:translateY(-1px);
    box-shadow:0 16px 32px rgba(0,43,85,.22);
}

.as-contact-message{
    grid-column:2;
    margin:0 0 4px;
    padding:12px 14px;
    font-size:.94rem;
    line-height:1.45;
    font-weight:700;
}

.as-contact-message--success{
    color:#0f4f45;
    background:rgba(45,138,143,.12);
    border:1px solid rgba(45,138,143,.25);
}

.as-contact-message--error{
    color:#783232;
    background:rgba(170,62,62,.10);
    border:1px solid rgba(170,62,62,.20);
}

.as-contact-hp{
    position:absolute !important;
    left:-9999px !important;
    width:1px !important;
    height:1px !important;
    overflow:hidden !important;
}

/* ======================================================================
   V2 — inversion desktop : texte bleu à gauche, photo à droite
   ====================================================================== */
@media(min-width:981px){
    .as-contact-hero{
        grid-template-columns:minmax(320px,.82fr) minmax(0,1.18fr);
    }

    .as-contact-story{
        padding-right:42px;
    }

    .as-contact-story{
        order:1;
    }

    .as-contact-photo{
        order:2;
    }

    .as-contact-story::after{
        left:auto;
        right:0;
        background:linear-gradient(180deg,rgba(255,255,255,.20),var(--contact-teal));
    }

    .as-contact-photo img{
        object-position:center center;
    }

    .as-contact-photo::after{
        background:
            linear-gradient(90deg,rgba(0,43,85,.18) 0%,transparent 32%,rgba(0,43,85,.05) 100%),
            linear-gradient(180deg,transparent 70%,rgba(0,25,45,.22) 100%);
    }
}

@media(max-width:980px){
    .as-contact-page{
        width:min(calc(100% - 24px),760px);
        padding:24px 0 44px;
    }

    .as-contact-hero{
        grid-template-columns:1fr;
    }

    .as-contact-photo{
        min-height:0;
    }

    .as-contact-photo img{
        height:auto;
        object-fit:contain;
    }

    .as-contact-story{
        min-height:0;
        padding:34px 28px 34px;
    }

    .as-contact-story h1{
        font-size:.76rem;
        letter-spacing:.15em;
    }

    .as-contact-form-card{
        grid-template-columns:1fr;
        gap:22px;
        padding:24px;
    }

    .as-contact-form-heading{
        min-height:0;
        padding:24px;
    }

    .as-contact-message{
        grid-column:auto;
    }
}

@media(max-width:620px){
    .as-contact-page{
        width:100%;
        padding:18px 10px 38px;
    }

    .as-contact-story{
        padding:30px 22px 30px;
    }

    .as-contact-mark{
        margin-bottom:20px;
    }

    .as-contact-story h1{
        margin-bottom:24px;
        letter-spacing:.14em;
    }

    .as-contact-text{
        gap:15px;
    }

    .as-contact-text p,
    .as-contact-text p:first-child{
        font-size:.98rem;
        line-height:1.65;
    }

    .as-contact-form-section{
        margin-top:18px;
    }

    .as-contact-form-card{
        padding:18px;
    }

    .as-contact-fields{
        grid-template-columns:1fr;
        gap:15px;
    }

    .as-contact-form button{
        justify-self:stretch;
        width:100%;
    }
}


/* =========================================================
   Contact — largeur identique à l'index + photo verticale
   ========================================================= */
@media(max-width:980px){
    .as-contact-page{
        width:min(calc(100% - 24px),760px);
        max-width:760px;
        padding-left:0;
        padding-right:0;
    }

    .as-contact-hero{
        grid-template-columns:1fr;
    }

    .as-contact-photo{
        min-height:0;
    }
}

/* =========================================================
   Ajustement image verticale + icône formulaire restaurée
   ========================================================= */
@media(min-width:981px){
    .as-contact-hero{
        grid-template-columns:minmax(0,1.34fr) minmax(280px,.66fr);
    }

    .as-contact-story,
    .as-contact-photo{
        min-height:480px;
    }

    .as-contact-story{
        padding:44px 46px 40px;
    }

    .as-contact-text{
        max-width:680px;
    }

    .as-contact-photo img{
        object-fit:cover;
        object-position:center 24%;
    }
}

.as-contact-form-icon{
    display:block;
    width:120px;
    max-width:58%;
    height:auto;
    margin:0 0 24px;
    opacity:.96;
    filter:none !important;
}


/* =========================================================
   Correctif formulaire — message envoyé sans décalage
   ========================================================= */
@media(min-width:981px){
    .as-contact-form-heading{
        grid-column:1;
        grid-row:1 / span 2;
    }

    .as-contact-message{
        grid-column:2;
        grid-row:1;
        align-self:start;
    }

    .as-contact-form{
        grid-column:2;
    }

    .as-contact-message + .as-contact-form{
        grid-row:2;
    }
}

@media(max-width:980px){
    .as-contact-form-heading,
    .as-contact-message,
    .as-contact-form{
        grid-column:auto;
        grid-row:auto;
    }
}


/* =========================================================
   Contact — image mail à sa taille d'origine
   ========================================================= */
.as-contact-mail-image{
    margin:28px 0 0;
    text-align:center;
}

.as-contact-mail-image figure{
    display:inline-block;
    max-width:100%;
    margin:0 auto;
    padding:0;
    background:transparent;
    border:0;
    box-shadow:none;
}

.as-contact-mail-image img{
    display:block;
    width:auto;
    max-width:100%;
    height:auto;
    margin:0 auto;
}

@media(max-width:620px){
    .as-contact-mail-image{
        margin-top:18px;
    }
}


/* =========================================================
   iPad / tablette — contact : largeur harmonisée avec l'index
   On utilise mieux l'espace horizontal et on donne plus de place
   au panneau bleu de texte.
   ========================================================= */
@media(min-width:681px) and (max-width:980px){
    .as-contact-page{
        width:min(calc(100% - 32px),920px);
        max-width:920px;
        padding:26px 0 50px;
    }

    .as-contact-hero{
        display:grid;
        grid-template-columns:minmax(390px,.54fr) minmax(0,.46fr);
        align-items:stretch;
        min-height:560px;
    }

    .as-contact-story{
        order:1;
        min-height:560px;
        padding:42px 44px 40px;
    }

    .as-contact-photo{
        order:2;
        min-height:560px;
        height:auto;
    }

    .as-contact-photo img{
        width:100%;
        height:100%;
        object-fit:cover;
        object-position:center center;
    }

    .as-contact-text{
        max-width:none;
    }
}

/* =========================================================
   Contact — photo fixe desktop / iPad, texte adaptatif
   ========================================================= */
@media(min-width:681px){
    .as-contact-hero{
        display:grid;
        grid-template-columns:minmax(0,1fr) 340px;
        align-items:stretch;
        width:100%;
    }

    .as-contact-story{
        order:1;
        min-width:0;
        min-height:520px;
        height:auto;
    }

    .as-contact-photo{
        order:2;
        width:340px;
        min-width:340px;
        max-width:340px;
        height:520px;
        min-height:520px;
        max-height:520px;
        align-self:stretch;
    }

    .as-contact-photo img{
        width:100%;
        height:100%;
        object-fit:cover;
        object-position:center 36%;
    }

    .as-contact-text{
        max-width:none;
    }
}

@media(min-width:681px) and (max-width:980px){
    .as-contact-page{
        width:min(calc(100% - 28px),920px);
        max-width:920px;
    }

    .as-contact-hero{
        grid-template-columns:minmax(0,1fr) 292px;
    }

    .as-contact-story{
        min-height:500px;
        padding:38px 34px 36px;
    }

    .as-contact-photo{
        width:292px;
        min-width:292px;
        max-width:292px;
        height:500px;
        min-height:500px;
        max-height:500px;
    }

    .as-contact-text p{
        font-size:.98rem;
        line-height:1.66;
    }

    .as-contact-text p:first-child{
        font-size:1.12rem;
        line-height:1.5;
    }
}

@media(min-width:1180px){
    .as-contact-hero{
        grid-template-columns:minmax(0,1fr) 360px;
    }

    .as-contact-photo{
        width:360px;
        min-width:360px;
        max-width:360px;
    }
}

@media(max-width:680px){
    .as-contact-hero{
        grid-template-columns:1fr;
    }

    .as-contact-story,
    .as-contact-photo{
        order:initial;
    }

    .as-contact-photo{
        width:100%;
        min-width:0;
        max-width:none;
        height:auto;
        min-height:0;
        max-height:none;
    }

    .as-contact-photo img{
        width:100%;
        height:auto;
        object-fit:contain;
        object-position:center center;
    }
}

/* =========================================================
   Contact — V3 : photo intégrée au panneau bleu
   Desktop / iPad : le panneau entier reste bleu, la photo est
   centrée verticalement et affichée en entier, sans rognage.
   ========================================================= */
@media(min-width:681px){
    .as-contact-hero{
        display:grid;
        grid-template-columns:minmax(0,1fr) clamp(280px,32vw,360px);
        align-items:center;
        gap:0;
        background:
            radial-gradient(circle at 88% 12%,rgba(45,138,143,.24),transparent 28%),
            linear-gradient(135deg,#002b55 0%,#073f63 62%,#0d4d70 100%);
        border:1px solid rgba(255,255,255,.28);
        box-shadow:0 22px 60px rgba(0,43,85,.12);
        overflow:hidden;
    }

    .as-contact-story{
        order:1;
        min-width:0;
        min-height:0;
        height:auto;
        padding:48px 46px 46px;
        background:transparent !important;
    }

    .as-contact-story::before{
        opacity:.12;
    }

    .as-contact-story::after{
        left:0;
        right:auto;
        width:6px;
        background:linear-gradient(180deg,var(--contact-teal),rgba(255,255,255,.20));
    }

    .as-contact-photo{
        order:2;
        align-self:center;
        justify-self:center;
        width:clamp(260px,30vw,340px);
        min-width:0;
        max-width:340px;
        height:auto;
        min-height:0;
        max-height:none;
        margin:0;
        padding:28px 22px 28px 0;
        background:transparent !important;
        overflow:visible;
    }

    .as-contact-photo img{
        display:block;
        width:100%;
        height:auto;
        max-height:min(510px,calc(100vh - 270px));
        object-fit:contain !important;
        object-position:center center !important;
        box-shadow:0 18px 42px rgba(0,25,45,.25);
    }

    .as-contact-photo::after{
        display:none;
    }

    .as-contact-photo figcaption{
        position:static;
        padding:10px 0 0;
        color:rgba(244,250,252,.82);
        background:transparent;
        text-shadow:none;
        font-size:.8rem;
    }

    .as-contact-text{
        max-width:none;
    }
}

@media(min-width:681px) and (max-width:980px){
    .as-contact-page{
        width:min(calc(100% - 28px),940px);
        max-width:940px;
    }

    .as-contact-hero{
        grid-template-columns:minmax(0,1fr) 300px;
    }

    .as-contact-story{
        padding:42px 36px 40px;
    }

    .as-contact-photo{
        width:270px;
        max-width:270px;
        padding:24px 18px 24px 0;
    }

    .as-contact-photo img{
        max-height:440px;
    }

    .as-contact-text p{
        font-size:.98rem;
        line-height:1.66;
    }

    .as-contact-text p:first-child{
        font-size:1.12rem;
        line-height:1.5;
    }
}

@media(min-width:1180px){
    .as-contact-photo{
        width:340px;
        max-width:340px;
        padding:30px 26px 30px 0;
    }
}

@media(max-width:680px){
    .as-contact-hero{
        background:transparent;
    }
}

/* =========================================================
   Contact — image contact2.png intégrée en bannière élégante
   Remplace l'ancienne image mail.jpg.
   ========================================================= */
.as-contact-email-image{
    margin:34px auto 0;
    max-width:1040px;
}

.as-contact-email-image figure{
    position:relative;
    margin:0;
    padding:9px;
    background:
        linear-gradient(135deg,rgba(0,43,85,.96),rgba(7,63,99,.92));
    border:1px solid rgba(255,255,255,.30);
    box-shadow:0 20px 54px rgba(0,43,85,.16);
    overflow:hidden;
}

.as-contact-email-image figure::before{
    content:"";
    position:absolute;
    inset:9px;
    z-index:1;
    pointer-events:none;
    border:1px solid rgba(255,255,255,.20);
    box-shadow:inset 0 0 0 1px rgba(0,43,85,.20);
}

.as-contact-email-image img{
    display:block;
    position:relative;
    z-index:0;
    width:100%;
    height:auto;
    margin:0 auto;
}

@media(max-width:680px){
    .as-contact-email-image{
        margin-top:22px;
    }

    .as-contact-email-image figure{
        padding:6px;
    }

    .as-contact-email-image figure::before{
        inset:6px;
    }
}
