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

/* Classe pour les éléments uniquement destinés aux lecteurs d'écran */
.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;
}

/* Lien d'évitement pour lecteurs d'écran */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 4px;
    font-weight: bold;
    transform: translateY(-100%);
    transition: transform 0.3s;
}

.skip-link:focus {
    top: 0;
    transform: translateY(0);
}

/* Styles de focus améliorés pour l'accessibilité */
*:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Focus visible pour les éléments interactifs */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus,
[role="button"]:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
    box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.5);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Bandeau d'information */
.info-banner {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8e53 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 2px solid rgba(255,255,255,0.2);
    animation: slideDown 0.5s ease-out;
    z-index: 100;
}

.info-banner.urgent {
     background: linear-gradient(135deg, #e53e3e 0%, #fc8181 100%);
}

.info-banner.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.info-banner.warning {
    background: linear-gradient(135deg, #ffa726 0%, #ffcc02 100%);
    color: #333;
}

.info-banner.success {
    background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.banner-icon {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

.banner-text {
    font-weight: 500;
    font-size: 0.95rem;
}

.banner-link {
    color: white;
    text-decoration: underline;
    font-weight: bold;
}

.banner-link:hover,
.banner-link:focus {
    text-decoration: none;
    outline: 2px solid rgba(255,255,255,0.8);
    outline-offset: 1px;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: 2px solid transparent;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover,
.close-btn:focus {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(255,255,255,0.8);
}

.banner-date {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-left: 10px;
}

/* Animations pour le bandeau */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-100%); }
}

.banner-hidden {
    animation: fadeOut 0.3s ease-out forwards;
}

/* Header - Style avec image de fond */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-bottom: 1px solid #ccc;
    padding: 20px 0;
    position: relative;
    overflow: visible;
    z-index: 10;
}

.header-banner {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 15px 0;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-left-logos {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.header-right-logos {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.header-right-logos a:focus,
.header-left-logos a:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
    border-radius: 4px;
}

.header-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-image {
    height: 120px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.header-center {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.header-text {
    color: white;
    text-align: left;
}

.header-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.header-subtitle {
    font-size: 1.2rem;
    margin: 5px 0 0 0;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.server-info {
    text-align: center;
    font-size: 0.9rem;
    color: white;
    margin-top: 10px;
    opacity: 0.8;
}

nav {
    text-align: center;
    margin-top: 15px;
}

.nav-menu {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 8px 15px;
    backdrop-filter: blur(10px);
}

.nav-menu li {
    display: inline;
    margin: 0 8px;
}

.nav-menu a {
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: inline-block;
    min-height: 44px; /* Taille minimum recommandée pour les éléments tactiles */
    line-height: 28px;
}

.nav-menu a:hover,
.nav-menu a:focus {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 1px;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 9999;
    border-radius: 8px;
    padding: 8px 0;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 5px;
    border: 2px solid #e0e0e0;
}

.dropdown[aria-expanded="true"] .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333 !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    transition: background-color 0.3s;
    border-radius: 0;
    min-height: 44px;
    line-height: 20px;
}

.dropdown-content a:hover,
.dropdown-content a:focus {
    background-color: #f1f1f1 !important;
    outline: 2px solid #4A90E2 !important;
    outline-offset: -2px;
}

.dropdown-content img {
    vertical-align: middle;
    margin-right: 8px;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

.dropdown > a::after {
    content: ' ▼';
    font-size: 0.7rem;
    margin-left: 5px;
}

.dropdown > a[aria-expanded="true"]::after {
    content: ' ▲';
}

/* Amélioration du contraste pour les textes */
.dropdown-content a {
    color: #2c3e50 !important; /* Contraste amélioré */
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><path d="M0,50 Q250,0 500,50 T1000,50 L1000,100 L0,100 Z"/></svg>') repeat-x;
    animation: wave 20s ease-in-out infinite;
}

/* Réduire le mouvement pour les utilisateurs qui préfèrent moins d'animations */
@media (prefers-reduced-motion: reduce) {
    .hero::before {
        animation: none;
    }
    
    .banner-icon {
        animation: none;
    }
    
    @keyframes slideDown {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes fadeOut {
        from { opacity: 1; }
        to { opacity: 0; }
    }
}

@keyframes wave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-50px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    animation: fadeInUp 1s ease-out 0.6s both;
    min-height: 44px;
    line-height: 1.2;
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Main Content */
main {
    background: white;
    margin: -50px 20px 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.content-section {
    padding: 4rem 2rem;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.feature-card {
    background: #f8f9ff;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.feature-card:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.5);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before,
.feature-card:focus::before {
    left: 100%;
}

.feature-card:hover,
.feature-card:focus {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    border-color: #4A90E2;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50; /* Contraste amélioré */
}

.feature-card p {
    color: #4a5568; /* Contraste amélioré */
    line-height: 1.6;
}

/* Support du mode sombre */
@media (prefers-color-scheme: dark) {
    .info-banner.warning {
        color: #1a1a1a;
    }
    
    .dropdown-content {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .dropdown-content a {
        color: #e2e8f0 !important;
    }
    
    .dropdown-content a:hover,
    .dropdown-content a:focus {
        background-color: #4a5568 !important;
    }
}

/* Support du contraste élevé */
@media (prefers-contrast: high) {
    .nav-menu a {
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
    
    .nav-menu a:hover,
    .nav-menu a:focus {
        border-color: white;
    }
    
    .feature-card {
        border-width: 3px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .info-banner {
        padding: 10px 15px;
    }
    .banner-content {
        flex-direction: column;
        gap: 8px;
    }
    .banner-text {
        font-size: 0.9rem;
        text-align: center;
    }
    .close-btn {
        right: 10px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .header-banner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-left-logos,
    .header-right-logos {
        order: 2;
        justify-content: center;
    }

    .header-center {
        order: 1;
        flex-direction: column;
        gap: 15px;
    }

    .header-text {
        text-align: center;
    }

    .header-title {
        font-size: 1.4rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .logo-image {
        height: 100px;
    }

    .nav-menu li {
        display: block;
        margin: 5px 0;
    }

    .nav-menu {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 15px;
        padding: 15px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    main {
        margin: -30px 10px 0;
    }
    
    /* Amélioration tactile sur mobile */
    .nav-menu a,
    .dropdown-content a,
    .feature-card {
        min-height: 48px; /* Taille tactile recommandée sur mobile */
    }
}

/* Zone de contenu dynamique */
.content-frame {
    min-height: 600px;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#page-iframe {
    width: 100%;
    max-width: 1000px;
    height: 600px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

#page-iframe:focus {
    border-color: #4A90E2;
    outline: none;
}

#default-content {
    width: 100%;
    max-width: 1200px;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    opacity: 0.8;
}

/* Amélioration de la lisibilité pour les utilisateurs dyslexiques */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Support pour les lecteurs d'écran */
[aria-live] {
    position: relative;
}

/* Messages d'état pour les lecteurs d'écran */
.status-message {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
