/* Page Contact (FO) : entrées en cascade, champs vivants, jauge de caractères, bouton d'envoi animé, carte qui s'incline (voir assets/js/contact-anim.js). */

/* Entrée au défilement : les éléments apparaissent en cascade (seulement si le script est actif : classe .cx-pret) */
.cx-pret .cx-rev { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(5px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1), filter .7s ease; transition-delay: calc(var(--k, 0) * 90ms); }
.cx-pret .cx-rev.cx-vu { opacity: 1; transform: none; filter: none; }

/* Carte : liseré doré qui tourne autour du formulaire quand on écrit, et inclinaison 3D légère */
.contact-card { transform-style: preserve-3d; will-change: transform; }
.contact-card.cx-incline { transition: transform .12s ease-out, box-shadow .3s ease; transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); box-shadow: 0 26px 50px -22px rgba(111, 10, 21, .45); }
.contact-card:not(.cx-incline) { transition: transform .5s ease, box-shadow .3s ease; }
.contact-card::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none; opacity: 0; transition: opacity .4s ease;
    background: conic-gradient(from var(--cx-angle, 0deg), transparent 0 55%, #dcbd70 72%, #fff3c4 80%, #980f1e 90%, transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: cx-tour 3.6s linear infinite paused;
}
.contact-card:focus-within::after { opacity: 1; animation-play-state: running; }
@property --cx-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes cx-tour { to { --cx-angle: 360deg; } }

/* Champs : icône qui s'anime, barre dorée qui se déploie, halo doux */
.form-group { position: relative; }
.form-group .form-label i { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), color .25s ease; }
.form-group:focus-within .form-label i { transform: scale(1.3) rotate(-8deg); color: var(--d-red, #980f1e); }
.form-group .form-control { transition: border-color .25s ease, box-shadow .3s ease, background .3s ease, transform .25s ease; }
.form-group .form-control:focus { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(152, 15, 30, .5), 0 0 0 4px rgba(184, 146, 58, .18); background: #fff; }
.form-group.cx-rempli .form-control:not(:focus):not(.is-invalid) { border-color: rgba(47, 133, 90, .55); }

/* Jauge de caractères sous le libellé */
.cx-jauge { display: block; height: 3px; margin: 4px 0 6px; border-radius: 3px; background: rgba(184, 146, 58, .18); overflow: hidden; }
.cx-jauge i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: 3px; background: linear-gradient(90deg, #dcbd70, #980f1e); transition: width .25s ease, filter .25s ease; }
.form-group.cx-proche .cx-jauge i { background: linear-gradient(90deg, #e0a030, #c62828); filter: saturate(1.3); }
.form-counter { transition: color .25s ease, transform .25s ease; }
.form-group.cx-rempli .form-counter { color: var(--d-red, #980f1e); }

/* Bouton d'envoi : reflet qui balaie, avion qui décolle au survol et à l'envoi */
.btn-submit { position: relative; overflow: hidden; isolation: isolate; transition: transform .25s ease, box-shadow .3s ease; }
.btn-submit::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%) skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 243, 196, .55), transparent); animation: cx-reflet 3.6s ease-in-out 1.5s infinite; }
@keyframes cx-reflet { 0%, 60% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(120%) skewX(-20deg); } }
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 16px 28px -12px rgba(152, 15, 30, .6); }
.btn-submit i { display: inline-block; transition: transform .4s cubic-bezier(.4, 0, .2, 1), opacity .3s ease; }
.btn-submit:hover i { transform: translate(5px, -4px) rotate(8deg); }
.btn-submit.cx-envol i { animation: cx-envol .8s cubic-bezier(.5, 0, .9, .4) forwards; }
@keyframes cx-envol { 0% { transform: none; opacity: 1; } 100% { transform: translate(90px, -60px) rotate(25deg) scale(.6); opacity: 0; } }

/* Coordonnées : icônes qui émettent une onde, ligne qui glisse au survol */
.info-item { position: relative; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.info-item:hover { transform: translateX(6px); }
[dir="rtl"] .info-item:hover { transform: translateX(-6px); }
.info-icon { position: relative; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background .25s ease, color .25s ease; }
.info-icon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(184, 146, 58, .65); opacity: 0; animation: cx-onde 3.4s ease-out infinite; animation-delay: calc(var(--k, 0) * .5s); }
@keyframes cx-onde { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
.info-item:hover .info-icon { transform: scale(1.12) rotate(-6deg); background: linear-gradient(135deg, #b81a2a, #6f0a15); color: #f6df9a; }
.info-item:hover .info-icon i { color: #f6df9a; }

/* Titres de cartes : trait doré qui se dessine */
.card-title { position: relative; }
.cx-pret .cx-vu .card-title::before, .cx-pret .card-title.cx-vu::before { animation: cx-trait .9s ease .3s both; transform-origin: left center; }
[dir="rtl"] .cx-pret .cx-vu .card-title::before { transform-origin: right center; }
@keyframes cx-trait { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce), print {
    .cx-pret .cx-rev { opacity: 1; transform: none; filter: none; transition: none; }
    .contact-card::after, .btn-submit::before, .info-icon::after { animation: none; display: none; }
    .btn-submit.cx-envol i { animation: none; }
}
@media (hover: none) { .contact-card.cx-incline { transform: none; } }

/* ════════════════════════════════════════════════════════════════════════════
   Version « cockpit » : formulaire compact en grille, jauge intégrée au champ, cadre HUD doré,
   et carte de coordonnées en scène sombre (faisceaux de lumière, tuiles de verre, actions rapides). Charte rouge, or, parchemin.
   ════════════════════════════════════════════════════════════════════════════ */
.contact-index-page .contact-section { padding-top: 40px; padding-bottom: 44px; }
.contact-index-page .contact-layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 26px; align-items: stretch; }
@media (max-width: 992px) { .contact-index-page .contact-layout { grid-template-columns: 1fr; } }

/* Cadre HUD : quatre coins dorés */
.contact-index-page .contact-card-body { position: relative; padding: 30px 32px 28px; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; }
.contact-index-page .contact-card-body::before {
    content: ''; position: absolute; inset: 12px; pointer-events: none; z-index: 4; opacity: .85;
    background:
        linear-gradient(#c9a24a, #c9a24a) 0 0 / 18px 2px, linear-gradient(#c9a24a, #c9a24a) 0 0 / 2px 18px,
        linear-gradient(#c9a24a, #c9a24a) 100% 0 / 18px 2px, linear-gradient(#c9a24a, #c9a24a) 100% 0 / 2px 18px,
        linear-gradient(#c9a24a, #c9a24a) 0 100% / 18px 2px, linear-gradient(#c9a24a, #c9a24a) 0 100% / 2px 18px,
        linear-gradient(#c9a24a, #c9a24a) 100% 100% / 18px 2px, linear-gradient(#c9a24a, #c9a24a) 100% 100% / 2px 18px;
    background-repeat: no-repeat;
}

/* Formulaire : grille à deux colonnes (nom / courriel côte à côte), plus de vide */
.contact-index-page #contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; flex: 1; align-content: start; }
.contact-index-page #contact-form .form-group { margin: 0; }
.contact-index-page #contact-form .form-group:nth-of-type(n+3), .contact-index-page #contact-form .form-actions { grid-column: 1 / -1; }
@media (max-width: 640px) { .contact-index-page #contact-form { grid-template-columns: 1fr; } .contact-index-page #contact-form .form-group { grid-column: 1; } }
.contact-index-page .form-label { margin-bottom: 6px; font-size: 11.5px; }
.contact-index-page .form-counter { font-variant-numeric: tabular-nums; }
.contact-index-page textarea.form-control { min-height: 130px; }

/* Jauge intégrée au bas du champ (remplace la barre séparée) */
.contact-index-page .form-control {
    background-image: linear-gradient(90deg, #dcbd70, #980f1e); background-repeat: no-repeat; background-position: 0 100%;
    background-size: calc(var(--p, 0) * 100%) 3px; transition: background-size .3s ease, border-color .25s ease, box-shadow .3s ease, transform .25s ease;
}
[dir="rtl"] .contact-index-page .form-control { background-position: 100% 100%; }
.contact-index-page .cx-jauge { display: none; }
.contact-index-page .form-group.cx-proche .form-control { background-image: linear-gradient(90deg, #e0a030, #c62828); }

/* Bouton : pleine largeur, effet « énergie » */
.contact-index-page .form-actions { margin-top: 4px; }
.contact-index-page .btn-submit { width: 100%; padding: 14px 24px; font-size: 15.5px; letter-spacing: .3px; }

/* ── Carte de coordonnées : scène sombre ── */
.contact-index-page .contact-side .contact-card {
    background: radial-gradient(ellipse 90% 60% at 50% 105%, rgba(255, 190, 100, .22), transparent 70%), linear-gradient(160deg, #1d0a0c 0%, #34120f 55%, #4a2014 100%);
    border-color: rgba(201, 168, 76, .7); color: #f6ead3;
}
.contact-index-page .contact-side .contact-card-body { z-index: 3; }
.contact-index-page .contact-side .card-title { color: #f6df9a; margin-bottom: 18px; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.contact-index-page .contact-side .card-title::before { background: #c9a24a; }
.cx-scene { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; direction: ltr; }
.contact-index-page .contact-side .contact-card-body, .contact-index-page .contact-side .info-list { position: relative; z-index: 3; }

.contact-index-page .info-list { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 12px; }
.contact-index-page .info-item:first-child { grid-column: 1 / -1; }
.contact-index-page .info-item {
    align-items: center; gap: 12px; padding: 14px 14px; border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04));
    border: 1px solid rgba(220, 189, 112, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 22px -16px rgba(0, 0, 0, .8);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .25s ease, background .25s ease, box-shadow .3s ease;
}
.contact-index-page .info-item:hover { transform: translateY(-4px); border-color: #f3dc92; background: linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07)); box-shadow: 0 16px 28px -14px rgba(0, 0, 0, .9), 0 0 0 1px rgba(243, 220, 146, .35); }
[dir="rtl"] .contact-index-page .info-item:hover { transform: translateY(-4px); }
.contact-index-page .info-icon { width: 42px; height: 42px; background: linear-gradient(135deg, #f3dc92, #c9a84c 60%, #8a6a1f); border-color: rgba(255, 243, 196, .6); color: #5a0a14; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .7); }
.contact-index-page .info-icon::after { border-color: rgba(243, 220, 146, .8); }
.contact-index-page .info-item:hover .info-icon { background: linear-gradient(135deg, #b81a2a, #6f0a15); color: #f6df9a; }
.contact-index-page .info-label { color: #d9c08a; }
.contact-index-page .info-value { color: #fff; font-size: 14.5px; }
.contact-index-page a.info-value:hover { color: #f3dc92; }

/* Actions rapides sous les tuiles */
.cx-actions { position: relative; z-index: 3; display: flex; gap: 10px; margin-top: 14px; }
.cx-actions a {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 10px; border-radius: 999px; text-decoration: none;
    font-size: 13px; font-weight: 700; color: #fff; border: 1px solid rgba(220, 189, 112, .7); background: linear-gradient(135deg, rgba(184, 26, 42, .9), rgba(111, 10, 21, .9));
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .8); transition: transform .25s ease, box-shadow .3s ease, background .25s ease;
}
.cx-actions a i { color: #f3dc92; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.cx-actions a:hover { transform: translateY(-3px); box-shadow: 0 14px 24px -12px rgba(0, 0, 0, .9), 0 0 18px rgba(243, 220, 146, .3); background: linear-gradient(135deg, #c9202f, #8a0f1d); color: #fff; }
.cx-actions a:hover i { transform: scale(1.25) rotate(-8deg); }
@media (max-width: 480px) { .cx-actions a span { display: none; } }
@media (prefers-reduced-motion: reduce), print { .cx-scene { display: none; } }
.contact-index-page .form-label { min-height: 30px; gap: 8px; }
.contact-index-page .form-label-left { min-width: 0; }
.contact-index-page .form-counter { white-space: nowrap; font-size: 10.5px; flex-shrink: 0; }
@media (max-width: 1250px) { .contact-index-page .form-counter { font-size: 0; } .contact-index-page .form-counter::before { content: attr(data-court); font-size: 10.5px; } }
@media (max-width: 1250px) { .contact-index-page .info-value { font-size: 12.5px; } .contact-index-page .info-item { padding: 12px 10px; gap: 9px; } .contact-index-page .info-icon { width: 36px; height: 36px; font-size: 14px; } }

/* ── Variante claire de la carte de coordonnées (parchemin lumineux, faisceaux dorés) ── */
.contact-index-page .contact-side .contact-card {
    background: radial-gradient(ellipse 90% 55% at 50% 108%, rgba(255, 196, 96, .55), transparent 72%), linear-gradient(160deg, #fffaf0 0%, #f9ebc9 55%, #f3dba5 100%);
    border-color: rgba(184, 146, 58, .75); color: #5b4a3a;
}
.contact-index-page .contact-side .card-title { color: var(--d-red, #980f1e); text-shadow: none; }
.contact-index-page .contact-side .card-title::before { background: var(--d-red, #980f1e); }
.contact-side .cx-scene .ha-sol { mix-blend-mode: normal; background: radial-gradient(ellipse 60% 100% at 50% 100%, rgba(255, 190, 90, .55), rgba(255, 215, 140, .22) 50%, transparent 74%); }
.contact-side .cx-scene .ha-rayon { mix-blend-mode: normal; filter: blur(7px); background: linear-gradient(0deg, rgba(240, 180, 70, .5), rgba(250, 205, 120, .26) 40%, rgba(255, 220, 150, 0) 92%); }
.contact-index-page .contact-side .info-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, .85), rgba(255, 250, 235, .6)); border: 1px solid rgba(184, 146, 58, .5);
    box-shadow: 0 10px 22px -16px rgba(111, 10, 21, .45), inset 0 1px 0 #fff;
}
.contact-index-page .contact-side .info-item:hover { background: #fff; border-color: var(--d-red, #980f1e); box-shadow: 0 16px 28px -14px rgba(111, 10, 21, .5); }
.contact-index-page .contact-side .info-label { color: #8a6a1f; }
.contact-index-page .contact-side .info-value { color: #2b1d1f; }
.contact-index-page .contact-side a.info-value:hover { color: var(--d-red, #980f1e); }
.contact-index-page .contact-side .info-icon { background: linear-gradient(135deg, #b81a2a, #6f0a15); border-color: #c9a24a; color: #f6df9a; }
.contact-index-page .contact-side .info-item:hover .info-icon { background: linear-gradient(135deg, #f3dc92, #c9a84c 60%, #8a6a1f); color: #5a0a14; }
.contact-index-page .contact-side .info-icon::after { border-color: rgba(152, 15, 30, .55); }

/* ── Variante « bordeaux » de la charte : ni trop sombre, ni trop claire, pour que les faisceaux soient bien visibles ── */
.contact-index-page .contact-side .contact-card {
    background: radial-gradient(ellipse 90% 55% at 50% 108%, rgba(255, 205, 110, .45), transparent 72%), linear-gradient(160deg, #a3162a 0%, #980f1e 50%, #b92234 100%);
    border-color: rgba(243, 220, 146, .8); color: #fff3d8;
}
.contact-index-page .contact-side .card-title { color: #fff3c4; text-shadow: 0 2px 8px rgba(80, 0, 10, .45); }
.contact-index-page .contact-side .card-title::before { background: #f3dc92; }
.contact-side .cx-scene .ha-sol { mix-blend-mode: screen; background: radial-gradient(ellipse 65% 100% at 50% 100%, rgba(255, 214, 130, .75), rgba(255, 190, 100, .3) 50%, transparent 75%); }
.contact-side .cx-scene .ha-rayon { mix-blend-mode: screen; filter: blur(4px); background: linear-gradient(0deg, rgba(255, 226, 150, .8), rgba(255, 210, 130, .42) 40%, rgba(255, 200, 120, 0) 92%); }
.contact-index-page .contact-side .info-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .08)); border: 1px solid rgba(243, 220, 146, .5);
    box-shadow: 0 12px 24px -16px rgba(60, 0, 8, .7), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.contact-index-page .contact-side .info-item:hover { background: linear-gradient(145deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .12)); border-color: #f3dc92; box-shadow: 0 18px 30px -14px rgba(60, 0, 8, .8), 0 0 0 1px rgba(243, 220, 146, .4); }
.contact-index-page .contact-side .info-label { color: #f6df9a; }
.contact-index-page .contact-side .info-value { color: #fff; }
.contact-index-page .contact-side a.info-value:hover { color: #f3dc92; }
.contact-index-page .contact-side .info-icon { background: linear-gradient(135deg, #f3dc92, #c9a84c 60%, #8a6a1f); border-color: rgba(255, 243, 196, .7); color: #5a0a14; }
.contact-index-page .contact-side .info-item:hover .info-icon { background: linear-gradient(135deg, #fff3c4, #f3dc92 60%, #c9a84c); color: #6f0a15; }
.contact-index-page .contact-side .info-icon::after { border-color: rgba(243, 220, 146, .85); }
.cx-actions a { background: linear-gradient(135deg, rgba(60, 0, 10, .55), rgba(40, 0, 8, .6)); border-color: rgba(243, 220, 146, .75); }
.cx-actions a:hover { background: linear-gradient(135deg, rgba(111, 10, 21, .9), rgba(60, 0, 10, .9)); }

/* ── Variante « bleu nuit » : couleur froide de la charte (--d-navy), faisceaux dorés bien visibles ── */
.contact-index-page .contact-side .contact-card {
    background: radial-gradient(ellipse 90% 55% at 50% 108%, rgba(255, 205, 110, .4), transparent 72%), linear-gradient(160deg, #2a4766 0%, #25405c 50%, #34577a 100%);
    border-color: rgba(243, 220, 146, .8); color: #f4f7fb;
}
.contact-index-page .contact-side .card-title { color: #fff3c4; text-shadow: 0 2px 8px rgba(10, 25, 45, .5); }
.contact-index-page .contact-side .info-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .06)); border: 1px solid rgba(243, 220, 146, .45);
    box-shadow: 0 12px 24px -16px rgba(5, 18, 35, .8), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.contact-index-page .contact-side .info-item:hover { background: linear-gradient(145deg, rgba(255, 255, 255, .27), rgba(255, 255, 255, .1)); box-shadow: 0 18px 30px -14px rgba(5, 18, 35, .9), 0 0 0 1px rgba(243, 220, 146, .4); }
.contact-index-page .contact-side .info-label { color: #f3dc92; }
.cx-actions a { background: linear-gradient(135deg, rgba(14, 32, 56, .7), rgba(10, 24, 44, .75)); border-color: rgba(243, 220, 146, .75); }
.cx-actions a:hover { background: linear-gradient(135deg, rgba(20, 44, 74, .95), rgba(10, 24, 44, .95)); }

/* ── Variante « marron clair » (mode clair) : remplace le bleu, même famille de brun que le reste du site ── */
.contact-index-page .contact-side .contact-card {
    background: radial-gradient(ellipse 90% 55% at 50% 108%, rgba(255, 214, 130, .5), transparent 72%), linear-gradient(160deg, #a37d5c 0%, #97704f 50%, #b08760 100%);
    border-color: rgba(243, 220, 146, .85); color: #fffaf0;
}
.contact-index-page .contact-side .card-title { color: #fff6d6; text-shadow: 0 2px 8px rgba(70, 40, 20, .45); }
.contact-index-page .contact-side .info-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .1)); border: 1px solid rgba(255, 236, 180, .6);
    box-shadow: 0 12px 24px -16px rgba(70, 40, 20, .7), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.contact-index-page .contact-side .info-item:hover { background: linear-gradient(145deg, rgba(255, 255, 255, .36), rgba(255, 255, 255, .16)); }
.contact-index-page .contact-side .info-label { color: #fff0bd; }
.cx-actions a { background: linear-gradient(135deg, rgba(90, 55, 32, .72), rgba(70, 42, 24, .78)); border-color: rgba(255, 236, 180, .8); }
.cx-actions a:hover { background: linear-gradient(135deg, rgba(120, 30, 30, .9), rgba(80, 20, 20, .92)); }
