/* Variables de couleurs */
:root {
    --primary-blue: #1a4b8c;
    --secondary-blue: #2a6fc9;
    --primary-yellow: #f9c80e;
    --secondary-yellow: #fad648;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333;
    --white: #ffffff;
    --black: #000000;
    --error-red: #e74c3c;
    --success-green: #2ecc71;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-strong: rgba(0, 0, 0, 0.25);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Open Sans", sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: rgba(255, 255, 255, 0.95);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '✟';
    position: fixed;
    font-size: 800px;
    color: rgba(26, 75, 140, 0.08) !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 8rem auto 2rem;
    padding: 2rem 1rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInDown 0.8s ease-out;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue), var(--primary-yellow));
    animation: shimmer 3s infinite;
}

header h1 {
    font-family: "Noto Serif", serif;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 0 0.5rem;
    text-shadow: 0 2px 10px rgba(26, 75, 140, 0.1);
}

@media (min-width: 576px) {
    header h1 {
        font-size: 2.2rem;
    }
}

@media (min-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 400px) {
    header h1 {
        font-size: 1.6rem;
        line-height: 1.4;
    }

    header {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .container {
        margin-top: 6rem;
    }
}

header h1 br {
    display: none;
}

@media (min-width: 768px) {
    header h1 br {
        display: inline;
    }
}

/* Formulaire */
#messeForm {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow-medium);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    transition: var(--transition-smooth);
}

#messeForm:hover {
    box-shadow: 0 15px 50px var(--shadow-strong);
    transform: translateY(-5px);
}

.form-group {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.6s ease-out;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: var(--transition-smooth);
}

label.required::after {
    content: " *";
    color: var(--error-red);
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid rgba(26, 75, 140, 0.2);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: "Open Sans", sans-serif;
    background: rgba(255, 255, 255, 0.9);
    transition: var(--transition-smooth);
    color: var(--dark-gray);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--secondary-blue);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(42, 111, 201, 0.15), 0 4px 15px var(--shadow-light);
    outline: none;
    transform: translateY(-2px);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a4b8c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
    cursor: pointer;
}

select:hover {
    border-color: var(--secondary-blue);
}

textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.hidden {
    display: none;
}

/* Bouton de soumission */
button[type="submit"],
button[type="button"] {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 2rem auto 0;
    box-shadow: 0 8px 20px rgba(26, 75, 140, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

button[type="submit"]::before,
button[type="button"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[type="submit"]:hover,
button[type="button"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(26, 75, 140, 0.4);
}

button[type="submit"]:hover::before,
button[type="button"]:hover::before {
    width: 300px;
    height: 300px;
}

button[type="submit"]:active,
button[type="button"]:active {
    transform: translateY(-1px);
}

button[type="submit"]:disabled,
button[type="button"]:disabled {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

button[type="submit"]:disabled:hover,
button[type="button"]:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Animation de validation pour les champs */
input.valid,
select.valid,
textarea.valid {
    border-color: var(--success-green) !important;
    animation: validPulse 0.5s ease;
}

input.invalid,
select.invalid,
textarea.invalid {
    border-color: var(--error-red) !important;
    animation: shake 0.5s ease;
}

@keyframes validPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
    }
}

/* Récapitulatif */
#recap {
    background: linear-gradient(135deg, rgba(249, 200, 14, 0.1), rgba(250, 214, 72, 0.1));
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    margin-top: 2rem;
    border-left: 5px solid var(--primary-yellow);
    border: 1px solid rgba(249, 200, 14, 0.3);
    box-shadow: 0 8px 25px var(--shadow-light);
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

#recap h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-family: "Noto Serif", serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

#recap h2::before {
    content: '📋';
    font-size: 1.8rem;
}

#recap p {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border-left: 3px solid var(--secondary-blue);
    transition: var(--transition-smooth);
}

#recap p:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

#recap strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Modal de récapitulatif */
.recap-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 1rem;
}

.recap-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none;
}

.recap-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 650px;
    width: 100%;
    position: relative;
    margin: auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 9999999;
    position: relative;
}

.recap-modal-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.recap-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.recap-modal-header h2 {
    font-family: "Noto Serif", serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.recap-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.recap-modal-body {
    padding: 2.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.recap-modal-body::-webkit-scrollbar {
    width: 8px;
}

.recap-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.recap-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 10px;
}

.recap-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    margin-bottom: 1rem;
    gap: 1.5rem;
    transition: var(--transition-smooth);
    border: 1px solid rgba(26, 75, 140, 0.1);
}

.recap-item:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px var(--shadow-light);
    transform: translateX(5px);
}

.recap-item:last-child {
    margin-bottom: 0;
}

.recap-label {
    font-weight: 700;
    color: var(--primary-blue);
    min-width: 160px;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.recap-value {
    color: var(--dark-gray);
    text-align: right;
    word-break: break-word;
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

.recap-modal-footer {
    padding: 2rem;
    background: linear-gradient(180deg, rgba(245, 245, 245, 0.5), rgba(255, 255, 255, 0.8));
    border-radius: 0 0 20px 20px;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    border-top: 1px solid rgba(26, 75, 140, 0.1);
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 180px;
    justify-content: center;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    box-shadow: 0 6px 20px rgba(26, 75, 140, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(26, 75, 140, 0.4);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.btn-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(-1px);
}

/* Responsive pour la modal de récapitulatif */
@media (max-width: 768px) {
    .recap-modal {
        padding: 0.5rem;
    }

    .recap-modal-content {
        max-width: 100%;
        border-radius: 15px;
    }

    .recap-modal-header {
        padding: 2rem 1.5rem;
    }

    .recap-modal-header h2 {
        font-size: 1.6rem;
    }

    .recap-modal-body {
        padding: 1.5rem;
        max-height: 50vh;
    }

    .recap-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .recap-label {
        min-width: auto;
    }

    .recap-value {
        text-align: left;
    }

    .recap-modal-footer {
        padding: 1.5rem;
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .recap-modal-header h2 {
        font-size: 1.4rem;
    }

    .recap-subtitle {
        font-size: 0.9rem;
    }

    .recap-modal-body {
        padding: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Responsive général */
@media (min-width: 768px) {
    .container {
        margin-top: 8rem;
    }

    .form-row {
        display: flex;
        gap: 1.5rem;
    }

    .form-row .form-group {
        flex: 1;
    }

    #recap {
        padding: 2.5rem;
    }
    
    #messeForm {
        padding: 3rem;
    }
}

@media (min-width: 992px) {
    .container {
        padding: 3rem 2rem;
        margin-top: 8rem;
    }

    header h1 {
        font-size: 2.8rem;
    }
    
    #messeForm {
        padding: 3.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 1.5rem 0.75rem;
        margin-top: 6rem;
    }
    
    header {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }
    
    #messeForm {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    button[type="submit"],
    button[type="button"] {
        max-width: 100%;
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }
}

/* Styles pour la navbar et le footer (assurez-vous qu'ils sont cohérents) */
.navbar {
    background-color: var(--primary-blue);
    /* Ajoutez ici les styles existants de votre navbar */
}

.footer {
    background-color: var(--primary-blue);
    color: var(--white);
    /* Ajoutez ici les styles existants de votre footer */
}

/* Animation pour le chargement */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Styles pour la notification modale */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999999;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none;
}

.notification-content {
    background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 3.5rem 3rem;
    max-width: 550px;
    width: 90%;
    text-align: center;
    position: relative;
    border: 1px solid rgba(46, 204, 113, 0.3);
    z-index: 99999999;
}

.notification-icon {
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.notification-icon i {
    font-size: 4.5rem;
    color: #ffffff;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4);
    position: relative;
}

.notification-icon i::after {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    border: 2px solid rgba(46, 204, 113, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.notification-text h3 {
    color: #2c3e50;
    font-family: "Noto Serif", serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.notification-text p {
    color: #5a6c7d;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.close-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.close-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.close-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(46, 204, 113, 0.5);
}

.close-btn:hover::before {
    width: 300px;
    height: 300px;
}

.close-btn:active {
    transform: translateY(-1px);
}

.close-btn i {
    font-size: 1.2rem;
}

/* Responsive pour notification modal */
@media (max-width: 576px) {
    .notification-content {
        padding: 2.5rem 1.5rem;
        border-radius: 20px;
    }
    
    .notification-icon i {
        font-size: 3.5rem;
        width: 80px;
        height: 80px;
    }
    
    .notification-text h3 {
        font-size: 1.6rem;
    }
    
    .notification-text p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .close-btn {
        padding: 0.85rem 2.5rem;
        font-size: 1rem;
    }
}
