/* =====================================================
   ACHEDFR – CSS commun (header / footer / layout)
   ===================================================== */

/* ---------- Variables ---------- */
:root {
  --ached-bleu: #3333ff;
  --ached-vert: #33cc00;
  --texte: #222;
  --fond: #f5f5f5;
  --fond-bloc: #ffffff;
  --bordure-bloc: #dddddd;
}

/* ---------- Reset minimal ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--texte);
  background: var(--fond);
}

a {
  color: var(--ached-bleu);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Structure générale ---------- */
.page-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

.section-indication {
  background: #000;
  color: #fff;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  text-align: center;
}

header.site-header {
  margin-bottom: 1rem;
}

/* ---------- Navigation / logos ---------- */
.nav-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0.8rem 0;
  background: #fff;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
}

.nav-bar img.logo-main {
  max-height: 65px;
  height: auto;
  width: auto;
}

.nav-bar img.logo-interne {
  max-height: 48px;
  height: auto;
  width: auto;
}

/* ---------- Bloc identité ---------- */
.identite {
  text-align: center;
  padding: 1rem;
  background: var(--fond-bloc);
  border: 1px solid var(--bordure-bloc);
  border-radius: 4px;
  margin-bottom: 1.2rem;
}

.identite h1 {
  margin: 0.2rem 0;
  font-size: 1.6rem;
}

.identite h2 {
  margin: 0.4rem 0;
  font-size: 1.1rem;
  font-weight: normal;
}

.identite .baseline {
  margin-top: 0.5rem;
  color: var(--ached-vert);
  font-weight: bold;
  font-size: 0.95rem;
}

/* ---------- Header commun ---------- */

.lang-switcher{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 12px;
  background:#f5f5f5;
  border-bottom:1px solid #ccc;
  font-size:11px;
  gap:10px;
}

.lang-left{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.lang-left a{ white-space:nowrap; }

.logo{ height:48px; }
.logo-link{ display:flex; align-items:center; }

.lang-right{ white-space:nowrap; }

.lang-right a{
  color:#000;
  text-decoration:none;
}

.lang-right a.active{
  font-weight:bold;
}

@media (max-width:600px){
  .logo{ height:36px; }
  .lang-switcher{ font-size:10px; }
}

.login-state{
  margin-left:10px;
  color:#333;
  white-space:nowrap;
}
.logout-link{
  margin-left:10px;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
}
.logout-link:hover{ text-decoration:underline; }


/* ---------- Footer ---------- */
.site-footer {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bordure-bloc);
  text-align: center;
  font-size: 0.85rem;
  color: #666;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}

.footer-links .sep {
  color: #999;
  padding: 0 0.2rem;
}

.footer-meta {
  line-height: 1.4;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .page-wrapper { padding: 0.6rem; }

  .nav-bar {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-bar img.logo-main { max-height: 56px; }
  .nav-bar img.logo-interne { max-height: 42px; }

  .identite h1 { font-size: 1.25rem; }
  .identite h2 { font-size: 0.95rem; }
  .identite .baseline { font-size: 0.9rem; }
}

/* ---------- bookmarks ---------- */
#bookmarks-list{display:grid;gap:10px}
.bm-row{
  display:grid;
  grid-template-columns:70px 1fr 140px;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid #ddd;
  border-radius:8px;
  background:#fff;
}
.bm-slot{font-weight:700}
.bm-alert{display:flex;gap:6px;align-items:center;font-size:.9rem}

/* --- bookmarks header dropdown positioning --- */
.bm-wrap{ position:relative; display:inline-block; }
.bm-panel{
  position:absolute;
  left:0;
  top:calc(100% + 6px);
  z-index:9999;
  min-width:240px;
  background:#f6f6f6;
  border:1px solid #ccc;
  border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.12);
}

/* --- share buttons --- */

.share-box{
  margin:14px 0 18px 0;
  padding:12px 14px;
  background:#f8f9fb;
  border:1px solid #d9dee8;
  border-radius:8px;
}
.share-title{
  margin:0 0 10px 0;
  font-size:14px;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:8px;
}
.share-title svg{
  width:16px;
  height:16px;
  flex:0 0 16px;
}
.share-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.share-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:8px 10px;
  border:1px solid #cfd6e2;
  border-radius:999px;
  background:#fff;
  color:#111;
  text-decoration:none;
  font-size:13px;
  line-height:1.2;
  cursor:pointer;
  appearance:none;
}
.share-btn:hover,
.share-btn:focus{
  background:#f1f4f8;
  text-decoration:none;
}
.share-btn-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.share-btn-icon svg{
  width:15px;
  height:15px;
  display:block;
}
.share-feedback{
  margin-top:8px;
  font-size:12px;
  color:#555;
  min-height:1.2em;
}


/* ---------- highlight doc-bib ---------- */
.doc-highlight{
  background:#fff8d8;
  border-left:4px solid #d4a017;
  padding-left:0.5rem;
  transition:background-color .4s ease;
}

/* ---------- search recent ---------- */
.recent-docs-box{
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid #dddddd;
  border-radius: 8px;
}

.recent-docs-box h2{
  margin-top: 0;
  margin-bottom: 1rem;
}

.recent-docs-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.recent-docs-col h3{
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.recent-docs-list{
  margin: 0;
  padding-left: 1.2rem;
}

.recent-docs-list li{
  margin-bottom: 0.55rem;
}

.recent-doc-date{
  color: #666;
  font-size: 0.92em;
}

@media (max-width: 700px){
  .recent-docs-grid{
    grid-template-columns: 1fr;
  }
}


.search-box{
  display:flex;
  gap:0.4rem;
  max-width:500px;
  margin:1.5rem auto;
  padding:0.4rem;
  border:1px solid #ddd;
  border-radius:6px;
  background:#fff;
}

.search-box input{
  flex:1;
  border:none;
  outline:none;
  padding:0.5rem;
}

.search-box select{
  border:none;
  background:#f5f5f5;
  padding:0.5rem;
  border-radius:4px;
}

.search-box button{
  background:#6c4cff;
  color:white;
  border:none;
  padding:0.5rem 0.8rem;
  border-radius:4px;
  cursor:pointer;
}

.search-box:focus-within{
  border-color:#6c4cff;
  box-shadow:0 0 0 2px rgba(108,76,255,0.15);
}