/* =========================================================
   TDV · Contact — Les Toits Du Var  [CSS v1.3.8]
   Palette : jaune #f9bf21 · bleu 7bb9e7→0078be · vert #5c7d33 · dark #002a4c
   ========================================================= */
.tdv-c{
    --tdv-accent:#f9bf21;
    --tdv-primary:#0078be;
    --tdv-dark:#002a4c;
    --tdv-light:#f6f9fb;
    font-family:inherit;
    position:relative;
}

/* ---------- GRID & DISPOSITIONS ---------- */
.tdv-c-grid{ display:grid; gap:28px; }
.tdv-c.layout-form-aside .tdv-c-grid{ grid-template-columns:1.4fr 1fr; grid-auto-rows:min-content; }
.tdv-c.layout-form-aside .tdv-c-col-form{ grid-row:1 / span 2; }
.tdv-c.layout-two-col .tdv-c-grid{ grid-template-columns:1fr 1fr; }
.tdv-c.layout-stacked .tdv-c-grid{ grid-template-columns:1fr; }
.tdv-c-col{ min-width:0; display:flex; }
.tdv-c-col > *{ width:100%; }

/* ---------- CARTES ---------- */
.tdv-c-card{
    background:#fff;
    border-radius:18px;
    padding:30px;
    box-shadow:0 10px 40px rgba(0,42,76,.08);
}
.tdv-c-block-title{ margin:0 0 6px; font-size:1.35rem; font-weight:800; color:var(--tdv-dark); line-height:1.2; }
.tdv-c-block-sub{ margin:0 0 22px; color:#5a6b7a; font-size:.97rem; line-height:1.55; }

/* ---------- FORMULAIRE ---------- */
.tdv-c-formel{ display:flex; flex-direction:column; gap:16px; }
.tdv-c-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.tdv-c-group{ display:flex; flex-direction:column; gap:6px; }
.tdv-c-group label{ font-size:.82rem; font-weight:700; color:var(--tdv-dark); letter-spacing:.2px; }
.tdv-c-field{
    width:100%; box-sizing:border-box;
    background-color:var(--tdv-light);
    border:1.5px solid #e2e9ef;
    border-radius:30px !important;
    padding:14px 22px;
    font-size:.97rem;
    color:var(--tdv-dark);
    font-family:inherit;
    transition:border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.tdv-c-field:focus{
    outline:none;
    border-color:var(--tdv-primary);
    background-color:#fff;
    box-shadow:0 0 0 4px rgba(0,120,190,.12);
}
.tdv-c-field.is-error{ border-color:#e0413e; box-shadow:0 0 0 4px rgba(224,65,62,.1); }
textarea.tdv-c-field{ resize:vertical; min-height:120px; border-radius:22px !important; }
select.tdv-c-field{
    appearance:none; -webkit-appearance:none; -moz-appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='none' stroke='%230078be' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M5 7l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 20px center;
    background-size:18px;
    padding-right:48px;
    cursor:pointer;
}

.tdv-c-hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

.tdv-c-rgpd{ display:flex; align-items:flex-start; gap:10px; font-size:.82rem; color:#5a6b7a; line-height:1.5; cursor:pointer; }
.tdv-c-rgpd input{ margin-top:3px; accent-color:var(--tdv-primary); flex:0 0 auto; width:16px; height:16px; }
.tdv-c-rgpd-link{ color:var(--tdv-primary); font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.tdv-c-rgpd-link:hover{ color:var(--tdv-dark); }

/* Message d'erreur inline */
.tdv-c-err{ display:block; color:#e0413e; font-size:.8rem; font-weight:600; margin-top:6px; animation:tdvCErr .25s ease; }
@keyframes tdvCErr{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }

.tdv-c-submit{
    position:relative;
    display:flex; width:100%; align-items:center; justify-content:center; gap:10px;
    background:var(--tdv-accent);
    color:var(--tdv-dark);
    border:none; border-radius:30px !important;
    padding:17px 28px;
    font-size:1rem; font-weight:800;
    cursor:pointer;
    font-family:inherit;
    transition:transform .2s ease, box-shadow .2s ease, filter .2s ease;
    box-shadow:0 8px 22px rgba(249,191,33,.32);
}
.tdv-c-submit:hover{ transform:translateY(-2px); box-shadow:0 12px 28px rgba(249,191,33,.42); }
.tdv-c-submit:disabled{ opacity:.7; cursor:not-allowed; transform:none; }
.tdv-c-spinner{
    width:18px; height:18px; border-radius:50%;
    border:2.5px solid rgba(0,42,76,.25); border-top-color:var(--tdv-dark);
    display:none; animation:tdvCSpin .7s linear infinite;
}
.tdv-c-submit.is-loading .tdv-c-spinner{ display:inline-block; }
.tdv-c-submit.is-loading .tdv-c-submit-text{ opacity:.6; }
@keyframes tdvCSpin{ to{ transform:rotate(360deg); } }

/* ---------- COORDONNÉES ---------- */
.tdv-c-coords{ --tdv-coords-g1:#002a4c; --tdv-coords-g2:#0078be; background:linear-gradient(150deg, var(--tdv-coords-g1) 0%, var(--tdv-coords-g2) 100%); color:#fff; height:100%; }
.tdv-c-coords .tdv-c-block-title{ color:#fff; }
.tdv-c-coord-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:18px; }
.tdv-c-coord{ display:flex; align-items:flex-start; gap:14px; }
.tdv-c-coord-icon{
    flex:0 0 auto; width:46px; height:46px; border-radius:12px;
    background:rgba(249,191,33,.18); color:var(--tdv-accent);
    display:flex; align-items:center; justify-content:center; font-size:18px;
}
.tdv-c-coord-icon svg{ width:1em; height:1em; fill:currentColor; }
.tdv-c-coord-body{ display:flex; flex-direction:column; gap:2px; padding-top:2px; }
.tdv-c-coord-label{ font-size:.78rem; text-transform:uppercase; letter-spacing:.6px; color:#9db4c8; font-weight:700; }
.tdv-c-coord-val{ color:#fff; font-size:1rem; font-weight:600; text-decoration:none; line-height:1.4; }
a.tdv-c-coord-val:hover{ color:var(--tdv-accent); }

.tdv-c-socials{ display:flex; gap:10px; margin-top:24px; }
.tdv-c-social{
    width:42px; height:42px; border-radius:10px;
    background:rgba(255,255,255,.1); color:#fff;
    display:flex; align-items:center; justify-content:center; font-size:16px;
    transition:background .2s ease, transform .2s ease;
}
.tdv-c-social:hover{ background:var(--tdv-accent); color:var(--tdv-dark); transform:translateY(-2px); }
.tdv-c-social svg{ width:1em; height:1em; fill:currentColor; }

/* ---------- MAP ---------- */
.tdv-c-map{ overflow:hidden; border-radius:18px; box-shadow:0 0 0 1px rgba(249,191,33,.25), 0 6px 22px rgba(249,191,33,.25); line-height:0; }
.tdv-c-map iframe{ width:100%; display:block; border:0; }

/* ---------- POPUP ---------- */
.tdv-c-popup{ position:fixed; inset:0; z-index:99999; display:none; align-items:center; justify-content:center; padding:20px; }
.tdv-c-popup.is-open{ display:flex; }
.tdv-c-popup-overlay{ position:absolute; inset:0; background:rgba(0,42,76,.6); backdrop-filter:blur(5px); animation:tdvCFade .3s ease; }
.tdv-c-popup-box{
    position:relative; z-index:1;
    background:#fff; border-radius:26px;
    max-width:460px; width:100%;
    text-align:center;
    box-shadow:0 30px 90px rgba(0,42,76,.45);
    animation:tdvCPop .5s cubic-bezier(.2,.85,.3,1);
    overflow:hidden;
}

/* En-tête dégradé */
.tdv-c-popup-head{
    position:relative;
    background:linear-gradient(150deg, #002a4c 0%, #0078be 100%);
    padding:40px 30px 54px;
    overflow:hidden;
}
.tdv-c-popup.is-error .tdv-c-popup-head{ background:linear-gradient(150deg, #7a1f1d 0%, #e0413e 100%); }
.tdv-c-popup-icon{ position:relative; z-index:1; width:92px; height:92px; margin:0 auto; }
.tdv-c-popup-icon svg{ position:relative; width:100%; height:100%; background:#fff; border-radius:50%; padding:6px; box-sizing:border-box; }
.tdv-c-popup-icon-success circle{ stroke:#5c7d33; stroke-width:2.5; stroke-dasharray:151; stroke-dashoffset:151; animation:tdvCCircle .6s .2s cubic-bezier(.65,0,.45,1) forwards; }
.tdv-c-popup-icon-success path{ stroke:#5c7d33; stroke-width:4; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:48; stroke-dashoffset:48; animation:tdvCCheck .4s .75s cubic-bezier(.65,0,.45,1) forwards; }
.tdv-c-popup.is-error .tdv-c-popup-icon-success circle{ stroke:#e0413e; }
.tdv-c-popup.is-error .tdv-c-popup-icon-success path{ stroke:#e0413e; }

/* Corps */
.tdv-c-popup-body{ padding:30px 34px 34px; margin-top:-24px; position:relative; z-index:1; }
.tdv-c-popup-title{ margin:0 0 10px; font-size:1.5rem; font-weight:800; color:var(--tdv-dark); line-height:1.25; }
.tdv-c-popup-text{ margin:0 0 24px; color:#5a6b7a; font-size:.97rem; line-height:1.6; }

/* Étapes */
.tdv-c-popup-steps{ display:flex; flex-direction:column; gap:12px; text-align:left; margin:0 0 24px; }
.tdv-c-popup-step{ display:flex; align-items:center; gap:12px; background:#f6f9fb; border-radius:14px; padding:13px 16px; }
.tdv-c-popup-step-ic{
    flex:0 0 auto; width:36px; height:36px; border-radius:10px;
    background:rgba(0,120,190,.1); color:var(--tdv-primary);
    display:flex; align-items:center; justify-content:center;
}
.tdv-c-popup-step-tx{ font-size:.9rem; color:var(--tdv-dark); font-weight:600; line-height:1.4; }

/* Urgence / appels */
.tdv-c-popup-urgent{ margin:0 0 12px; font-size:.85rem; color:#8595a3; font-weight:600; }
.tdv-c-popup-phones{ display:flex; gap:10px; margin:0 0 24px; }
.tdv-c-popup-phone{
    flex:1; display:inline-flex; align-items:center; justify-content:center; gap:8px;
    padding:13px 12px; border-radius:30px; text-decoration:none;
    font-size:.95rem; font-weight:700;
    transition:transform .2s ease, box-shadow .2s ease;
}
.tdv-c-popup-phone svg{ flex:0 0 auto; }
.tdv-c-popup-phone.is-primary{ background:var(--tdv-primary); color:#fff; box-shadow:0 6px 18px rgba(0,120,190,.3); }
.tdv-c-popup-phone.is-accent{ background:var(--tdv-accent); color:var(--tdv-dark); box-shadow:0 6px 18px rgba(249,191,33,.3); }
.tdv-c-popup-phone:hover{ transform:translateY(-2px); }

.tdv-c-popup-btn{
    background:none !important; color:#8595a3 !important;
    border:1.5px solid #e2e9ef !important; border-radius:30px !important; padding:13px 40px;
    font-size:.95rem; font-weight:700; cursor:pointer; font-family:inherit;
    transition:border-color .2s ease, color .2s ease; box-shadow:none !important;
}
.tdv-c-popup-btn:hover{ border-color:var(--tdv-primary) !important; color:var(--tdv-primary) !important; background:none !important; }

@keyframes tdvCFade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes tdvCPop{ from{ opacity:0; transform:translateY(28px) scale(.92); } to{ opacity:1; transform:none; } }
@keyframes tdvCCircle{ to{ stroke-dashoffset:0; } }
@keyframes tdvCCheck{ to{ stroke-dashoffset:0; } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:1024px){
    .tdv-c.layout-form-aside .tdv-c-grid,
    .tdv-c.layout-two-col .tdv-c-grid{ grid-template-columns:1fr; }
    .tdv-c.layout-form-aside .tdv-c-col-form{ grid-row:auto; }
}

@media (max-width:767px){
    .tdv-c-grid{ display:flex; flex-direction:column; gap:20px; }
    .tdv-c-col{ order:var(--m-order,1); }
    .tdv-c-card{ padding:24px 20px; }
    .tdv-c-row{ grid-template-columns:1fr; }
    .tdv-c-block-title{ font-size:1.2rem; }
    .tdv-c-popup-head{ padding:34px 24px 48px; }
    .tdv-c-popup-body{ padding:26px 22px 28px; }
    .tdv-c-popup-phones{ flex-direction:column; }
    .tdv-c-popup-title{ font-size:1.3rem; }
}

@media (prefers-reduced-motion:reduce){
    .tdv-c-popup-overlay, .tdv-c-popup-box,
    .tdv-c-popup-icon-success circle, .tdv-c-popup-icon-success path{ animation:none !important; }
    .tdv-c-popup-icon-success circle{ stroke-dashoffset:0; }
    .tdv-c-popup-icon-success path{ stroke-dashoffset:0; }
    .tdv-c-spinner{ animation-duration:1.4s; }
}
