/* =========================================================
   EPHITECH BT - EASY IRVE
   Variante outil interne : bleu BT plus fonce, sans vert HT
   ========================================================= */

:root{
  --bg:#d9e8ff;
  --bg2:#b8cef4;
  --ink:#071b2f;
  --muted:#4f6475;
  --accent:#0a3d91;
  --accent2:#1256c7;
  --accent-dark:#06265e;
  --accent-deep:#041a42;
  --yellow:#ffd400;
  --yellow-soft:#fff7c2;
  --white:#ffffff;
  --border:#b9c9dc;
  --card:#f7fbff;
  --line:#c3d2e4;
  --warn:#8a5a00;
  --warn-bg:#fff6d6;
  --danger:#9f1d1d;
  --danger-bg:#fff0f0;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Arial,sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 18% 24%, rgba(10,61,145,0.26), transparent 38%),
    radial-gradient(circle at 84% 72%, rgba(18,86,199,0.20), transparent 42%),
    linear-gradient(180deg, #b8cff5 0%, var(--bg) 46%, var(--bg2) 100%);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  background-image:
    linear-gradient(120deg, transparent 48%, rgba(0,80,180,0.10) 49%, transparent 50%),
    linear-gradient(300deg, transparent 48%, rgba(0,80,180,0.08) 49%, transparent 50%);
  background-size:320px 320px;
  pointer-events:none;
  z-index:0;
}

.tool-header{
    position:sticky;
    top:0;
    z-index:100;

    backdrop-filter:blur(8px);

    background:rgba(7,27,47,0.92);

    border-bottom:1px solid rgba(255,255,255,0.08);
}

.tool-header-inner{
    max-width:1180px;
    margin:auto;

    padding:14px 24px;

    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.tool-logo img{
    height:52px;
    width:auto;
    display:block;
}

.tool-header-right{
    display:flex;
    align-items:center;
    gap:14px;
}

.tool-badge{
    color:#fff;
    font-size:0.85rem;
    font-weight:700;

    background:rgba(255,255,255,0.10);

    padding:8px 12px;
    border-radius:999px;
}

.tool-back-link{
    color:#fff;
    text-decoration:none;
    font-weight:700;

    padding:10px 14px;
    border-radius:10px;

    background:rgba(255,255,255,0.08);

    transition:0.18s ease;
}

.tool-back-link:hover{
    background:rgba(255,255,255,0.16);
}

.wrap{
  position:relative;
  z-index:1;
  max-width:1120px;
  margin:0 auto;
  padding:28px 18px;
}

.hero,.card{
  background:rgba(255,255,255,0.92);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:0 18px 45px rgba(4,26,66,.16);
}

.hero{
  padding:28px;
  margin-bottom:18px;
  border-top:5px solid var(--accent2);
}

.eyebrow{
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--accent);
  margin-bottom:10px;
}

h1{
  margin:0 0 12px;
  font-size:clamp(1.55rem,3vw,2.35rem);
  line-height:1.1;
  color:var(--accent-deep);
}

h2{
  margin:0 0 18px;
  font-size:1.2rem;
  color:var(--accent-deep);
}

.sub,.muted{color:var(--muted);line-height:1.55}

.notice{
  margin-top:16px;
  background:#eef5ff;
  border-left:4px solid var(--yellow);
  border-radius:14px;
  padding:14px 16px;
  color:#24364b;
  line-height:1.5;
}

.grid{display:grid;grid-template-columns:1.05fr .95fr;gap:18px}
.card{padding:22px}
.form-grid,.result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.full{grid-column:1/-1}
.field{display:flex;flex-direction:column;gap:7px}
label{font-size:.92rem;font-weight:800;color:#24364b}
.optional{font-weight:600;color:var(--muted)}
input,select,button{font:inherit}

input,select{
  width:100%;
  border:1px solid var(--border);
  border-radius:13px;
  padding:12px 13px;
  background:#fff;
  color:var(--ink);
}
.check-option input[type="checkbox"]{
  width:18px;
  height:18px;
  flex:0 0 18px;
  margin:0;

  accent-color:var(--accent);
}

input:focus,select:focus{
  outline:none;
  border-color:var(--accent2);
  box-shadow:0 0 0 3px rgba(18,86,199,.18);
}

.unit-input{
  display:flex;
  align-items:center;
  border:1px solid var(--border);
  border-radius:13px;
  background:#fff;
  overflow:hidden;
}
.unit-input input{border:0;border-radius:0}
.unit-input span{padding:0 13px;color:var(--muted);font-weight:800}

.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
button{border:0;border-radius:13px;padding:13px 17px;font-weight:800;cursor:pointer}
.primary{background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff}
.secondary{background:#dbe7f7;color:var(--accent-deep)}
.primary:hover,.secondary:hover{filter:brightness(.97)}

.result-card{position:sticky;top:18px;align-self:start}
.client-results{margin-top:14px}
.result{border:1px solid var(--line);border-radius:15px;padding:15px;background:#fbfdff}
.result.strong{background:#eef5ff;border-color:#b6cae5}
.result .k{font-size:.8rem;color:var(--muted);margin-bottom:7px}
.result .v{font-size:1.15rem;font-weight:900;color:var(--ink);line-height:1.25}

.pill{display:inline-block;padding:8px 12px;border-radius:999px;font-size:.86rem;font-weight:900;margin-bottom:4px}
.pill.ok{background:#eaf2ff;color:var(--accent)}
.pill.warn{background:var(--warn-bg);color:var(--warn)}
.pill.danger{background:var(--danger-bg);color:var(--danger)}

.client-message{
  margin-top:14px;
  padding:14px 15px;
  border-radius:15px;
  background:#eaf2ff;
  color:#06265e;
  font-weight:700;
  line-height:1.45;
}

.warning-list{margin:12px 0 0 19px;padding:0;color:#7c4a00;line-height:1.45}
.warning-list:empty{display:none}

.cta-box{
  margin-top:16px;
  border-radius:16px;
  padding:15px;
  background:linear-gradient(135deg,var(--accent-deep),var(--accent-dark));
  color:#fff;
  display:flex;
  flex-direction:column;
  gap:5px;
  border-left:5px solid var(--yellow);
}


/* =========================================
   CTA CONTACT IRVE
   ========================================= */

#contactWithEstimateBtn{
    width:100%;
    margin-top:24px;
    padding:18px 24px;

    border:none;
    border-radius:14px;

    cursor:pointer;

    font-size:1rem;
    font-weight:700;
    letter-spacing:0.2px;

    color:#fff;

    background:
        linear-gradient(
            135deg,
            #0f4fc5 0%,
            #0a3d91 100%
        );

    box-shadow:
        0 10px 24px rgba(10,61,145,0.25);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

#contactWithEstimateBtn:hover{
    transform:translateY(-2px);

    background:
        linear-gradient(
            135deg,
            #1762ea 0%,
            #0d47a8 100%
        );

    box-shadow:
        0 14px 30px rgba(10,61,145,0.35);
}

#contactWithEstimateBtn:active{
    transform:translateY(0);
}


.cta-box span{color:#dce8f5}

.expert{margin-top:16px;border-top:1px solid var(--line);padding-top:12px}
.expert summary{cursor:pointer;font-weight:900;color:var(--accent-deep)}
.expert-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}
.expert-grid div{background:#f3f7fd;border:1px solid var(--line);border-radius:12px;padding:10px}
.expert-grid span{display:block;color:var(--muted);font-size:.75rem}
.expert-grid strong{display:block;margin-top:4px}
.small{font-size:.9rem}

@media(max-width:850px){
  .grid,.form-grid,.result-grid{grid-template-columns:1fr}
  .result-card{position:static}
  .wrap{padding:18px 12px}
  .hero,.card{border-radius:16px}
  .expert-grid{grid-template-columns:repeat(2,1fr)}
}


/* =========================================================
   AJUSTEMENTS UX MOBILE - EASY IRVE
   Objectif :
   - Desktop : formulaire + résultats côte à côte.
   - Mobile : parcours en 2 étapes pour éviter le scroll long.
   ========================================================= */

/* Court texte d'aide dans la carte de saisie. */
.card-intro{
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.5;
}

/* Bouton retour affiché seulement en mode mobile. */
.mobile-back-btn{
  display:none;
  width:100%;
  margin-top:16px;
}

/* Le CTA contact est placé dans la carte résultat. */
#contactWithEstimateBtn{
  width:100%;
  margin-top:16px;
}

/* Desktop : les deux cartes restent visibles. */
@media(min-width:851px){
  #mobileStepForm,
  #mobileStepResult{
    display:block;
  }
}

/* Mobile : affichage en deux écrans. */
@media(max-width:850px){

  .tool-header{
    position:static;
  }

  .tool-header-inner{
    padding:12px 14px;
    align-items:flex-start;
  }

  .tool-logo img{
    height:44px;
  }

  .tool-header-right{
    align-items:flex-end;
    gap:8px;
  }

  .tool-badge{
    display:none;
  }

  .tool-back-link{
    font-size:.88rem;
    padding:9px 11px;
  }

  .wrap{
    padding:14px 10px 24px;
  }

  .hero{
    padding:20px;
    margin-bottom:14px;
  }

  .hero h1,
  h1{
    font-size:1.55rem;
  }

  .sub{
    font-size:.98rem;
  }

  .notice{
    font-size:.92rem;
  }

  .grid{
    display:block;
  }

  .card{
    padding:18px;
  }

  .actions{
    flex-direction:column;
  }

  .actions button{
    width:100%;
  }

  /* État mobile initial : saisie visible, résultat masqué. */
  #mobileStepResult{
    display:none;
  }

  /* État mobile après clic sur "Voir ma simulation". */
  body.show-results #mobileStepForm{
    display:none;
  }

  body.show-results #mobileStepResult{
    display:block;
  }

  .mobile-back-btn{
    display:block;
  }

  .result-card{
    position:static;
  }

  .client-results{
    margin-top:12px;
  }

  .result{
    padding:13px;
  }

  .result .v{
    font-size:1.08rem;
  }

  .expert{
    margin-top:18px;
  }
}

/* =========================================================
   HERO compact avec logo intégré
   ========================================================= */

.tool-title-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.hero-mini-logo{
  height:34px;
  width:auto;
  display:block;
  background:#fff;
  border-radius:4px;
}

.action-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  padding:13px 17px;
  font-weight:800;
  text-decoration:none;
}

/* Header supprimé */
.tool-header{
  display:none;
}

/* Version téléphone : HERO beaucoup plus compact */
@media(max-width:850px){

  .hero{
    padding:16px;
    margin-bottom:10px;
  }

  .tool-title-row{
    gap:9px;
    margin-bottom:8px;
  }

  .hero-mini-logo{
    height:28px;
  }

  .eyebrow{
    font-size:.72rem;
    margin-bottom:0;
  }

  .hero h1,
  h1{
    font-size:1.32rem;
    line-height:1.15;
    margin-bottom:8px;
  }

  .sub{
    font-size:.92rem;
    line-height:1.35;
  }

  .notice{
    margin-top:10px;
    padding:11px 12px;
    font-size:.86rem;
    line-height:1.35;
  }

  .card-intro{
    display:none;
  }
}

.option-checks{
  margin-top:4px;
  padding:14px;

  border:1px solid var(--line);
  border-radius:16px;

  background:#eef5ff;
}

.option-checks-title{
  display:block;

  margin-bottom:10px;

  font-size:.92rem;
  font-weight:900;
  color:var(--accent-deep);
}

.check-option{
  display:flex;
  align-items:center;
  gap:10px;

  padding:9px 0;

  cursor:pointer;
}

.check-option input{
  width:18px;
  height:18px;
  accent-color:var(--accent);
}

.check-option span{
  font-weight:800;
  color:#24364b;
}
