/* Styles pour les pages statiques (À propos, Contact, etc.) */

/* Layout général */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Bandeau de gestion des cookies (public) */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
    z-index: 1000;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw; /* ne jamais dépasser la largeur de l'appareil */
    overflow-x: hidden; /* évite le scroll horizontal */
    padding-bottom: max(0px, env(safe-area-inset-bottom));
}
.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    box-sizing: border-box; /* éviter toute expansion involontaire */
}
.cookie-banner-text {
    flex: 1 1 280px;
    color: var(--text);
}
.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
@media (max-width: 576px) {
    .cookie-banner-inner {
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        max-height: 60vh; /* évite le débordement vertical */
        overflow-y: auto;
        width: 100%;
        max-width: 100%;
        margin: 0; /* colle aux bords du bandeau sur mobile */
    }
    .cookie-banner-text {
        flex: none;
        font-size: 0.95rem;
        line-height: 1.4;
        word-break: break-word;
        hyphens: auto;
        overflow-wrap: anywhere; /* casse même les très longues URLs/mots */
    }
    .cookie-banner-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .cookie-banner-actions .btn {
        width: 100%;
    }
}

/* Placeholders de consentement (vidéo / captcha) */
.consent-placeholder {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 12px;
    border-radius: 8px;
}
.consent-placeholder .btn { margin-left: auto; }

.page-description {
    color: #566469;
    background-color: var(--surface);
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.page-description::before {
    content: "";
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    background-color: #007bff;
    border-radius: 0; /* carré */
}

.page-keyword {
    background-color: #e2ecf7;
    color: #7b7c7d;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: no-drop;
}

/* Grille de tuiles pour la page d'accueil */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tiles-grid > div {
    display: block;
}

.tile {
    display: block;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tile-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.tile-welcome .tile-icon {
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.tile-documents .tile-icon {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.tile-about .tile-icon {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.tile-contact .tile-icon {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.tile-content {
    margin-top: 1rem;
}

.tile-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    color: var(--text-strong);
    font-weight: 700;
}

.tile-count {
    font-size: 1.2rem;
    color: #007bff;
    font-weight: 600;
    margin: 0;
}

.tile-description {
    font-size: 1rem;
    color: var(--text);
    margin: 0;
}

/* Responsive pour les tuiles */
@media (max-width: 768px) {
    .tiles-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .tile {
        padding: 1.5rem;
    }
    
    .tile-icon {
        font-size: 2.5rem;
        width: 60px;
        height: 60px;
    }
    
    .tile-title {
        font-size: 1.3rem;
    }
    
    .tile-count,
    .tile-description {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .tiles-grid {
        grid-template-columns: 1fr;
    }
}

/* Styles pour la liste des documents (docs.php) */
.documents-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.document-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.document-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.document-type-badge {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.document-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.document-title {
    margin: 0 0 0.75rem;
    font-size: 1.3rem;
}

.document-title a {
    color: var(--text-strong);
    text-decoration: none;
    transition: color 0.3s ease;
}

.document-title a:hover {
    color: var(--text-strong);
    text-decoration: underline;
}

.document-description {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.document-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background-color: var(--surface-2);
    border-radius: 12px;
    color: var(--text);
    border: 1px dashed var(--input-border);
}

/* Responsive pour la liste des documents */
@media (max-width: 768px) {
    .documents-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .document-card {
        padding: 1.25rem;
    }
    
    .document-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .documents-list {
        grid-template-columns: 1fr;
    }
}

/* Styles pour l'affichage d'un document (doc.php) */
.document-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--surface-2);
    border-radius: 8px;
    flex-wrap: wrap;
}

.document-type {
    color: #007bff;
    font-weight: 600;
}

.document-date { color: var(--text-muted); }

.document-body {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    line-height: 1.8;
    color: var(--text);
    border: 1px solid var(--border);
}

.document-body pre {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #e8e8e8;
}

.document-body a {
    color: #007bff;
    text-decoration: none;
}

.document-body a:hover {
    text-decoration: underline;
}

.document-body h1,
.document-body h2,
.document-body h3,
.document-body h4,
.document-body h5,
.document-body h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.document-body p {
    margin-bottom: 1rem;
}

.document-body ul,
.document-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.document-body li {
    margin-bottom: 0.5rem;
}

.document-body blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

.document-body code {
    background-color: rgba(0, 123, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.document-external-link,
.document-file {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 12px;
    margin: 1rem 0;
}

.document-external-link p,
.document-file p {
    margin-bottom: 1rem;
    color: #666;
    font-size: 1.1rem;
}

.document-actions {
    text-align: center;
    padding-top: 1rem;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Responsive pour l'affichage d'un document */
@media (max-width: 768px) {
    .document-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .document-body {
        padding: 1.5rem;
    }
}


/* Tabs for documents pageoverflow-x: auto; */
.tabs {
    display: flex;
    align-items: flex-end;
    gap: .3rem;
    border-bottom: 1px solid var(--border);
    margin: 1rem 0 1.5rem;
    padding: 0.021rem;
    
}
.tab {
    display: inline-block;
    padding: .6rem 1rem;
    color: var(--text-muted);
    font-size: 1.3rem;
    border: 1px solid transparent;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    background: transparent;
    position: relative;
    top: 1px;
    white-space: nowrap;
}
.tab:hover {
    background: var(--surface-2);
    color: var(--text-strong);
}
.tab.active {
    background: var(--surface);
    color: var(--text-strong);
    font-weight: 600;
    border-color: var(--border);
    border-bottom-color: var(--surface);
    box-shadow: 0 -1px 6px rgba(0,0,0,0.06);
}
.tabs .tab:not(.active) {
    border-color: var(--border);
    border-bottom: 1px solid var(--border);
}
.tab-panel{
    min-height: 100%;
}


@media (max-width: 1024px) {
    .tabs {
        gap: .4rem;
    }
    .tab {
        padding: .55rem .9rem;
    }
}

@media (max-width: 768px) {
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: .25rem;
    }
    .tab {
        flex: 0 0 auto;
        font-size: .95rem;
        padding: .5rem .8rem;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .tabs {
        gap: .3rem;
    }
    .tab {
        font-size: .9rem;
        padding: .45rem .7rem;
    }
}

/* --------------------------------------------------- */


/* Titre de la page */
.page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--text-strong);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.page-header h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #007bff;
}

.page-content {
    line-height: 1.6;
}
.page-content hr{
    margin: 2rem 0;
    border-color: var(--border);
}

.page-content .cookies-list{
    margin: 1rem 0;
}

.page-content ul.cookies-list{
    list-style: none;
    padding-left: 1.5rem;
}
.page-content .cookies-list li{
    margin: .5rem 0;
}
.page-content .cookies-list li::before{
    content: '';
    display: inline-block;
    width: 8px;
    height: 2px;
    background: #007bff;
    border-radius: 2px;
    margin-right: .5rem;
    transform: translateY(-1px);
}
/*.page-content .cookies-list li:before{
    content: '§';
    margin-right: .5rem;
    color: #007bff;
    font-weight: 700;
}*/

/* Styles pour la page À propos */
.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-left: 4px solid #007bff;
    padding-left: 1rem;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-photo {
    height: 200px;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-member:hover .member-photo img {
    transform: scale(1.05);
}

.team-member h3 {
    padding: 1rem 1rem 0.5rem;
    margin: 0;
    font-size: 1.2rem;
}

.member-role {
    padding: 0 1rem;
    margin: 0 0 0.5rem;
    color: #007bff;
    font-weight: bold;
}

.member-bio {
    padding: 0 1rem 1rem;
    margin: 0;
    font-size: 0.9rem;
}

.mission-list {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.mission-list li {
    margin-bottom: 0.5rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-item {
    text-align: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.value-item:hover {
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.value-icon {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.value-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* Styles pour la page Contact */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
}

.contact-form-container {
    flex: 2;
    min-width: 300px;
}

.info-item {
    display: flex;
    margin-bottom: 1.5rem;
}

.info-icon {
    font-size: 1.5rem;
    color: #007bff;
    margin-right: 1rem;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.info-content p {
    margin: 0;
    color: var(--text);
}

.social-links {
    margin-top: 2rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

.contact-form {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
}

.form-actions {
    text-align: right;
}

.map-container {
    margin-top: 3rem;
}

.map-container h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-strong);
    border-left: 4px solid #007bff;
    padding-left: 1rem;
}

.map {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .team-grid,
    .values-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .contact-info {
        order: 1;
    }
    
    .contact-form-container {
        order: 0;
    }
}

/* Alertes */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert ul {
    margin: 0.5rem 0 0;
    padding-left: 1.5rem;
}

/* Images responsives */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Styles pour la section équipe */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.team-member {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-photo {
    height: 250px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.member-photo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Assure que l'image est entièrement visible */
    width: auto;
    height: auto;
}

.team-member h3 {
    margin: 15px 15px 5px;
    font-size: 1.2rem;
    color: #343a40;
}

.member-role {
    margin: 0 15px 10px;
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
}

.member-bio {
    margin: 0 15px 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
}

/* Responsive adjustments pour l'équipe */
@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .member-photo {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* Normalisation du rendu Markdown dans .prose */
.prose {
    line-height: 1.7;
    color: #222;
}
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    margin-top: 1.25rem;
    margin-bottom: .75rem;
    line-height: 1.25;
}
.prose p { margin: 0 0 1rem; }
.prose ul,
.prose ol { margin: 0 0 1rem; padding-left: 2rem; list-style-position: outside; }
.prose li { margin: .25rem 0; }
.prose ul ul,
.prose ul ol,
.prose ol ul,
.prose ol ol { margin-top: .25rem; margin-bottom: .25rem; padding-left: 1.5rem; }
.prose pre { background: #f5f5f5; padding: 1rem; border-radius: 6px; overflow-x: auto; border: 1px solid #e8e8e8; }
.prose code { background: rgba(0,0,0,.04); padding: .15rem .35rem; border-radius: 4px; }
.prose hr { border: 0; border-top: 1px solid #e0e0e0; margin: 1.25rem 0; }

/* Table des matières pour les pages statiques */
.page-toc {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    margin: 12px 0 24px;
    max-width: 100%;
}
.page-toc-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-strong);
}
.page-toc-title::after{
    content: '';
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: var(--border);
    height: 1px;
    width: 90%;
}
.page-toc ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding-left: 0;
    list-style: none;
}
.page-toc li { margin: 0; }
.page-toc a {
    color: #007bff;
    text-decoration: none;
    display: inline-block;
}
.page-toc a:hover {
    text-decoration: underline;
}

/* Décalage d'ancrage pour les sections (évite le masquage sous l'entête) */
.cgu-section,
.confidentialite-section,
.mentionslegales-section,
.page-section {
    scroll-margin-top: 80px;
}
.page-section h2::after{
    content: '';
    display: block;
    margin-top: 0.16rem;
    margin-bottom: 0.8rem;
    transform: translateX(2rem);
    background-color: #007bff;
    height: 0.32rem;
    width: 10%;
}

/* Disposition en colonnes avec sommaire (par défaut à droite) */
@media (min-width: 992px) {
    .page-container {
        display: grid;
        grid-template-columns: 1fr 280px; /* contenu | sommaire */
        gap: 24px;
        align-items: start;
    }
    .page-header { grid-column: 1 / -1; }
    .page-toc { grid-column: 2; grid-row: 2; position: sticky; top: 80px; }
    .page-content { grid-column: 1; grid-row: 2; }

    /* Variante: sommaire à gauche si .toc-left est présent sur .page-container */
    .page-container.toc-left {
        grid-template-columns: 280px 1fr; /* sommaire | contenu */
    }
    .page-container.toc-left .page-toc { grid-column: 1; grid-row: 2; }
    .page-container.toc-left .page-content { grid-column: 2; grid-row: 2; }
}
