/* Notaire — theme.
   Registre d'une etude notariale : sobre et serieux, mais soigne. Encre bleu
   nuit, filet dore discret, fond papier legerement chaud ; titres en serif
   (Cormorant Garamond), texte en DM Sans pour la lisibilite des tableaux. */
:root {
  --encre: #14213d;
  --encre-2: #22355c;
  --or: #a8844e;
  --or-clair: #f1e9da;
  --papier: #f7f5f0;
  --card-bg: #ffffff;
  --bord: #e3ddd0;
  --bord-leger: #eee9df;
  --titre: #14213d;
  --texte: #1c2433;
  --muted: #6b7280;
  --accent: #22355c;
  --accent-hover: #2e4677;
  --accent-clair: #e8edf6;
  --ok: #2f6b3f;      --ok-bg: #e5f0e6;
  --alerte: #8a5a12;  --alerte-bg: #f7ecd6;
  --danger: #8b1e2d;  --danger-bg: #f6e3e5;
  --info-bg: #e8edf6;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --or-vif: #cfae73;          /* or lisible sur le bleu nuit */
  --haut-bandeau: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--sans); color: var(--texte); background: var(--papier);
       min-height: 100vh; font-size: 14px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--serif); color: var(--titre); font-weight: 600; letter-spacing: .2px; }
a { color: var(--accent); }

/* Bandeau. Marque « Le GéoNotaire », en texte seul : l'accent du é en or. */
.app-header { height: var(--haut-bandeau); background: var(--encre); display: flex; align-items: center;
              gap: 22px; padding: 0 28px; position: sticky; top: 0; z-index: 1000;
              border-bottom: 2px solid var(--or); }
.app-header .marque-lien { display: flex; flex-direction: column; text-decoration: none; margin-right: 18px; }
/* Dessin de la proposition A (600, « Le » en italique 400) ; le trait est epaissi
   par un contour de la couleur du texte, sans changer de graisse ni de police. */
.marque { font-family: var(--serif); font-weight: 600; font-size: 35px; color: #fff; line-height: 1;
          letter-spacing: .4px; white-space: nowrap; -webkit-text-stroke: .6px currentColor; }
.marque .le { font-style: italic; font-weight: 400; opacity: .9; margin-right: 2px; }
.marque .acc { color: var(--or-vif); }
.app-header .sous-titre { color: var(--or-vif); font-size: 11.5px; letter-spacing: .17em; text-transform: uppercase;
                          margin-top: 7px; white-space: nowrap; }
.app-header .spacer { flex: 1; }
/* Mention de l'editeur, en bas a gauche (volet de l'affaire, pied des autres pages). */
.editeur { display: flex; align-items: center; gap: 10px; font-size: 11px; line-height: 1.35; color: var(--muted); }
.editeur img { height: 30px; border-radius: 3px; flex: none; }
.editeur b { color: var(--texte); font-weight: 600; }
.pied-editeur { padding: 28px 28px 22px; }
.app-header .utilisateur { color: #cfd6e4; font-size: 14px; }
.app-header .utilisateur small { color: #d9c7a4; }
.app-header a.nav { color: #e7ebf3; text-decoration: none; font-size: 17px; font-weight: 500; padding: 8px 2px 7px;
                    border-bottom: 2px solid transparent; }
.app-header a.nav:hover, .app-header a.nav.actif { border-bottom-color: var(--or-vif); color: #fff; }
.app-header .btn.secondaire { background: transparent; color: #e7ebf3; border-color: rgba(255,255,255,.3); }
.app-header .btn.secondaire:hover { background: rgba(255,255,255,.08); }

/* Boutons */
.btn { border: 1px solid transparent; border-radius: 6px; cursor: pointer; font: 500 13px var(--sans);
       padding: 9px 16px; background: var(--accent); color: #fff; transition: background .15s, border-color .15s;
       display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn:hover { background: var(--accent-hover); }
.btn.secondaire { background: #fff; color: var(--titre); border-color: var(--bord); }
.btn.secondaire:hover { border-color: var(--or); background: #fffdf8; }
.btn.danger { background: var(--danger); }
.btn.petit { padding: 5px 10px; font-size: 12px; }
.btn.lien { background: none; color: var(--accent); padding: 4px 6px; border: 0; }
.btn.lien:hover { text-decoration: underline; background: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Mise en page */
main { max-width: 1400px; margin: 0 auto; padding: 26px; }
.titre-page { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
              padding-bottom: 12px; border-bottom: 1px solid var(--bord); }
.titre-page h1 { font-size: 32px; line-height: 1.1; flex: 1; }
.surtitre { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--or); font-weight: 600; }
.carte-bloc { background: var(--card-bg); border: 1px solid var(--bord); border-radius: 10px;
              padding: 20px 22px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(20, 33, 61, .04); }
.carte-bloc h2 { font-size: 21px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.carte-bloc h2 .num { border: 1px solid var(--or); color: var(--or); border-radius: 50%; width: 26px; height: 26px;
                      display: inline-flex; align-items: center; justify-content: center; font: 600 13px var(--sans); }
.muted { color: var(--muted); }
.ligne { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
hr.filet { border: 0; border-top: 1px solid var(--bord); margin: 14px 0; }

/* Formulaires */
label { display: block; font-size: 12px; font-weight: 600; color: var(--titre); margin: 12px 0 4px; }
input[type=text], input[type=password], input[type=search], input[type=email], input[type=tel], select, textarea {
  width: 100%; border: 1px solid var(--bord); border-radius: 6px; padding: 9px 11px;
  font: 14px var(--sans); color: var(--texte); background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--or-clair); border-color: var(--or); }
textarea { resize: vertical; min-height: 64px; }
.grille-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grille-form .plein { grid-column: 1 / -1; }

/* Etiquettes */
.badge { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 600;
         background: #f0ede6; color: var(--titre); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.alerte { background: var(--alerte-bg); color: var(--alerte); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--accent); }
.puce-commune { display: inline-flex; align-items: center; gap: 6px; background: var(--or-clair);
                color: var(--titre); border-radius: 999px; padding: 3px 4px 3px 11px; font-size: 12px; }
.puce-commune button { border: 0; background: #fff; border-radius: 50%; width: 18px; height: 18px;
                       cursor: pointer; color: var(--muted); line-height: 1; }

/* Tableaux */
table.grille { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grille th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px;
                  color: var(--muted); border-bottom: 1px solid var(--or); padding: 7px 8px; font-weight: 600; }
table.grille td { border-bottom: 1px solid var(--bord-leger); padding: 9px 8px; vertical-align: middle; }
table.grille tr:hover td { background: #fcfbf8; }

/* Onglets */
.onglets { display: flex; gap: 22px; border-bottom: 1px solid var(--bord); margin-bottom: 18px; }
.onglets button { background: none; border: 0; padding: 10px 2px; font: 600 14px var(--sans); color: var(--muted);
                  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglets button.actif { color: var(--titre); border-bottom-color: var(--or); }

/* Fenetre modale */
.voile { position: fixed; inset: 0; background: rgba(20, 33, 61, .45); display: none; z-index: 2000;
         align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow: auto; }
.voile.ouvert { display: flex; }
.modale { background: #fff; border-radius: 10px; width: 100%; max-width: 580px; padding: 24px 26px;
          box-shadow: 0 20px 50px rgba(0, 0, 0, .25); border-top: 3px solid var(--or); }
.modale.large { max-width: 1200px; }
.modale h3 { font-size: 24px; margin-bottom: 4px; }
.modale .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* Notification */
#notif { position: fixed; right: 20px; bottom: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
#notif .msg { background: var(--encre); color: #fff; padding: 11px 16px; border-radius: 8px; border-left: 3px solid var(--or);
              box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: 420px; font-size: 13px; }
#notif .msg.erreur { border-left-color: #e57373; }
#notif .msg.ok { border-left-color: #8bc48f; }

/* Barre de progression */
.progression { height: 8px; background: #ece7dc; border-radius: 999px; overflow: hidden; }
.progression > div { height: 100%; background: linear-gradient(90deg, var(--encre-2), var(--or)); width: 0; transition: width .4s; }

@media (max-width: 900px) {
  main { padding: 14px; }
  .app-header { padding: 0 14px; gap: 10px; }
  .app-header .sous-titre, .app-header .utilisateur { display: none; }
  .grille-form { grid-template-columns: 1fr; }
  .titre-page h1 { font-size: 26px; }
}
@media (max-width: 760px) {
  :root { --haut-bandeau: 62px; }
  .marque { font-size: 27px; }
}
