:root {
    /* Charte graphique Anaïs Formation Tech */
    --primary-color: #ffad94; /* Corail doux - Couleur principale */
    --primary-hover: #ff7e5c; /* Version plus vive */
    --background-color: #fff; /* Fond blanc */
    --text-color: #1f2937; /* Texte principal (gris neutre) */
    --border-color: #f4f5f7; /* Bordures grises subtiles */
    --success-color: #38a169; /* Vert pour succès */
    --block-bg: #fff; /* Fond des blocs */
    --shadow: 0 4px 6px -1px rgb(255 173 148 / 12%), 0 2px 4px -2px rgb(255 173 148 / 12%);
    --gradient-start: #ffad94; /* Corail doux */
    --gradient-end: #ff7e5c; /* Version plus vive */
    --peach-accent: #ffd1cc; /* Couleurs secondaires douces */
    --coral-light: #ffedbf; /* Couleur accent claire */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: 
        radial-gradient(at 0% 0%, rgb(255 173 148 / 8%) 0%, transparent 50%),
        radial-gradient(at 100% 100%, rgb(255 126 92 / 8%) 0%, transparent 50%);
    background-attachment: fixed;
}

.container {
    max-width: 85%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 3rem 0;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgb(255 255 255 / 10%) 25%, transparent 25%),
                linear-gradient(-45deg, rgb(255 255 255 / 10%) 25%, transparent 25%);
    background-size: 60px 60px;
    opacity: 0.1;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 4px rgb(0 0 0 / 10%);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgb(255 255 255 / 95%);
    letter-spacing: -0.01em;
}

.description {
    color: rgb(255 255 255 / 90%);
    font-size: 1.125rem;
    max-width: 800px;
}

.description-bold {
    color: rgb(255 255 255 / 95%);
    font-weight: bold;
    max-width: 800px;
}

.project-name-container {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 20px;
    margin: 0 auto 20px;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.project-name-label {
    color: #fff;
    font-weight: 600;
    font-size: 1.1em;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgb(0 0 0 / 10%);
}

.project-name-input {
    flex: 1;
    min-width: 300px;
    padding: 12px 16px;
    border: 2px solid rgb(255 255 255 / 30%);
    border-radius: 8px;
    background: rgb(255 255 255 / 95%);
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
}

.project-name-input::placeholder {
    color: #666;
    font-weight: 400;
}

.project-name-input:focus {
    outline: none;
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 3px rgb(255 255 255 / 30%), 0 4px 12px rgb(0 0 0 / 15%);
    transform: translateY(-1px);
}

.project-name-input:hover {
    border-color: rgb(255 255 255 / 60%);
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
}

@media (width <= 768px) {
    .project-name-container {
        margin: 10px 15px 15px;
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .project-name-label {
        text-align: center;
        font-size: 1em;
    }
    
    .project-name-input {
        min-width: auto;
        width: 100%;
    }
}

.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, 
        transparent,
        rgb(255 255 255 / 30%),
        rgb(255 255 255 / 50%),
        rgb(255 255 255 / 30%),
        transparent
    );
    margin: 2rem 0;
    position: relative;
}

.divider::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: rgb(255 255 255 / 80%);
    border-radius: 50%;
    box-shadow: 
        -20px 0 0 rgb(255 255 255 / 80%),
        20px 0 0 rgb(255 255 255 / 80%);
}

.block {
    background-color: var(--block-bg);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.block::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.block:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgb(255 173 148 / 25%);
}

.block:hover::before {
    opacity: 1;
}

.block-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-color);
    position: relative;
    padding-left: 1.5rem;
    letter-spacing: -0.01em;
}

.block-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
}

.section {
    margin-bottom: 2.5rem;
}

.section h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.checklist {
    list-style: none;
}

.checklist label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background-color: rgb(255 173 148 / 5%);
    justify-content: space-between;
}

.checklist label:hover {
    background-color: rgb(255 173 148 / 10%);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.checklist input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checklist input[type="checkbox"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(255 173 148 / 30%);
    transform: scale(1.1);
}

.checklist input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgb(255 173 148 / 20%);
}

.checklist input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checklist input[type="checkbox"]:checked:focus {
    box-shadow: 0 0 0 3px rgb(255 173 148 / 40%);
}

.checklist input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: #fff;
    font-size: 1rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    margin-left: 0.75rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #FFF;
    text-shadow: 0 1px 2px rgb(0 0 0 / 10%);
    box-shadow: 0 2px 4px rgb(255 173 148 / 30%);
    transition: all 0.3s ease;
}

.demo-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgb(255 173 148 / 40%);
}

.checklist span:not(.demo-badge) {
    font-size: 1.125rem;
    line-height: 1.5;
    color: var(--text-color);
    display: inline-block;
    margin-left: 8px;
}

.footer {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgb(255 255 255 / 10%) 25%, transparent 25%),
                linear-gradient(-45deg, rgb(255 255 255 / 10%) 25%, transparent 25%);
    background-size: 60px 60px;
    opacity: 0.1;
}

/* Menu de navigation dans le footer */
.footer-nav {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background: #0f172a; /* fond sombre pour contraste AA */
    border: 1px solid #1f2937;
    font-weight: 600;
    transition: all 0.2s ease;
    display: block;
}

.nav-menu a:hover {
    background: #1f2937;
    border-color: #334155;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgb(0 0 0 / 25%);
}

.nav-menu a.active {
    background: #1f2937;
    border-color: #475569;
}

.footer-content {
    position: relative;
    z-index: 1;
}

@media (width <= 768px) {
    .nav-menu {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (width <= 768px) {
    .header h1 {
        font-size: 2.25rem;
    }

    .subtitle {
        font-size: 1.25rem;
    }

    .block {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .block-title {
        font-size: 1.5rem;
    }

    .section h3 {
        font-size: 1.25rem;
    }

    .checklist label {
        padding: 0.75rem;
    }

    .checklist span {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        /* Variante corail plus sombre pour contraste élevé */
        --primary-color: #b94f39;
        --text-color: #000;
        --border-color: #000;
    }
}

.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 auto 2rem;
    text-align: center;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--background-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    border-color: transparent;
}

.checklist li {
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.checklist li.hidden {
    display: none;
}

.progress-sticky {
    position: sticky;
    top: 0;
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
    margin: 0 auto 20px;
    max-width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-radius: 1.5rem;
}

.progress-container {
    width: 100%;
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transition: width 0.3s ease;
    border-radius: 12px;
}

#progress-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.export-import-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
}

.export-btn, .import-btn, .reset-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.export-btn {
    background-color: var(--primary-color);
    color: #fff;
}

.reset-btn {
    background-color: #64748b; /* slate */
    color: #fff;
}


.export-btn,
.reset-btn {
    padding: 16px 32px;
    font-size: 1.15em;
    min-width: 180px;
    min-height: 48px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.export-btn:hover {
    background-color: var(--primary-hover);
}

.reset-btn:hover {
    background-color: #475569;
}

main {
    padding-top: 20px;
}

.version-tag {
    display: block;
    text-align: right;
    color: #FFF;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.demo-progress {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 10px 0;
}

.demo-progress-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.demo-badge-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 12px 16px;
    background-color: var(--peach-accent);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #000;
    font-weight: 600;
    box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
}

.notes-container {
    margin-top: 8px;
    margin-left: 30px;
}


.notes-content {
    display: none;
    margin-top: 8px;
}

.notes-content.active {
    display: block;
}

.notes-content textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.9em;
    resize: vertical;
}

/* Aide RNCP6 */
.help-box {
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 4%);
}

.help-box-content {
  margin-top: 8px;
  font-size: 0.95em;
  color: #475569;
}

.help-box-content ul {
  margin: 6px 0 0 18px;
}

/* Aide générique visible par critère, sans JS */
.checklist label::before {
  content: "💡 Conseils: indiquez l’objectif, la démarche et le résultat.\A Ajoutez des preuves (captures, extraits de code, scripts, liens).\A Critères: clarté, justification, reproductibilité.";
  display: block;
  padding: 12px 14px;
  background: #fff7f4;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--gradient-start);
  border-radius: 10px;
  font-size: 0.95em;
  line-height: 1.5;
  color: #374151;
  white-space: pre-wrap;
  flex-basis: 100%;
  order: 2;
  margin: 8px 0;
}

/* Zone de notes — visible en fin de ligne */
.checklist label textarea {
  display: inline-block;
  min-width: 260px;
  max-width: 40%;
  margin-left: auto;
  margin-top: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9em;
  order: 3;
}

.notes-content textarea:focus {
    outline: none;
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 2px rgb(255 173 148 / 30%);
}

.search-container {
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

#search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    background: #fff;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 3px rgb(255 173 148 / 30%);
}

.clear-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #999;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #f0f0f0;
    color: #666;
}

.checklist li.search-hidden {
    display: none;
}

.checklist li.search-highlight {
    background: linear-gradient(90deg, #FFF5F0, #FFF5F0);
    border-left: 4px solid #FFF5F0;
    padding-left: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Styles pour les graphiques */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.chart-item {
    text-align: center;
}

.chart-item h4 {
    margin: 0 0 8px;
    font-size: 0.9em;
    color: #333;
    font-weight: 600;
}

.chart-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 4px;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transition: width 0.5s ease;
    border-radius: 6px;
}

.chart-text {
    font-size: 0.8em;
    font-weight: 600;
    color: #666;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Panneau d'information sur le stockage des données */
.info-panel {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 1px solid #d1e7ff;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
  }

.rncp-link {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #334155;
}

.rncp-link:hover,
.rncp-link:focus {
  background: #1f2937;
  border-color: #475569;
}
  
  .info-content h3 {
    color: #2563eb;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .info-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .info-list li {
    padding: 8px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    border-bottom: 1px solid rgb(0 0 0 / 5%);
  }
  
  .info-list li:last-child {
    border-bottom: none;
  }
  
  .info-list li strong {
    color: #1e293b;
    font-weight: 600;
  }

  /* Lien GitHub dans le footer */
.github-link-container {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgb(255 255 255 / 10%);
    text-align: center;
  }
  
  .github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgb(15 23 42 / 90%);
    border: 1px solid #334155;
  }
  
  .github-link:hover {
    color: #fff;
    background: #1f2937;
    transform: translateY(-1px);
    border-color: #475569;
  }
  
  .github-icon {
    width: 20px;
    height: 20px;
    fill: currentcolor;
  }

@media (width <= 768px) {
    .progress-sticky {
        max-width: 100%;
        padding: 8px;
        border-radius: 0;
        box-shadow: none;
    }

    .progress-container {
        padding: 10px;
    }

    .demo-progress {
        flex-direction: column;
        gap: 6px;
        padding: 0;
    }

    .demo-progress-item {
        padding: 0;
        font-size: 0.95em;
    }

    .charts-container {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 8px;
    }
}

@media (width <= 768px) {
  .container {
    padding: 0 5px;
    max-width: 100vw;
  }

  main.container {
    padding-top: 10px;
  }
}

@media (width <= 768px) {
  .filters {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }

  .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.95em;
  }
}

@media (width <= 768px) {
  .checklist li {
    margin-bottom: 0.7rem;
    font-size: 0.98em;
  }

  .notes-container {
    margin-left: 0;
  }
}

@media (width <= 768px) {
  .demo-progress {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 0;
    align-items: stretch;
  }

  .demo-progress-item {
    width: 100%;
    padding: 0;
    font-size: 0.98em;
    box-sizing: border-box;
    overflow-wrap: break-word;
  }

  .demo-badge-progress {
    width: 100%;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
  }
}

@media (width <= 768px) {
  .checklist li {
    flex-direction: column;
    align-items: stretch;
  }

  .checklist label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .notes-container,
  .checklist label textarea,
  .checklist label input[type="text"] {
    width: 100%;
    margin-top: 8px;
    min-width: 0;
    box-sizing: border-box;
  }
}

/* Styles pour les liens légaux */
.legal-links-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid rgb(0 0 0 / 10%);
  border-bottom: 1px solid rgb(0 0 0 / 10%);
}

.legal-link {
  background: #0f172a; /* fond sombre pour contraste AA */
  border: 1px solid #334155;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
}

.legal-link:hover,
.legal-link:focus {
  color: #fff;
  background: #1f2937;
  border-color: #475569;
  transform: translateY(-1px);
  outline: none;
}

/* Styles pour la modale légale */
.legal-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 80%);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.legal-modal-content {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 30px rgb(0 0 0 / 30%);
  animation: modal-slide-in 0.3s ease-out;
}

@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.legal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.legal-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.legal-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.legal-modal-close:hover,
.legal-modal-close:focus {
  background: rgb(255 255 255 / 20%);
  outline: none;
}

.legal-modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

.legal-modal-body section {
  margin-bottom: 24px;
}

.legal-modal-body h3 {
  color: var(--primary-color);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.legal-modal-body h4 {
  color: #333;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 16px;
}

.legal-modal-body p {
  margin-bottom: 12px;
  color: #555;
}

.legal-modal-body ul {
  margin-bottom: 12px;
  padding-left: 20px;
}

.legal-modal-body li {
  margin-bottom: 6px;
  color: #555;
}

.legal-modal-body a {
  color: var(--primary-color);
  text-decoration: none;
}

.legal-modal-body a:hover {
  text-decoration: underline;
}

/* Boîtes d'information spécialisées */
.legal-info-box {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.legal-highlight-box {
  background: linear-gradient(135deg, rgb(255 173 148 / 12%), rgb(255 126 92 / 12%));
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.legal-success-box {
  background: #d1e7dd;
  border: 1px solid #badbcc;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.legal-warning-box {
  background: #fff3cd;
  border: 1px solid #ffecb5;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.legal-contact-box {
  background: #e7f3ff;
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.legal-data-section {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fefefe;
}

.legal-methods-box {
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.legal-help-box {
  background: #f0f0f0;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

/* Grilles pour les droits et l'accessibilité */
.legal-rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.right-item {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.legal-accessibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.accessibility-section {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  background: #fefefe;
}

.accessibility-section h4 {
  margin-bottom: 12px;
  font-size: 16px;
}

.accessibility-section ul {
  margin: 0;
  padding-left: 20px;
}

/* Liste de sécurité */
.legal-security-list {
  margin-bottom: 16px;
}

.security-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
}

.legal-footer {
  border-top: 1px solid #e9ecef;
  padding-top: 16px;
  margin-top: 24px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.legal-modal-footer {
  padding: 16px 24px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  text-align: right;
}

.legal-modal-close-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.legal-modal-close-btn:hover,
.legal-modal-close-btn:focus {
  background: var(--primary-hover);
  outline: none;
}

/* Responsive pour la modale */
@media (width <= 768px) {
  .legal-modal {
    padding: 10px;
  }
  
  .legal-modal-content {
    max-height: 95vh;
  }
  
  .legal-modal-header {
    padding: 16px;
  }
  
  .legal-modal-header h2 {
    font-size: 20px;
  }
  
  .legal-modal-body {
    padding: 16px;
    max-height: 70vh;
  }
  
  .legal-modal-footer {
    padding: 12px 16px;
  }
  
  .legal-links-container {
    flex-direction: column;
    gap: 8px;
  }
  
  .legal-link {
    text-align: center;
    padding: 12px;
  }
  
  .legal-rights-grid {
    grid-template-columns: 1fr;
  }
  
  .legal-accessibility-grid {
    grid-template-columns: 1fr;
  }
}

