/* ==========================================================================
   Bonne Bise — feuille de style
   Identité visuelle reprise du site bonnebise.fr
   ========================================================================== */

:root {
  --fond: #faf8f5;
  --texte: #2c2722;
  --texte-secondaire: #7a7068;
  --accent: #a98c6d;
  --filet: #e6ddd2;
  --blanc: #ffffff;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  font-size: 17px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- En-tête / pied --- */
.entete {
  text-align: center;
  padding: 36px 20px 8px;
}
.logo { max-height: 90px; width: auto; }
.logo-texte {
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: 2px;
  color: var(--texte);
  text-decoration: none;
}

.pied {
  text-align: center;
  color: var(--texte-secondaire);
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 40px 20px 48px;
  margin-top: 40px;
  border-top: 1px solid var(--filet);
}
.pied p { margin: 4px 0; }

/* --- Conteneur principal --- */
.contenu {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 20px 0;
}
/* Pages d'administration : conteneur large pour éviter le défilement horizontal */
.contenu--large { max-width: 1180px; }

/* --- Titres / intro --- */
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.15;
  margin: 0 0 12px;
}
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 14px;
}
h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin: 18px 0 8px;
}

.intro { margin: 8px 0 28px; }
.intro--centre { text-align: center; padding: 24px 0; }
.sous-titre {
  color: var(--texte-secondaire);
  font-size: 17px;
  margin: 0 0 8px;
}
.fil { font-size: 14px; margin: 0 0 8px; }

/* --- Formulaire --- */
form { margin-bottom: 48px; }

fieldset {
  border: 1px solid var(--filet);
  background: var(--blanc);
  border-radius: 2px;
  padding: 22px 24px 26px;
  margin: 0 0 22px;
}
legend {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  padding: 0 10px;
  color: var(--texte);
}

.champ { margin-bottom: 16px; }
.champ:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 14px;
  letter-spacing: 0.4px;
  color: var(--texte-secondaire);
  margin-bottom: 6px;
}
.requis { color: var(--accent); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea {
  width: 100%;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  color: var(--texte);
  background: var(--fond);
  border: 1px solid var(--filet);
  border-radius: 2px;
  padding: 11px 13px;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--blanc);
}
textarea { resize: vertical; }

/* --- Champs en erreur (validation) --- */
input.invalide,
textarea.invalide {
  border-color: #c0392b;
  background: #fbeeea;
}
input.invalide:focus,
textarea.invalide:focus { border-color: #c0392b; }

.champ--erreur label { color: #c0392b; }

.message-erreur {
  color: #c0392b;
  font-size: 13.5px;
  margin: 6px 0 0;
}

/* Cases de choix en erreur : contour rouge (au lieu d'un message) */
.case--erreur {
  border: 1px solid #c0392b;
  background: #fbeeea;
}
.case--erreur:hover { border-color: #c0392b; }
.aide--erreur { color: #c0392b; }

/* --- Aide / mentions --- */
.aide {
  font-size: 13.5px;
  color: var(--texte-secondaire);
  margin: 0 0 12px;
}
.confidentialite { margin-top: 14px; }

/* --- Cases à cocher --- */
.cases { display: flex; flex-direction: column; gap: 4px; }

.case {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  font-size: 16px;
  color: var(--texte);
  letter-spacing: normal;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 2px;
}
.case:hover { background: var(--fond); border-color: var(--filet); }
.case input { margin-top: 4px; flex: 0 0 auto; accent-color: var(--accent); width: 17px; height: 17px; }
.case span { flex: 1; }

.case--base {
  background: var(--fond);
  border: 1px solid var(--filet);
  margin-bottom: 6px;
}
.case--base strong { display: block; }
.case--rgpd { font-size: 15px; }

.prix {
  display: inline-block;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.5px;
  margin-left: 6px;
  white-space: nowrap;
}
.case--base .prix { margin-left: 0; }

.prestation legend { color: var(--accent); }

/* Option + son point d'aide « ? » */
.option-rangee { display: flex; align-items: flex-start; }
.option-rangee .case { flex: 1 1 auto; }

.infobulle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 12px 4px 0 8px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1;
  cursor: help;
  user-select: none;
}
.infobulle:hover,
.infobulle:focus { background: var(--accent); color: var(--blanc); outline: none; }

.infobulle__bulle {
  position: absolute;
  bottom: 135%;
  right: 0;
  width: 240px;
  max-width: 70vw;
  padding: 10px 12px;
  background: var(--texte);
  color: var(--blanc);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s;
  z-index: 20;
}
.infobulle__bulle::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 7px;
  border: 6px solid transparent;
  border-top-color: var(--texte);
}
.infobulle:hover .infobulle__bulle,
.infobulle:focus .infobulle__bulle { opacity: 1; visibility: visible; }

/* --- Bouton (bordure fine, majuscules espacées) --- */
.actions { text-align: center; margin-top: 28px; }
.bouton {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--texte);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 14px 34px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.bouton:hover {
  background: var(--accent);
  color: var(--blanc);
  text-decoration: none;
}

/* Bouton « plein » (accent), pour différencier l'action principale */
.bouton--plein {
  background: var(--accent);
  color: var(--blanc);
  border-color: var(--accent);
}
.bouton--plein:hover { background: var(--texte); border-color: var(--texte); }

/* Boutons empilés verticalement et centrés (page de remerciement) */
.actions--empilees {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* --- Honeypot (invisible pour les humains) --- */
.honeypot {
  position: absolute !important;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Alertes --- */
.alerte {
  border-radius: 2px;
  padding: 14px 18px;
  margin: 0 0 22px;
  font-size: 15px;
}
.alerte ul { margin: 0; padding-left: 20px; }
.alerte--error { background: #fbeeea; border: 1px solid #e3b9ab; color: #8a3b27; }
.alerte--warning { background: #fbf4e6; border: 1px solid #e3cf9f; color: #7a5a1d; }
.alerte--message, .alerte--success { background: #eef4ec; border: 1px solid #b6d0ad; color: #3c5c32; }

/* ==========================================================================
   Administration
   ========================================================================== */
.lien-csv { font-size: 14px; margin-left: 10px; }

/* Navigation de l'administration */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 12px 0 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--filet);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.admin-nav a { color: var(--texte-secondaire); }
.admin-nav a:hover { color: var(--accent); text-decoration: none; }

/* Actions alignées à gauche (admin) */
.actions--gauche {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  text-align: left;
  justify-content: flex-start;
}

/* Deux colonnes prix (nombre + affichage) */
.grille-prix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  align-items: start;
}

/* Grande zone de texte de la proposition */
.corps-proposition {
  font-family: "Jost", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 420px;
}

.badge--ok {
  color: #3c5c32;
  border-color: #b6d0ad;
  background: #eef4ec;
}

/* Drapeau « ne pas recontacter » — liste des demandes */
.drapeau-rouge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #ffffff;
  background: #c0392b;
  border-radius: 2px;
  white-space: nowrap;
}

/* Bannière « ne pas recontacter » — fiche détail */
.banniere-rouge {
  background: #fbeeea;
  border: 1px solid #c0392b;
  border-left: 4px solid #c0392b;
  color: #8a3b27;
  padding: 14px 18px;
  border-radius: 2px;
  margin: 0 0 20px;
  font-size: 15px;
}

/* Aperçu fidèle de l'e-mail envoyé au client (l'e-mail fournit son propre
   cadre et son fond : on se contente d'une bordure neutre autour). */
.apercu-mail {
  border: 1px solid var(--filet);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.apercu-mail a { color: var(--accent); word-break: break-word; }

@media (max-width: 520px) {
  .grille-prix { grid-template-columns: 1fr; }
}

/* Ligne tarif + description dans Paramètres : chaque élément forme un bloc
   distinct, nettement séparé des autres options. */
.ligne-tarif {
  background: var(--fond);
  border: 1px solid var(--filet);
  border-radius: 3px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.ligne-tarif:last-of-type { margin-bottom: 0; }
.ligne-tarif .champ:last-child { margin-bottom: 0; }
.ligne-tarif textarea { min-height: 0; background: var(--blanc); }

/* Coche « inclure une description » devant la zone de texte */
.case--inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 0;
  font-size: 13px;
  color: var(--texte);
  cursor: pointer;
}
.case--inline:hover { background: none; border-color: transparent; }
.case--inline input { margin: 0; }
/* Description grisée quand la case est décochée (retour visuel immédiat) */
.champ:has(.descactif:not(:checked)) textarea { opacity: 0.45; }

/* Le forfait de base est mis en avant par rapport à ses options. */
.ligne-tarif--base {
  border-left: 3px solid var(--accent);
  margin-bottom: 22px;
}

.sous-titre-options {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--texte-secondaire);
  margin: 0 0 12px;
}

/* Paramètres : formulaire à gauche, aperçu live à droite */
.param-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 28px;
  align-items: start;
}
.param-preview { position: sticky; top: 16px; }
.param-preview h2 { margin-bottom: 6px; }
.apercu-preview-box {
  max-height: calc(100vh - 90px);
  overflow: auto;
  border: 1px solid var(--filet);
  border-radius: 2px;
  background: var(--blanc);
}

@media (max-width: 900px) {
  .param-layout { grid-template-columns: 1fr; }
  .param-preview { position: static; }
  .apercu-preview-box { max-height: none; }
}

.table-wrap { overflow-x: auto; }
.tableau {
  width: 100%;
  border-collapse: collapse;
  background: var(--blanc);
  font-size: 15px;
}
.tableau th, .tableau td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--filet);
  vertical-align: top;
}
.tableau thead th {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--texte-secondaire);
  background: var(--fond);
}
.tableau .num { text-align: right; white-space: nowrap; }
.tableau tr:hover td { background: var(--fond); }
.lien-detail { white-space: nowrap; }

.badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--accent);
  border: 1px solid var(--filet);
  border-radius: 2px;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
}
.muet { color: var(--texte-secondaire); }

.carte {
  background: var(--blanc);
  border: 1px solid var(--filet);
  border-radius: 2px;
  padding: 22px 24px;
  margin: 0 0 20px;
}
.def { display: grid; grid-template-columns: 200px 1fr; gap: 6px 16px; margin: 0; }
.def dt { color: var(--texte-secondaire); font-size: 14px; }
.def dd { margin: 0; }
.liste-plate { margin: 6px 0; padding-left: 20px; }
.total { border-top: 1px solid var(--filet); padding-top: 12px; margin-top: 14px; }
.message { white-space: pre-wrap; background: var(--fond); border: 1px solid var(--filet); padding: 14px; border-radius: 2px; }

/* ==========================================================================
   Responsive (mobile d'abord : on enrichit pour les grands écrans)
   ========================================================================== */
@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 30px; }
  fieldset { padding: 18px 16px 20px; }
  .def { grid-template-columns: 1fr; gap: 2px 0; }
  .def dt { margin-top: 8px; }
}
