/* ===================================
   Styles Globaux - Zone Judiciaire
   Couleurs: Bleu Marine (#001f4d) & Or (#DAA520)
   =================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #f5f5f5;
}

/* Typography */
h1, h2, h3, h4 {
  color: #001f4d;
  margin-bottom: 15px;
}

a {
  color: #001f4d;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #DAA520;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===================================
   HEADER
   =================================== */
.header {
  background: linear-gradient(135deg, #001f4d 0%, #003d7a 100%);
  color: white;
  padding: 40px 0;
  box-shadow: 0 2px 10px rgba(0, 31, 77, 0.3);
  border-bottom: 4px solid #DAA520;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header-logo {
  width: 80px;
  height: 80px;
  background: rgba(218, 165, 32, 0.2);
  border: 3px solid #DAA520;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.header-text h1 {
  color: white;
  font-size: 32px;
  margin-bottom: 5px;
}

.header-text p {
  color: #DAA520;
  font-size: 14px;
}

/* ===================================
   MAIN
   =================================== */
main {
  min-height: calc(100vh - 400px);
  padding: 40px 0;
}

/* ===================================
   SECTIONS DOCUMENTS
   =================================== */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.doc-category {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.doc-category:hover {
  border-color: #DAA520;
  box-shadow: 0 5px 15px rgba(218, 165, 32, 0.2);
  transform: translateY(-5px);
}

.doc-category-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.doc-icon {
  font-size: 32px;
}

.doc-category h2 {
  margin: 0;
  font-size: 22px;
}

.doc-category p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.doc-count {
  background: #DAA520;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-top: 10px;
  display: inline-block;
}

/* ===================================
   MODAL DOCUMENTS
   =================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 2px solid #DAA520;
  padding-bottom: 15px;
}

.modal-header h2 {
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #001f4d;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #DAA520;
}

.documents-list {
  list-style: none;
}

.document-item {
  background: #f9f9f9;
  border-left: 4px solid #DAA520;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.document-item:hover {
  background: #f0f0f0;
  box-shadow: 0 2px 8px rgba(218, 165, 32, 0.15);
}

.document-name {
  font-weight: bold;
  color: #001f4d;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.document-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
}

.document-actions {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-download {
  background: #DAA520;
  color: white;
}

.btn-download:hover {
  background: #c49414;
  transform: scale(1.05);
}

.btn-info {
  background: #e0e0e0;
  color: #001f4d;
}

.btn-info:hover {
  background: #d0d0d0;
}

/* ===================================
   MENTIONS LÉGALES & RGPD
   =================================== */
.legal-section {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  border-left: 4px solid #DAA520;
}

.legal-section h3 {
  color: #001f4d;
  margin-top: 20px;
  margin-bottom: 15px;
}

.legal-section p, .legal-section li {
  color: #555;
  line-height: 1.8;
  margin-bottom: 10px;
  font-size: 14px;
}

.legal-section ul {
  margin-left: 20px;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #001f4d;
  color: white;
  padding: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-text a {
  color: #DAA520;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-accept, .cookie-decline {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.cookie-accept {
  background: #DAA520;
  color: #001f4d;
}

.cookie-accept:hover {
  background: #c49414;
}

.cookie-decline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.cookie-decline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  background: linear-gradient(135deg, #001f4d 0%, #003d7a 100%);
  color: white;
  padding: 40px 0 20px;
  border-top: 4px solid #DAA520;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  color: #DAA520;
  margin-bottom: 15px;
}

.footer-section p {
  color: #ddd;
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ddd;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #DAA520;
}

.footer-bottom {
  border-top: 1px solid rgba(218, 165, 32, 0.3);
  padding-top: 20px;
  text-align: center;
  color: #aaa;
  font-size: 12px;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .header-text h1 {
    font-size: 24px;
  }

  .documents-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-accept, .cookie-decline {
    width: 100%;
    text-align: center;
  }
}
