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

:root {
    --primary-color: #1a4d7a; /* Contraste amélioré */
    --primary-dark: #0d2d47;
    --secondary-color: #2563eb; /* Bleu plus foncé pour meilleur contraste */
    --success-color: #15803d; /* Vert plus foncé */
    --danger-color: #dc2626; /* Rouge plus foncé */
    --warning-color: #d97706; /* Orange plus foncé */
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-color: #1f2937; /* Texte plus foncé pour meilleur contraste */
    --text-light: #4b5563; /* Gris plus foncé */
    --border-color: #d1d5db; /* Bordure plus visible */
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8; /* Augmenté pour meilleure lisibilité */
    font-size: 18px; /* Taille de base augmentée */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px; /* Augmenté de 20px à 30px pour plus d'espace */
}

/* Pages */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Header */
.header {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0; /* Augmenté de 1.5rem */
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem; /* Augmenté de 1.5rem à 2rem */
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 1rem;
}

/* Buttons - Adaptés pour personnes âgées */
.btn {
    padding: 1rem 2rem; /* Augmenté de 0.75rem 1.5rem à 1rem 2rem */
    border: none;
    border-radius: 8px; /* Bordures plus arrondies */
    font-size: 1.125rem; /* Augmenté de 1rem à 1.125rem (18px) */
    font-weight: 600; /* Plus gras pour meilleure visibilité */
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-height: 48px; /* Taille minimale pour faciliter le clic */
    min-width: 120px; /* Largeur minimale */
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
    border: 2px solid var(--secondary-color); /* Bordure pour meilleure visibilité */
}

.btn-primary:hover {
    background: #1d4ed8; /* Couleur plus foncée au survol */
    border-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

/* Style spécifique pour les boutons outline dans le dashboard (fond blanc) */
.dashboard-content .btn-outline,
.fairepart-card-actions .btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.dashboard-content .btn-outline:hover,
.fairepart-card-actions .btn-outline:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-large {
    padding: 1.25rem 2.5rem; /* Augmenté */
    font-size: 1.25rem; /* Augmenté de 1.1rem à 1.25rem (20px) */
    min-height: 56px; /* Plus grand pour faciliter le clic */
}

.btn-block {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem; /* Augmenté de 2.5rem à 3rem */
    margin-bottom: 1.5rem; /* Espacement augmenté */
    font-weight: 700;
    line-height: 1.3; /* Meilleure lisibilité */
}

.hero-subtitle {
    font-size: 1.5rem; /* Augmenté de 1.25rem à 1.5rem */
    opacity: 0.95; /* Légèrement plus opaque */
    max-width: 700px; /* Largeur augmentée */
    margin: 0 auto 1rem;
    line-height: 1.6; /* Meilleure lisibilité */
}

.hero-text {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Explanation Section */
.explanation-section {
    padding: 4rem 0;
    background: var(--bg-color);
}

.explanation-box {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 1000px;
    margin: 0 auto;
}

.explanation-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.explanation-part {
    flex: 1;
    min-width: 280px;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.explanation-part h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.explanation-part p {
    color: var(--text-light);
    line-height: 1.8;
}

.explanation-arrow {
    font-size: 3rem;
    color: var(--secondary-color);
    font-weight: bold;
    flex-shrink: 0;
}

.explanation-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e8f4f8;
    border-left: 4px solid var(--secondary-color);
    border-radius: 6px;
    color: var(--text-color);
    line-height: 1.8;
}

/* Why Section */
.why-section {
    padding: 4rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem; /* Augmenté de 2rem à 2.5rem */
    margin-bottom: 3.5rem; /* Espacement augmenté */
    color: var(--primary-color);
    font-weight: 700; /* Plus gras */
    line-height: 1.3;
}

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

.reason-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reason-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.reason-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.reason-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.reason-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* How Section */
.how-section {
    padding: 4rem 0;
    background: var(--bg-color);
}

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

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-light);
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: var(--secondary-color);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 2rem;
}

.auth-card {
    background: white;
    padding: 3.5rem; /* Augmenté de 3rem */
    border-radius: 12px; /* Plus arrondi */
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 550px; /* Légèrement plus large */
}

.auth-card h2 {
    color: var(--primary-color);
    margin-bottom: 2.5rem; /* Espacement augmenté */
    text-align: center;
    font-size: 2.5rem; /* Augmenté de 2rem à 2.5rem */
    font-weight: 700;
}

.form-group {
    margin-bottom: 2rem; /* Augmenté de 1.5rem à 2rem */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem; /* Augmenté de 0.5rem */
    color: var(--text-color);
    font-weight: 600; /* Plus gras */
    font-size: 1.125rem; /* Augmenté à 18px */
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem; /* Augmenté de 0.75rem à 1rem */
    border: 3px solid var(--border-color); /* Bordure plus épaisse */
    border-radius: 8px; /* Bordures plus arrondies */
    font-size: 1.125rem; /* Augmenté de 1rem à 1.125rem (18px) */
    transition: border-color 0.3s ease;
    min-height: 48px; /* Taille minimale pour faciliter l'interaction */
    line-height: 1.6;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem; /* Augmenté de 0.25rem */
    color: var(--text-light);
    font-size: 1rem; /* Augmenté de 0.875rem à 1rem */
    line-height: 1.6;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
}

.auth-link a {
    color: var(--secondary-color);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fee;
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    border: 1px solid #c3e6cb;
}

/* Dashboard */
.dashboard-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0; /* Augmenté de 1.5rem */
    box-shadow: var(--shadow);
}

.dashboard-header h1 {
    font-size: 2rem; /* Augmenté pour meilleure visibilité */
    font-weight: 700;
}

.dashboard-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-content {
    padding: 2rem 0;
    background: var(--bg-color);
    min-height: calc(100vh - 200px);
}

/* Amélioration de la lisibilité du tableau de bord */
.dashboard-content .container {
    max-width: 1400px;
}

/* Responsive pour le tableau de bord */
@media (max-width: 1024px) {
    .dashboard-content .container > div[style*="grid-template-columns: 1fr 300px"] {
        grid-template-columns: 1fr !important;
    }
    
    .dashboard-content .container > div[style*="grid-template-columns: 1fr 300px"] > div:last-child {
        position: static !important;
    }
}

.fairepart-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.fairepart-card {
    background: white;
    border-radius: 12px;
    padding: 2rem; /* Augmenté de 1.5rem */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color); /* Bordure plus épaisse */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.fairepart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.fairepart-card[data-statut="envoye"]::before {
    background: var(--success-color);
    opacity: 1;
}

.fairepart-card[data-statut="erreur"]::before {
    background: var(--danger-color);
    opacity: 1;
}

.fairepart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.fairepart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.fairepart-card-title-section {
    flex: 1;
    min-width: 0;
}

.fairepart-card-title {
    margin: 0 0 0.75rem 0; /* Espacement augmenté */
    color: var(--primary-color);
    font-size: 1.5rem; /* Augmenté de 1.25rem à 1.5rem */
    font-weight: 700; /* Plus gras */
    word-wrap: break-word;
    line-height: 1.4;
}

.fairepart-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem; /* Augmenté de 0.75rem */
    font-size: 1rem; /* Augmenté de 0.85rem à 1rem */
    color: var(--text-light); /* Utilise la variable pour meilleur contraste */
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.fairepart-card-status-section {
    flex-shrink: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem; /* Augmenté */
    padding: 0.75rem 1.25rem; /* Augmenté */
    border-radius: 24px; /* Plus arrondi */
    font-size: 1rem; /* Augmenté de 0.85rem à 1rem */
    font-weight: 600;
    white-space: nowrap;
    min-height: 40px; /* Taille minimale */
}

.status-badge .status-icon {
    font-size: 1rem;
}

.status-badge.status-envoye {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-erreur {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-brouillon {
    background: #e2e3e5;
    color: #383d41;
}

.fairepart-card-photo {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    max-height: 200px;
}

.fairepart-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fairepart-card-message {
    margin: 1.5rem 0; /* Augmenté de 1rem */
    color: var(--text-color); /* Utilise la variable */
    line-height: 1.8; /* Augmenté de 1.6 */
    flex: 1;
    font-size: 1.125rem; /* Taille augmentée */
}

.fairepart-card-message p {
    margin: 0;
}

.fairepart-card-stats {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.stat-icon {
    font-size: 1.1rem;
}

.stat-value {
    font-weight: 600;
    color: var(--primary-color);
}

.stat-value.stat-success {
    color: var(--success-color);
}

.stat-value.stat-error {
    color: var(--danger-color);
}

.stat-label {
    color: #666;
    font-size: 0.85rem;
}

.stat-types-envoi {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.fairepart-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.btn-icon-text {
    font-size: 1.5rem; /* Augmenté de 1.1rem */
}

.btn-text {
    font-size: 1.125rem; /* Augmenté de 0.9rem à 1.125rem (18px) */
}

.btn-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.4rem;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.btn-success {
    background: var(--success-color);
    color: white;
    border: none;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c82333;
}

/* Statistiques globales */
.stat-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-card.stat-brouillon {
    border-color: #6c757d;
}

.stat-card.stat-envoye {
    border-color: var(--success-color);
}

.stat-card.stat-erreur {
    border-color: var(--danger-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-small {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value-small {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label-small {
    font-size: 0.75rem;
    color: #666;
}

.stat-card-small.stat-success .stat-value-small {
    color: var(--success-color);
}

.stat-card-small.stat-warning .stat-value-small {
    color: #ffc107;
}

.stat-card-small.stat-error .stat-value-small {
    color: var(--danger-color);
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-brouillon {
    background: #f0f0f0;
    color: var(--text-color);
}

.status-envoye {
    background: #d4edda;
    color: #155724;
}

.status-erreur {
    background: #f8d7da;
    color: #721c24;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: white;
    padding: 2.5rem; /* Augmenté de 2rem */
    border-radius: 12px; /* Plus arrondi */
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 900px; /* Légèrement plus large */
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    font-size: 1.125rem; /* Taille de police augmentée dans les modales */
}

/* Modal plus large pour la modification des faire-part */
#fairepart-modal .modal-content {
    max-width: 1200px;
    width: 95%;
}

.close {
    position: absolute;
    right: 1.5rem; /* Augmenté de 1rem */
    top: 1.5rem; /* Augmenté de 1rem */
    font-size: 2.5rem; /* Augmenté de 2rem à 2.5rem */
    font-weight: bold;
    color: var(--text-color); /* Plus foncé pour meilleure visibilité */
    cursor: pointer;
    line-height: 1;
    width: 48px; /* Taille minimale pour faciliter le clic */
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close:hover {
    background-color: #f3f4f6; /* Fond au survol */
}

.close:hover {
    color: var(--text-color);
}

.destinataires-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.destinataires-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.destinataire-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 6px;
    align-items: center;
}

.destinataire-item input {
    flex: 1;
}

.destinataire-item .btn {
    padding: 0.5rem 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Améliorations supplémentaires pour personnes âgées */
.destinataires-section h3 {
    font-size: 1.75rem; /* Augmenté */
    font-weight: 700;
    margin-bottom: 1.5rem; /* Espacement augmenté */
}

.empty-state-icon {
    font-size: 5rem; /* Augmenté de 4rem */
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.75rem; /* Augmenté */
    font-weight: 700;
    margin-bottom: 1rem;
}

.empty-state {
    font-size: 1.125rem; /* Taille augmentée */
    line-height: 1.8;
}

.destinataire-item {
    padding: 1.5rem; /* Augmenté de 1rem */
    margin-bottom: 1.5rem; /* Augmenté */
    border: 2px solid var(--border-color); /* Bordure plus visible */
    border-radius: 8px;
}

.destinataire-item input,
.destinataire-item select,
.destinataire-item textarea {
    font-size: 1.125rem; /* Taille augmentée */
    padding: 0.875rem; /* Padding augmenté */
    min-height: 48px;
}

/* Amélioration des onglets */
.tab-btn {
    font-size: 1.125rem !important; /* Force la taille */
    padding: 1.25rem 2rem !important; /* Augmenté */
    min-height: 56px; /* Taille minimale */
    font-weight: 600 !important;
}

/* Amélioration des tableaux */
table {
    font-size: 1.125rem; /* Taille augmentée */
}

table th {
    font-size: 1.25rem; /* Plus grand pour les en-têtes */
    font-weight: 700;
    padding: 1.25rem !important; /* Padding augmenté */
}

table td {
    padding: 1rem !important; /* Padding augmenté */
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Amélioration des liens */
a {
    font-size: 1.125rem; /* Taille augmentée */
    font-weight: 600; /* Plus gras */
    text-decoration: underline;
    color: var(--secondary-color);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Classes pour effets de survol compatibles CSP */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.hover-lift-small {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift-small:hover {
    transform: translateY(-2px);
}

.hover-lift-medium {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift-medium:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Classes pour les champs de formulaire avec focus */
.input-focus {
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-focus:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

/* Classes pour les boutons de suppression avec hover */
.btn-delete-hover {
    transition: all 0.2s;
}

.btn-delete-hover:hover {
    transform: scale(1.15);
    background: #c0392b !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
}

/* Classes pour les items de destinataire avec hover */
.destinataire-item-hover {
    transition: all 0.2s;
}

.destinataire-item-hover:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
}

/* Classes pour les labels de type d'envoi avec hover */
.type-envoi-label-hover {
    transition: all 0.2s;
}

.type-envoi-label-hover:hover {
    border-color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Classe pour masquer les images en cas d'erreur */
.img-error-hidden {
    display: none !important;
}

/* Classes pour les boutons de modal avec hover */
.btn-modal-close-hover {
    transition: color 0.2s;
}

.btn-modal-close-hover:hover {
    color: #333 !important;
}

/* Amélioration des messages d'erreur et de succès */
.error-message,
.success-message {
    font-size: 1.125rem; /* Taille augmentée */
    padding: 1.5rem; /* Padding augmenté */
    line-height: 1.8;
    border-width: 3px; /* Bordure plus épaisse */
}

/* Amélioration des statistiques */
.stat-value {
    font-size: 2.5rem !important; /* Augmenté de 2rem */
    font-weight: 700;
}

.stat-label {
    font-size: 1rem !important; /* Augmenté de 0.85rem */
    font-weight: 600;
}

/* Amélioration des onglets du tableau de bord */
.tab-btn {
    transition: all 0.2s ease;
}

.tab-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.tab-btn.active {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Amélioration de la section d'aide */
.help-section-collapsible {
    transition: all 0.3s ease;
}

/* Classes pour remplacer les styles inline problématiques */
.event-section {
    padding: 5rem 0;
    background: white;
}

.event-section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.event-section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.event-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.event-card {
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    cursor: pointer;
}

.event-card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.event-card-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.event-card-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.event-card-footer {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.why-section {
    padding: 5rem 0;
    background: white;
}

.events-advantages-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 5rem 0;
}

.event-tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.event-tab-btn {
    padding: 1.25rem 2.5rem;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 3px solid #e0e0e0;
    color: #666;
}

.event-tab-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.event-content {
    background: white;
    padding: 4rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    display: none;
}

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

.event-content-header {
    text-align: center;
    margin-bottom: 3rem;
}

.event-content-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.event-content-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.event-content-subtitle {
    color: #666;
    font-size: 1.2rem;
}

.event-advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.event-advantage-card {
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid;
}

.event-advantage-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.event-advantage-title {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.event-advantage-text {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Mobile très petit (< 480px) */
@media (max-width: 479px) {
    body {
        font-size: 16px;
    }

    .container {
        padding: 0 12px;
    }

    /* Header */
    .header {
        padding: 1rem 0;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .logo {
        font-size: 1.5rem;
        text-align: center;
    }

    .nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav .btn {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-height: 44px;
    }

    /* Hero */
    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .hero-text {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /* Sections */
    section {
        padding: 2rem 0 !important;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Cards */
    .reasons-grid,
    .steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .reason-card,
    .step {
        padding: 1.25rem;
    }

    .reason-icon {
        font-size: 2rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    /* Event cards */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Buttons */
    .btn {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-height: 44px;
        min-width: auto;
    }

    .btn-large {
        padding: 1rem 1.5rem;
        font-size: 1.125rem;
        min-height: 48px;
    }

    /* Forms */
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }

    .auth-card h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.875rem;
        font-size: 1rem;
        min-height: 44px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Dashboard */
    .dashboard-header {
        padding: 1rem 0;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-header .container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .dashboard-content {
        padding: 1rem 0;
    }

    /* Tabs */
    .tab-btn {
        padding: 0.875rem 1rem !important;
        font-size: 0.95rem !important;
        min-height: 44px;
    }

    div[style*="display: flex"][style*="gap: 1rem"][style*="flex-wrap: wrap"] {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    /* Faire-part cards */
    .fairepart-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .fairepart-card {
        padding: 1.25rem;
    }

    .fairepart-card-title {
        font-size: 1.25rem;
    }

    .fairepart-card-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .fairepart-card-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .fairepart-card-actions .btn {
        width: 100%;
        flex: none;
    }

    /* Modals */
    .modal.active {
        padding: 0.5rem;
        align-items: flex-start;
    }

    .modal-content {
        padding: 1.25rem;
        margin: 0;
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .close {
        right: 0.75rem;
        top: 0.75rem;
        font-size: 2rem;
        width: 40px;
        height: 40px;
    }

    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 0.875rem;
        min-width: 600px;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.875rem;
    }

    /* Event tabs */
    .event-tabs-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .event-tab-btn {
        width: 100%;
        padding: 1rem !important;
        font-size: 1rem !important;
    }

    .event-content {
        padding: 1.5rem !important;
    }

    .event-content-title {
        font-size: 1.75rem !important;
    }

    .event-content-icon {
        font-size: 3rem !important;
    }

    .event-advantages-grid {
        grid-template-columns: 1fr !important;
    }

    .event-card-icon {
        font-size: 3rem !important;
    }

    .event-card-title {
        font-size: 1.25rem !important;
    }

    .event-section-title {
        font-size: 1.75rem !important;
    }

    .event-section-subtitle {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    /* Search and filters */
    div[style*="grid-template-columns: 1fr auto"],
    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Stats */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.75rem !important;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 0;
        font-size: 0.875rem;
    }
}

/* Mobile (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    body {
        font-size: 17px;
    }

    .container {
        padding: 0 16px;
    }

    /* Header */
    .header {
        padding: 1.25rem 0;
    }

    .header .container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .logo {
        font-size: 1.75rem;
    }

    .nav {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav .btn {
        flex: 1;
        min-width: 140px;
    }

    /* Hero */
    .hero {
        padding: 2.5rem 0;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1.25rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-text {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }

    /* Sections */
    section {
        padding: 3rem 0 !important;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    /* Cards */
    .reasons-grid,
    .steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Event cards */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Buttons */
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1.0625rem;
        min-height: 48px;
    }

    /* Forms */
    .auth-card {
        padding: 2rem;
        margin: 1.5rem;
    }

    .auth-card h2 {
        font-size: 2rem;
    }

    /* Dashboard */
    .dashboard-header .container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Tabs */
    div[style*="display: flex"][style*="gap: 1rem"][style*="flex-wrap: wrap"] {
        flex-wrap: wrap;
        gap: 0.75rem !important;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
    }

    /* Faire-part cards */
    .fairepart-list {
        grid-template-columns: 1fr;
    }

    .fairepart-card-actions {
        flex-wrap: wrap;
    }

    .fairepart-card-actions .btn {
        flex: 1;
        min-width: 140px;
    }

    /* Modals */
    .modal.active {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 0;
        max-width: 100%;
    }

    /* Search and filters */
    div[style*="grid-template-columns: 1fr auto"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    /* Event tabs */
    .event-tabs-container {
        flex-wrap: wrap;
    }

    .event-tab-btn {
        flex: 1;
        min-width: 140px;
    }

    .event-content-title {
        font-size: 2rem !important;
    }

    .event-content-icon {
        font-size: 4rem !important;
    }

    .event-advantages-grid {
        grid-template-columns: 1fr !important;
    }

    .event-section-title {
        font-size: 2rem !important;
    }
}

/* Tablette (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 24px;
    }

    /* Header */
    .header {
        padding: 1.5rem 0;
    }

    .logo {
        font-size: 1.875rem;
    }

    /* Hero */
    .hero {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    /* Sections */
    section {
        padding: 3.5rem 0 !important;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Cards */
    .reasons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Event cards */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"],
    .event-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .event-advantages-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .event-content-title {
        font-size: 2.25rem !important;
    }

    /* Dashboard */
    .dashboard-content .container > div[style*="grid-template-columns: 1fr 300px"] {
        grid-template-columns: 1fr !important;
    }

    .dashboard-content .container > div[style*="grid-template-columns: 1fr 300px"] > div:last-child {
        position: static !important;
    }

    /* Faire-part cards */
    .fairepart-list {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Modals */
    .modal-content {
        max-width: 90%;
        padding: 2rem;
    }

    /* Search and filters */
    div[style*="grid-template-columns: 1fr auto"] {
        grid-template-columns: 1fr 200px !important;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    /* Dashboard responsive */
    .dashboard-content .container > div[style*="grid-template-columns: 1fr 300px"] {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 2rem;
    }

    .dashboard-content .container > div[style*="grid-template-columns: 1fr 300px"] > div:last-child {
        position: sticky;
        top: 2rem;
        align-self: start;
    }
}

/* Améliorations générales pour tous les écrans mobiles */
@media (max-width: 1023px) {
    /* Amélioration de la navigation */
    .explanation-content {
        flex-direction: column;
    }

    .explanation-arrow {
        transform: rotate(90deg);
        font-size: 2rem;
    }

    .explanation-box {
        padding: 2rem 1.5rem;
    }

    /* Formulaires */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Dashboard */
    .dashboard-header .container {
        flex-wrap: wrap;
    }

    .fairepart-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Modals pleine largeur sur mobile */
    .modal.active {
        align-items: flex-start;
        padding-top: 1rem;
    }

    /* Amélioration des inputs sur mobile */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        font-size: 16px; /* Évite le zoom sur iOS */
    }

    /* Amélioration du scroll sur mobile */
    .modal-content,
    .table-container {
        -webkit-overflow-scrolling: touch;
    }

    /* Amélioration des boutons tactiles */
    .btn,
    button {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
    }

    /* Amélioration des liens */
    a {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* Animations pour les notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

