/* AubePatent - palette "L'aube etoilee", identite editoriale-aviation. */
:root {
  --papier: #EDF3FB;
  --surface: #F8FBFF;
  --surface-2: #FFFFFF;
  --encre: #0E1B33;
  --encre-2: #4D5F7C;
  --encre-3: #8194B4;
  --filet: #C9D8EC;
  --filet-clair: #DEE9F6;
  --accent: #2B5FD9;
  --accent-fonce: #1D49B3;
  --accent-clair: #6E97F0;
  --accent-voile: #E4ECFB;
  --rouge: #C92A2A;
  --vert: #1E7A52;
  --ambre: #B7791F;
  --nuit: #060C1C;
  --nuit-2: #0D1730;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ombre: 0 1px 2px rgba(14,27,51,.05), 0 8px 24px rgba(14,27,51,.06);
  --etoiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cg fill='%23C7D8F8'%3E%3Ccircle cx='18' cy='26' r='1'/%3E%3Ccircle cx='92' cy='58' r='.7'/%3E%3Ccircle cx='156' cy='14' r='1.1'/%3E%3Ccircle cx='234' cy='74' r='.8'/%3E%3Ccircle cx='52' cy='118' r='.9'/%3E%3Ccircle cx='198' cy='132' r='.6'/%3E%3Ccircle cx='262' cy='178' r='1'/%3E%3Ccircle cx='30' cy='208' r='.7'/%3E%3Ccircle cx='118' cy='186' r='1.1'/%3E%3Ccircle cx='170' cy='244' r='.8'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
/* L'attribut hidden doit TOUJOURS l'emporter, meme sur display:flex/grid des
   composants (modales, filtres). Sans ceci, les elements masques restent
   visibles et bloquent l'interface. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--encre);
  background: var(--papier);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-fonce); }
.mono { font-family: var(--mono); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); }
.point { color: var(--accent); }
::selection { background: var(--accent-voile); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ----------------------------------------------------------------- entete */
.entete {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 13px 26px;
  background: rgba(248,251,255,.88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--filet);
}
.marque { display: flex; flex-direction: column; line-height: 1.05; }
.logotype {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  letter-spacing: .005em; color: var(--encre);
}
.surtitre {
  font-family: var(--mono); font-size: 9.5px; text-transform: uppercase;
  letter-spacing: .22em; color: var(--encre-3); margin-top: 3px;
}
.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a {
  padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  color: var(--encre-2);
}
.nav a:hover { background: var(--accent-voile); color: var(--accent-fonce); }
.nav a.actif { background: var(--accent); color: #fff; }
.entete .pousse { margin-left: auto; }
.compte { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--encre-2); }
.compte .pastille {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.lien-quitter {
  border: 1px solid var(--filet); background: var(--surface-2);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px;
  color: var(--encre-2); cursor: pointer;
}
.lien-quitter:hover { border-color: var(--accent); color: var(--accent); }

/* -------------------------------------------------------------- structure */
.page { max-width: 1080px; margin: 0 auto; padding: 26px 26px 96px; }

/* ------------------------------------------------------------------- hero */
.hero {
  text-align: center;
  padding: 54px 0 34px;
  position: relative;
}
.hero::after {
  content: ""; display: block; width: 56px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 30px auto 0;
}
.hero-surtitre {
  font-size: 11px; text-transform: uppercase; letter-spacing: .26em;
  color: var(--accent-fonce); margin: 0 0 18px;
}
.hero-titre {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(34px, 5.4vw, 56px); line-height: 1.05;
  letter-spacing: -.015em; margin: 0 0 18px; color: var(--encre);
}
.hero-intro {
  max-width: 56ch; margin: 0 auto 30px; color: var(--encre-2);
  font-size: 16.5px; line-height: 1.6;
}
.barre-recherche.grande {
  max-width: 720px; margin: 0 auto; padding: 9px 9px 9px 18px;
  border-radius: 16px; align-items: center;
  box-shadow: 0 2px 4px rgba(14,27,51,.04), 0 18px 50px rgba(43,95,217,.12);
}
.barre-recherche.grande .loupe { color: var(--accent); flex: 0 0 auto; }
.barre-recherche.grande input[type=text] { font-size: 19px; padding: 12px 6px; }
.suggestions {
  display: flex; flex-wrap: wrap; gap: 9px; justify-content: center;
  align-items: center; margin: 22px auto 0; max-width: 720px;
}
.suggestions .mono { font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--encre-3); margin-right: 4px; }
.puce-sugg {
  border: 1px solid var(--filet); background: var(--surface-2); cursor: pointer;
  border-radius: 999px; padding: 7px 15px; font-size: 13.5px; color: var(--encre-2);
  font-family: var(--serif); transition: all .14s;
}
.puce-sugg:hover { border-color: var(--accent); color: var(--accent-fonce); background: var(--accent-voile); transform: translateY(-1px); }
.titre-page {
  font-family: var(--serif); font-size: 30px; font-weight: 600;
  margin: 6px 0 4px; letter-spacing: -.01em;
}
.sous-titre { color: var(--encre-2); margin: 0 0 22px; max-width: 64ch; }

/* ------------------------------------------------------------- recherche */
.barre-recherche {
  display: flex; gap: 10px; align-items: stretch;
  background: var(--surface-2); border: 1px solid var(--filet);
  border-radius: 14px; padding: 8px; box-shadow: var(--ombre);
}
.barre-recherche input[type=text] {
  flex: 1; border: 0; background: transparent; font-size: 17px;
  font-family: var(--serif); color: var(--encre); padding: 10px 12px;
}
.barre-recherche input:focus { outline: none; }
.btn {
  border: 0; border-radius: 10px; cursor: pointer; font-weight: 600;
  font-size: 14px; padding: 11px 20px; background: var(--accent); color: #fff;
  transition: background .15s;
}
.btn:hover { background: var(--accent-fonce); }
.btn.fant {
  background: transparent; color: var(--accent); border: 1px solid var(--filet);
}
.btn.fant:hover { background: var(--accent-voile); border-color: var(--accent); }
.btn.mini { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }

.filtres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin-top: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--filet-clair);
  border-radius: 12px;
}
.champ { display: flex; flex-direction: column; gap: 4px; }
.champ label {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: .14em; color: var(--encre-3);
}
.champ input, .champ select {
  border: 1px solid var(--filet); border-radius: 8px; padding: 7px 9px;
  font-size: 13.5px; background: var(--surface-2); color: var(--encre);
}

/* ----------------------------------------------------------- resultats */
.meta-resultats {
  display: flex; align-items: baseline; gap: 14px; margin: 22px 0 12px;
  flex-wrap: wrap;
}
.meta-resultats .nb {
  font-family: var(--serif); font-size: 19px; font-weight: 600;
}
.sources-actives { display: flex; gap: 6px; flex-wrap: wrap; }
.etiq {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
  padding: 3px 9px; border-radius: 999px; background: var(--accent-voile);
  color: var(--accent-fonce); border: 1px solid var(--filet-clair);
}
.etiq.gris { background: #EEF2F8; color: var(--encre-2); }
.etiq.off { opacity: .45; }

.liste-brevets { display: flex; flex-direction: column; gap: 12px; }
.brevet {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 8px 20px;
  padding: 20px 22px; background: var(--surface-2);
  border: 1px solid var(--filet); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(14,27,51,.04);
  transition: box-shadow .16s, transform .16s, border-color .16s;
}
.brevet.sans-image { grid-template-columns: 1fr auto; }
.brevet:hover { box-shadow: var(--ombre); transform: translateY(-1px); border-color: var(--filet); }
.brevet .vignette {
  grid-row: 1 / span 2; align-self: start;
  display: block; width: 88px; height: 118px; border-radius: 9px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--filet-clair);
}
.brevet .vignette img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brevet .vignette:hover { border-color: var(--accent); }
.brevet .corps { min-width: 0; }
.brevet.sans-image .corps { grid-column: 1; }
.brevet .num { font-family: var(--mono); font-size: 12px; color: var(--accent-fonce); letter-spacing: .03em; }
.brevet h3 {
  font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 3px 0 6px;
  line-height: 1.3;
}
.brevet h3 a { color: var(--encre); }
.brevet h3 a:hover { color: var(--accent); }
.brevet .resume { color: var(--encre-2); font-size: 13.5px; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.brevet .ligne-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--encre-3); }
.brevet .ligne-meta b { color: var(--encre-2); font-weight: 600; }
.brevet .actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.drapeau { font-family: var(--mono); font-size: 11px; color: var(--encre-3); }

/* ------------------------------------------------------------- cartes */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.carte {
  background: var(--surface-2); border: 1px solid var(--filet);
  border-radius: 14px; padding: 18px; box-shadow: var(--ombre);
  display: flex; flex-direction: column; gap: 8px;
}
.carte .bande { height: 4px; border-radius: 999px; margin: -4px -4px 6px; }
.carte h3 { font-family: var(--serif); font-size: 19px; margin: 0; }
.carte .desc { color: var(--encre-2); font-size: 13.5px; flex: 1; }
.carte .pied { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--encre-3); }

/* ------------------------------------------------------------- paysage */
.paysage-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.bloc {
  background: var(--surface-2); border: 1px solid var(--filet);
  border-radius: 14px; padding: 18px; box-shadow: var(--ombre);
}
.bloc h3 {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .16em; color: var(--encre-3); margin: 0 0 14px;
}
.barre-ligne { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 13px; }
.barre-ligne .lib { flex: 0 0 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-ligne .jauge { flex: 1; height: 9px; background: var(--filet-clair); border-radius: 999px; overflow: hidden; }
.barre-ligne .jauge i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-clair)); }
.barre-ligne .val { font-family: var(--mono); font-size: 11px; color: var(--encre-2); width: 30px; text-align: right; }
.frise { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding-top: 10px; }
.frise .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.frise .col i { width: 100%; background: linear-gradient(180deg, var(--accent-clair), var(--accent)); border-radius: 3px 3px 0 0; min-height: 2px; }
.frise .col span { font-family: var(--mono); font-size: 9px; color: var(--encre-3); transform: rotate(-45deg); transform-origin: center; }
.nuage { display: flex; flex-wrap: wrap; gap: 7px; }
.nuage .mot { background: var(--accent-voile); border-radius: 999px; padding: 4px 11px; color: var(--accent-fonce); }

/* ------------------------------------------------------------- fiche */
.fiche-entete { border-bottom: 1px solid var(--filet); padding-bottom: 18px; margin-bottom: 18px; }
.fiche-entete .num { font-family: var(--mono); color: var(--accent-fonce); font-size: 14px; }
.fiche-entete h1 { font-family: var(--serif); font-size: 28px; margin: 8px 0 12px; line-height: 1.2; }
.fiche-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.fiche-meta .item .k { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--encre-3); }
.fiche-meta .item .v { font-size: 14px; margin-top: 2px; }
.fiche-section { margin: 22px 0; }
.fiche-section h2 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--encre-3); }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 12px; }
.galerie .fig {
  display: block; aspect-ratio: 3 / 4; border: 1px solid var(--filet);
  border-radius: 10px; overflow: hidden; background: #fff; transition: border-color .15s, transform .15s;
}
.galerie .fig:hover { border-color: var(--accent); transform: translateY(-2px); }
.galerie .fig img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.revendication { padding: 10px 14px; border-left: 3px solid var(--filet); margin: 8px 0; color: var(--encre-2); font-size: 13.5px; }
.ideation-bloc { background: var(--surface); border: 1px solid var(--filet-clair); border-radius: 12px; padding: 16px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }

/* ------------------------------------------------------------- divers */
.vide { text-align: center; color: var(--encre-3); padding: 60px 20px; }
.vide .grand { font-family: var(--serif); font-size: 22px; color: var(--encre-2); margin-bottom: 6px; }
.chargement { color: var(--encre-3); font-family: var(--mono); font-size: 13px; padding: 30px; text-align: center; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--nuit-2); color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13.5px; z-index: 200; box-shadow: var(--ombre); }
.modale-fond { position: fixed; inset: 0; background: rgba(6,12,28,.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modale { background: var(--surface-2); border-radius: 16px; padding: 24px; width: min(460px, 92vw); box-shadow: 0 20px 60px rgba(6,12,28,.3); }
.modale h2 { font-family: var(--serif); margin: 0 0 6px; }
.modale-aide { color: var(--encre-3); font-size: 13px; margin: 0 0 14px; }
.modale label { display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--encre-3); margin: 12px 0 4px; }
.modale input, .modale textarea, .modale select { width: 100%; border: 1px solid var(--filet); border-radius: 8px; padding: 9px 11px; font-size: 14px; font-family: var(--sans); }
.modale .pied { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.puce-sauve { color: var(--vert); font-family: var(--mono); font-size: 11px; }
.note-zone { width: 100%; border: 1px solid var(--filet); border-radius: 8px; padding: 8px; font-size: 13px; font-family: var(--sans); margin-top: 6px; }
.tags-ligne { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag { background: var(--accent-voile); color: var(--accent-fonce); border-radius: 999px; padding: 2px 9px; font-size: 11px; }

/* ------------------------------------------------------------- login */
.login-fond { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--nuit) 0%, var(--nuit-2) 100%); background-image: var(--etoiles), linear-gradient(180deg, var(--nuit) 0%, var(--nuit-2) 100%); }
.login-carte { background: var(--surface-2); border-radius: 18px; padding: 34px; width: min(400px, 92vw); box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.login-carte .logotype { font-size: 26px; }
.login-carte .surtitre { margin: 4px 0 22px; }
.login-carte label { display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--encre-3); margin: 14px 0 5px; }
.login-carte input { width: 100%; border: 1px solid var(--filet); border-radius: 9px; padding: 11px 13px; font-size: 15px; }
.login-carte .btn { width: 100%; margin-top: 22px; padding: 13px; }
.login-erreur { background: #FCEBEA; color: var(--rouge); border-radius: 9px; padding: 10px 13px; font-size: 13px; margin-top: 14px; }
