html,body{margin:0;padding:0;}

body{
  position: relative;
  font-family:var(--font-body);
  color:var(--parchment);
  background:
    radial-gradient(1100px 700px at 15% 10%, rgba(201,162,39,.10), transparent 60%),
    radial-gradient(900px 600px at 85% 90%, rgba(122,58,48,.14), transparent 60%),
    linear-gradient(160deg, var(--forest-deep), var(--forest) 55%, var(--forest-soft));
  min-height:100vh;
  overflow-x:hidden;
}

body::before {
  content:"";
  position: absolute; /* Solon'ilay fixed */
  inset:0;
  pointer-events:none;
  opacity:.05;
  background-image:
    repeating-linear-gradient(45deg, var(--gold) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, var(--gold) 0 1px, transparent 1px 26px);
  z-index: 0;
}

/* ---------------------------------------------------------------------------------------- */

.bienvenue-container {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 3rem 3.5rem;
    text-align: center;
    max-width: 420px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}
 
.bulle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.35;
}
 
.bulle1 {
    width: 100px;
    height: 100px;
    top: -30px;
    left: -30px;
    background: #6a82fb;
    animation: flotter1 4s ease-in-out infinite;
}
 
.bulle2 {
    width: 130px;
    height: 130px;
    bottom: -40px;
    right: -40px;
    background: #fc5c7d;
    animation: flotter2 5s ease-in-out infinite;
}
 
.icone {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    animation: rebond 2s ease-in-out infinite;
}
 
.titre {
    position: relative;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0.5rem;
    animation: apparition 0.8s ease-out;
}
 
.sous-titre {
    position: relative;
    color: #666;
    font-size: 1rem;
    animation: apparition 0.8s ease-out 0.15s both;
}
 
@keyframes flotter1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, 15px); }
}
 
@keyframes flotter2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, -12px); }
}
 
@keyframes rebond {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-8deg); }
    75% { transform: translateY(-2px) rotate(8deg); }
}
 
@keyframes apparition {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- CONTAINER HO AN'NY AKANY (RESPONSIVE GRID) --- */
.cont-main {
    max-width: 1200px;
    margin: 20px auto; /* Misy elanelana kely amin'ny lohany sy ny tongotra */
    padding: 0 15px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    box-sizing: border-box;
}

/* Rehefa amin'ny Ordinatera (Écran lehibe > 768px) */
@media (min-width: 768px) {
    .cont-main {
        grid-template-columns: 320px 1fr; /* Ny formulaire amin'ny havia, ny tabilao amin'ny havanana */
    }
    .pan_buton_2 {
        grid-column: span 2; /* Mivelatra be ny bokotra eo ambany */
    }
}

/* --- STYLE AN'IREO BLOC A SY B (KARATRA) --- */
.bloc_A, .bloc_B {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

/* --- BLOC A: FORMULAIRE --- */
#confirm-Form label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #4a5568;
    display: block;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

#confirm-Form input[type="tel"],
#confirm-Form input[type="number"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#confirm-Form input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.button_valide {
    width: 100%;
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.button_valide:hover {
    background-color: #27ae60;
}


/* BULLETIN DE NOTES  */

/* Ny boaty lehibe mampifanila ny sary sy ny soratra */
.profilecard {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Fandaminana ny sary */
.photoprofile {
    flex-shrink: 0; /* Tsy avela hikorontana na hiha-kely ny sary */
}

.profilepic {
    width: 250px;
    height: 310px;
    object-fit: cover; /* Miaro ny sary tsy ho tsentsina na ho lava loatra */
    border-radius: 12px;
    border: 3px solid #f1f5f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.profilepic:hover {
    transform: scale(2.03); /* Mihetsika kely rehefa lalovan'ny totozy */
}

/* Fandaminana ny soratra */
.infoprofile {
    flex-grow: 1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 16px;
    margin: 0;
}

.infoprofile dt {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
    white-space: nowrap; /* Misoroka ny fidinan'ny lohateny an-daharana */
}

.infoprofile dd {
    margin: 0;
    font-weight: 500;
    color: #1a202c;
    font-size: 1rem;
    border-bottom: 1px dashed #edf2f7;
    padding-bottom: 4px;
}

.infoprofile dd:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

/* ---------- Message d'alert et confirmation ---------- */

/* Styling ho an'ny Alert */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px; /* Boribory kely ny sisiny */
    font-family: 'Manrope', sans-serif; /* Mampiasa ny font nampiasainao */
    font-size: 14px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Shadow maivana */
}

/* Specific ho an'ny Danger (Error) */
.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* Fanampiana icon kely (Optionel fa tena mody be) */
.alert-danger::before {
    content: "⚠️"; /* Emoji fampitandremana */
    margin-right: 10px;
    font-size: 18px;
}

.alert {
    transition: opacity 0.5s ease;
}

/* Ny style fototra ho an'ny hafatra fanamafisana */
.confirme {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Ny style manokana ho an'ny fahombiazana */
.confirme-valide {
    color: #0f5132;          /* Maitso maizina ho an'ny soratra */
    background-color: #d1e7dd; /* Maitso mavo kely (pastel) ho an'ny background */
    border: 1px solid #badbcc;
}

/* Fanampiana icon kely mba ho kanto kokoa */
.confirme-valide::before {
    content: "✅"; /* Emoji marika fisavana */
    margin-right: 10px;
    font-size: 18px;
}

.confirme, .alert {
    animation: fadeIn 0.5s ease;
}

/* REHEFA AMIN'NY SARY KELY (MOBILE) */
@media (max-width: 550px) {
    .profilecard {
        flex-direction: column; /* Mifampongoa indray */
        text-align: center;
        padding: 16px;
    }
    
    .infoprofile {
        grid-template-columns: 1fr; /* Milatsaka an-daharana tokana */
        gap: 6px;
        width: 100%;
    }

    .infoprofile dd {
        border-bottom: none;
        padding-bottom: 8px;
    }
} 


/* ============================================================================================ */

/* Style Danger Floating Fixed - Apetraka eo ambany mba tsy hanakona menu */
.alert-danger-archive {
    position: fixed;
    top: 400px; 
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 1100px;
    z-index: 99999; /* Ambonin'ny element rehetra */

    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #fef2f2;
    border: 2px solid #ef4444;
    border-left: 8px solid #dc2626;
    border-radius: 10px;
    padding: 12px 20px;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.35);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Animation Pulse mena */
    animation: redDistressPulse 1.2s infinite ease-in-out;
}

.alert-danger-archive .alert-icon-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    flex-shrink: 0;
    animation: blinkIcon 0.8s infinite alternate;
}

.alert-danger-archive .alert-content { 
    flex: 1; 
}

.alert-danger-archive .alert-title {
    margin: 0 0 2px 0;
    color: #991b1b;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.alert-danger-archive .alert-text {
    margin: 0;
    color: #7f1d1d;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
}

.alert-danger-archive .alert-text strong {
    color: #ffffff;
    background-color: #dc2626;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.4);
}

@keyframes redDistressPulse {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
        border-color: #ef4444;
        background-color: #fef2f2;
    }
    50% {
        box-shadow: 0 0 28px 10px rgba(220, 38, 38, 0.6);
        border-color: #991b1b;
        background-color: #fee2e2;
    }
}

@keyframes blinkIcon {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.2); opacity: 0.8; }
}
/* =============================================================================================== */