/* ══════════════════════════════════════════════════════════════
   Styles spécifiques à formules.html
══════════════════════════════════════════════════════════════ */

body { overflow-x: hidden; }

/* ── Fond montagne ──────────────────────────────────────────── */
.background {
  background: url(../images/mountain.webp) no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  padding: 3rem 1rem 4rem;
}

/* ── Titre principal ────────────────────────────────────────── */
.page-title {
  font-family: "Aboreto", serif;
  font-size: 48px;
  color: #000;
  text-align: center;
  margin: 0 auto 0.6rem;
  border-bottom: 2px solid #000;
  padding-bottom: 1rem;
  display: inline-block;
}
.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.page-subtitle {
  font-family: "Abaya", sans-serif;
  font-size: 17px;
  color: #222;
  margin-top: 0.8rem;
  font-style: italic;
}

/* ── Intro ──────────────────────────────────────────────────── */
.intro-box {
  background: rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 2rem 2.5rem;
  max-width: 860px;
  margin: 0 auto 3rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  font-family: "Abaya", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: #333;
  text-align: center;
}
.intro-box strong { color: #000; }

/* ── Grille des formules ────────────────────────────────────── */
.formules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

/* ── Carte formule ──────────────────────────────────────────── */
.formule-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.13);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.formule-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.18);
}

/* Bannière colorée en haut de la carte */
.card-banner {
  padding: 1.8rem 2rem 1.4rem;
  text-align: center;
}
.card-memoire-only .card-banner { background: #6b8596; }
.card-heritage    .card-banner { background: #9e7252; }

.card-banner h2 {
  font-family: "Aboreto", serif;
  font-size: 1.5rem;
  color: #fff;
  margin: 0 0 0.3rem;
}
.card-banner .tagline {
  font-family: "Abaya", sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  font-style: italic;
}
.creation-price {
  font-family: "Abril", serif;
  font-size: 2.6rem;
  color: #fff;
  margin: 0.6rem 0 0.1rem;
  line-height: 1;
}
.creation-label {
  font-family: "Abaya", sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Corps de la carte */
.card-body {
  padding: 0 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  flex: 1;
}

/* Liste des fonctionnalités */
.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.features-list li {
  font-family: "Abaya", sans-serif;
  font-size: 15px;
  color: #333;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  line-height: 1.5;
}
.card-memoire-only .features-list i { color: #6b8596; }
.card-heritage    .features-list i { color: #9e7252; }
.features-list i { font-size: 16px; flex-shrink: 0; margin-top: 0.2rem; }

/* Séparateur interne */
.divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 0;
}

/* Sélecteur de durée */
.duree-label {
  font-family: "Aboreto", serif;
  font-size: 15px;
  color: #111;
  margin-bottom: 0.6rem;
  display: block;
}
.duree-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.duree-btn {
  position: relative;
  cursor: pointer;
}
.duree-btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.duree-btn .btn-inner {
  display: block;
  padding: 0.7rem 0.5rem;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  background: #fafafa;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  cursor: pointer;
}
.duree-btn .btn-inner .duration {
  font-family: "Abril", serif;
  font-size: 1rem;
  color: #111;
  display: block;
}
.duree-btn .btn-inner .price-hosting {
  font-family: "Abaya", sans-serif;
  font-size: 12px;
  color: #777;
  display: block;
  margin-top: 2px;
}
.duree-btn .btn-inner .price-per-year {
  font-family: "Abaya", sans-serif;
  font-size: 11px;
  color: #aaa;
  display: block;
}
/* État sélectionné */
.card-memoire-only .duree-btn input:checked ~ .btn-inner {
  border-color: #6b8596;
  background: #edf1f4;
}
.card-heritage .duree-btn input:checked ~ .btn-inner {
  border-color: #9e7252;
  background: #f5ede5;
}
.duree-btn input:checked ~ .btn-inner .duration { color: #000; }
.duree-btn input:checked ~ .btn-inner .price-hosting { color: #444; }
.duree-btn .btn-inner:hover {
  border-color: #bbb;
  background: #f0f0f0;
}

/* Affichage du total */
.total-box {
  background: #f5f5f5;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.total-box .total-label {
  font-family: "Abaya", sans-serif;
  font-size: 14px;
  color: #555;
}
.total-box .total-label span {
  font-family: "Abaya", sans-serif;
  font-size: 13px;
  color: #888;
  display: block;
  margin-top: 2px;
}
.total-box .total-value {
  font-family: "Abril", serif;
  font-size: 2rem;
  color: #111;
}

/* Bouton principal de la carte */
.btn-choisir {
  display: block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-family: "Abril", serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  text-align: center;
  margin-top: auto;
}
.card-memoire-only .btn-choisir { background: #6b8596; }
.card-heritage    .btn-choisir { background: #9e7252; }
.btn-choisir:hover { opacity: 0.88; transform: translateY(-1px); }

/* Lien démo */
.demo-link {
  font-family: "Abaya", sans-serif;
  font-size: 13px;
  color: #777;
  text-align: center;
  text-decoration: underline;
  display: block;
  margin-top: 0.2rem;
}
.card-memoire-only .demo-link:hover { color: #6b8596; }
.card-heritage    .demo-link:hover { color: #9e7252; }

/* ── Récapitulatif commande ──────────────────────────────────── */
#recap-section {
  max-width: 860px;
  margin: 0 auto 2rem;
  background: rgba(255,255,255,0.97);
  border-radius: 16px;
  box-shadow: 0 8px 36px rgba(0,0,0,0.18);
  overflow: hidden;
  display: none; /* affiché via JS */
}
#recap-section.visible { display: block; }

.recap-header {
  background: #111;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.recap-header h3 {
  font-family: "Aboreto", serif;
  font-size: 1.1rem;
  color: #fff;
  margin: 0;
}
.recap-header i { color: rgba(255,223,82,0.9); font-size: 1.1rem; }

.recap-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Ligne récap */
.recap-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 0.8rem;
}
.recap-line:last-of-type { border-bottom: none; }
.recap-line .rl-label {
  font-family: "Abaya", sans-serif;
  font-size: 14px;
  color: #666;
}
.recap-line .rl-value {
  font-family: "Abril", serif;
  font-size: 1.05rem;
  color: #111;
}
.recap-line.recap-total-line .rl-label {
  font-family: "Aboreto", serif;
  font-size: 1rem;
  color: #111;
}
.recap-line.recap-total-line .rl-value {
  font-size: 1.7rem;
  color: #111;
}

/* Formulaire contact */
.checkout-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.checkout-form .full-width { grid-column: 1 / -1; }
.checkout-form label {
  font-family: "Abaya", sans-serif;
  font-size: 13px;
  color: #555;
  display: block;
  margin-bottom: 4px;
}
.checkout-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-family: "Abaya", sans-serif;
  font-size: 15px;
  color: #111;
  transition: border-color 0.2s;
  background: #fafafa;
}
.checkout-form input:focus {
  outline: none;
  border-color: #6b8596;
  background: #fff;
}

/* Message d'erreur */
#checkout-error {
  display: none;
  background: #fff2f2;
  border: 1px solid #f5b5b5;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-family: "Abaya", sans-serif;
  font-size: 14px;
  color: #c62828;
}

/* Bouton commander */
#btn-commander {
  display: block;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-family: "Abril", serif;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
#btn-commander:hover:not(:disabled) {
  background: #000;
  transform: translateY(-2px);
}
#btn-commander:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Abaya", sans-serif;
  font-size: 12px;
  color: #888;
  margin-top: -0.5rem;
}
.secure-note i { color: #4caf50; }

/* ── Lien vers les démos ────────────────────────────────────── */
.demo-banner {
  max-width: 860px;
  margin: 0 auto 2rem;
  background: rgba(255,255,255,0.88);
  border-radius: 12px;
  padding: 1.4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.09);
}
.demo-banner p {
  font-family: "Abaya", sans-serif;
  font-size: 15px;
  color: #333;
  margin: 0;
}
.demo-banner .btn-demo {
  display: inline-block;
  text-decoration: none;
  font-family: "Abril", serif;
  font-size: 14px;
  color: #000;
  padding: 10px 28px;
  border: 2px solid #000;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.demo-banner .btn-demo:hover { background: #000; color: #fff; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .formules-grid { grid-template-columns: 1fr; max-width: 600px; }
  .background { background-attachment: scroll; }
}
@media (max-width: 600px) {
  .page-title { font-size: 32px; }
  .card-banner h2 { font-size: 1.2rem; }
  .creation-price { font-size: 2rem; }
  .duree-btns { grid-template-columns: 1fr 1fr; }
  .checkout-form { grid-template-columns: 1fr; }
  .checkout-form .full-width { grid-column: 1; }
  .demo-banner { flex-direction: column; text-align: center; }
  .recap-body { padding: 1.4rem; }
  .card-body { padding: 0 1.2rem 1.5rem; }
}
