body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(120deg,#667eea,#764ba2);
    background:black;
    color:#fff;
   padding:0;
   margin:5px;
}
form.login{
    display:flex;
    flex-direction: column;
    align-items: center;
    gap:10px;  
}
.connection{
    display:flex;
    flex-direction: column;
    align-items: center;
    gap:10px;  
}
.font{
    font-size: 15px;
}


h1 { text-align:center;
}
h2 {
    text-align: center;
    display:none;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr) 15px; /* 7 jours + semaine largeur 15px*/
    gap: 4px;
    height: 100%;          /* ou hauteur fixe si nécessaire */  
}

.age{
    color:black;
    font-size: 16px;
    font-weight: bold;
}

/* numero semaine */
.week-number {
    width: 15px;
    font-size: 12px;
    line-height: 60px;
    height:60px;
    text-align: center;
    background: #ffffff34;;
    color: #fff;
    border-radius: 4px;
    justify-self: start;   /* collé à gauche de la ligne */
    align-self: center;
}


/* Case vide */
.day.empty {
    background: transparent;
    cursor: default;
}

.day {
    background:#ffffff34;
    border-radius:12px;
    padding:2px;   
}


.event {
    background:#ffffffdd;
    color:#000;
    border-left:16px solid rgb(204, 197, 0);
    border-radius:8px;
    padding:5px;
    margin-bottom:5px;
    font-size:16px;
    text-align: center;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box; /* inclut padding et border dans les dimensions */
    margin-top: 25px;

}

.event.important {
    border-left:16px solid rgb(220, 80, 80);
    background:#ffeaea;
}
.event.fait {
    position: relative;
    border-left: 16px solid rgb(0, 142, 0);
    background-color: rgb(125, 182, 125);
}

/* TEXTE VERTICAL */
.event.fait::before {
    content: "F\A A\A I\A T"; /* chaque lettre sur une ligne */
    position: absolute;
    left: -14px;              /* ajuster selon la position souhaitée */
    top: 50%;                 
    transform: translateY(-50%); /* centrer verticalement */
    white-space: pre;          /* respecter les retours à la ligne \A */
    font-weight: bold;
    color: rgb(255, 255, 255);               /* couleur du texte */
    text-align: center;        /* centrer les lettres horizontalement */
}

/* pour le nom du partage*/
.shared {
    color: blue;
}
/* pour le par "🔗 par" */
.shared-by {
    color: rgb(0, 0, 0);       /* noir */
}

.form {
    display: flex;
    flex-direction: column;
    align-items: center; /* centre les champs horizontalement */
    gap: 8px;           /* espace entre les champs */   
    margin: 0 auto 20px auto; /* centrer et espacement bas */
}

.calendar-form input[type="time"] {
    flex: 1;          /* prend tout l’espace disponible */
    min-width: 240px;     /* permet à flexbox de ne pas bloquer la largeur */
    text-align: center;
}
/* Inputs désactivés grisés correctement */
.calendar-form input:disabled,
.calendar-form select:disabled {
    background-color: #ddd; /* gris clair */
    color: #666;            /* texte gris foncé */
    cursor: not-allowed;
    opacity: 0.7;
}

input,select{
    padding:10px;
    border-radius:8px;
    border:none;   
    font-size: 16px;
    text-align: center;
    text-align-last: center; /* indispensable pour Firefox */
    width:240px;
}

.birthday-mode::placeholder {
    color: black;
    opacity: 1;
}


button{
    padding:10px;
    border-radius:8px;
    border:none;
    background:#00e6b8;
    font-weight:bold;
    cursor:pointer;
}
button#ajout_rdv{
    margin-top:25px;
    background:#00e6b8;
    font-size: 16px;
    cursor:pointer;
    width:250px;
}

#nouveau_rdv {
    max-width: 400px;
    margin: 10px auto;
    padding: 20px 25px;
    background: #cbcbcb;
    border: 2px solid rgb(255, 255, 255);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Titre */
#nouveau_rdv h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* Champs du formulaire */
#nouveau_rdv input,
#nouveau_rdv select {
    width:260px;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;  
}
.priorite{
    margin-left:10px;
    background-color: white;
}
/* Ligne heures */
#nouveau_rdv .ligne {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Bouton ajouter */
#nouveau_rdv .ajout {
    width: 100%;
    padding: 12px;
    background: #2d89ef;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#nouveau_rdv .ajout:hover {
    background: #1b5fc9;
}


button.ajout{
   width:220px;
   font-size: 16px;
   border-radius: 8px;
}
.home {
    min-height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
}

.btn {
    padding:12px 14px;
    background:#00e6b8;
    color:#000;
    text-decoration:none;
    border-radius:30px;
    font-weight:bold;
    transition:0.3s;
}

.btn:hover {
    padding:12px 14px;
    transform:scale(1.05);
}

.btn.secondary {
   
    background:#ffffffaa;
    text-align: center;
    width:160px;
 
}
.font{
    width:190px;
}
.modif-event{
    margin:10px 0 10px 0;
}
.btn.modif{
   padding:0px 6px 0px 6px;
   color:orange;
   background-color: #ffe88e;
   font-size: 16px;
   border:solid 1px;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logout {
    color: #fff;
    background: #c0392b;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
}
.logout:hover {
    background: #e74c3c;
}
#showAllBtn {
    display:none;
}
select{
    width:260px;
    font-size: 17px;
}
select.email{
   font-size: 17px;
   width:260px;
   background-color: white;
}

/* Jour avec anniversaire */

.anniversaire {
    width: auto; /* on peut laisser auto pour que le texte s'ajuste */
    background-color: rgb(125, 182,125);
    border-radius: 8px;
    color: white; /* texte lisible sur fond vert */
    text-align: center;
}
/* Cacher la checkbox native */
.anniv-wrapper .anniv-checkbox {
    display: none;
}

/* Styliser le label comme une case + texte */
.anniv-wrapper label {
    display: inline-flex;
    align-items: center;
    gap: 60px;                  /* espace entre carré et texte */
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: rgb(125, 182,125);
    color: white;
    user-select: none;
    position: relative;
    font-size: 18px;
    width: 258px;    
}

/* Créer le carré pour la checkbox */
.anniv-wrapper label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 4px;
    background-color: white;
    position: relative;
}

/* Afficher la croix quand coché */
.anniv-wrapper .anniv-checkbox:checked + label::before {
    background-color: teal;
}

/* Croix X à l’intérieur du carré */
.anniv-wrapper .anniv-checkbox:checked + label::after {
    color: white;
    position: absolute;
    left: 8px;                   /* position dans le carré */
    top: 6px;
    font-size: 12px;
    font-weight: bold;
}


/* ===== En-tête jour (bulle + nom) ===== */

.day-top {
    display: flex;
    flex-direction: column; /* vertical */
    align-items: center;    /* centrer horizontalement */
    gap: 11px;    
    height:97%;           /* espace entre jour et numéro */
    line-height: 100%;
    border:solid rgba(0, 0, 0, 0)  2px;
    border-radius:8px;
   }

.day-bubble {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #5a5a5a;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    min-width:35px;
    min-height:35px;
    box-sizing: border-box;
    border: solid 5px #00000058;
}

/* evenement existant*/
/* Bulle du jour avec un RDV */
.day-bubble.has-event {
    /*background: rgb(190, 70, 70);*/
    background: rgb(255, 247, 0);
    color: rgb(0, 0, 0);
    box-sizing: border-box;
    border: solid 5px #9f9500;
}
/* Bulle d'un jour avec événement important */
.day-bubble.important-event {
    box-sizing: border-box;
    border: 5px solid rgb(196, 49, 49);   /* bordure rouge solide */
}
.day-bubble.has-event.fait {
    border: 5px solid #009f15 !important;
    background: #eaffee !important;
}
/* Jour actuel */
.day.today {
    background-color: #007bff; /* bleu */
    color: #fff;          /* texte en blanc */
    border-radius: 12px;
    line-height: 100%;  
}

.day-top.jour-anniversaire{
    background-color: #7db67d;
    border-radius: 10px;
    height:20px;
   
}

/* Jour event retard */
.day-bubble.retard {
    color: rgb(255, 0, 0);
    font-weight: 900;   
    animation: blinkOrange 1s infinite;
}

@keyframes blinkOrange {
    0%   { opacity: 1; }
    50%  { opacity: 0.3; }
    100% { opacity: 1; }
}

/* ------------------------- */
/* Conteneur du partage */
.share-box {
    border: 1px solid #ccc;
    border-radius: 12px;
    max-width: 260px;
    margin-left: 10px;
    background-color: #fafafa;
    color:black;
}
.shared-box {
    border: 1px solid #ccc;
    border-radius: 12px;
    min-width: 260px;
    background-color: #fafafa;
    color:black;
}
/* Titre du bloc */
.share-title {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

/* Chaque item (checkbox + label) */
.share-item {
    display: flex;
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.share-item span{
margin-bottom: 10px;
}

/* Checkbox stylée */
.share-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4a90e2; /* couleur moderne */
    cursor: pointer;
    margin-left: 95px;
}
/* Texte */
.share-item span {
    font-size: 14px;
    color: #333;
   
}


/* --------------------------- */


.day-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: white;
}

.calendar.single-day {
    display: flex !important;
    justify-content: center;
    align-items: flex-start;
}

/*edit formulaire*/
.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
/* Espacement vertical entre les champs */
.page-center form {
    display: flex;
    flex-direction: column;
    gap: 12px; /* espace entre chaque input */
}

/* Optionnel : largeur cohérente */
.page-center input{
    width: 240px;
}
.page-center select, .page-center button {
    width: 260px;
}

/* Masquer tous les événements par défaut (affichage mois complet) */
.event {
    display: none;
}

/* Masquer tous les événements quand on est en mois complet (optionnel, pour être sûr) */
.calendar:not(.single-day) .event {
    display: none;
}

/* Formulaire caché par défaut (mois complet) */
.form{
    display: none;
}
/* Formulaire visible en mode journée */
.calendar.single-day ~ .form{
    display: flex; /* ou block si tu veux */
}
.single-day~ h2{
    display:block;
}
button.mod{
    color:rgb(0, 0, 0);
    padding:5px;
    border-radius:8px;
    border:solid 2px rgb(0, 255, 225);
    width:90px;
    font-weight: 600;
}
button.mod-modif{
    max-width:100px;
    border-radius:8px;
    font-size: 15px;
    color:black;
}


a.annuler{
    color:rgb(0, 0, 0);
    padding:5px;
    border-radius:8px;
    border:none;
    min-width:240px;
    text-decoration:none;
    background-color: #e7bf3c;
    font-weight: 600;
    line-height: 30px;
    text-align: center;
    margin-top:20px;
}
a.annuler-modif{
    color:rgb(0, 0, 0);
    padding:5px;
    border-radius:8px;
    border:none;
    min-width:60px;
    text-decoration:none;
    background-color: #e7bf3c;
    font-weight: 600;
    line-height: 30px;
    text-align: center;
}

a.supprimer{
    padding:5px;
    border-radius:8px;
    border:none;
    width:80px;
    text-decoration:none;
    background-color: #e76d3c;
    color:rgb(0, 0, 0);
    font-weight: 600;
    line-height: 30px;
}

.edit {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box; /* ajoute ceci */
    width: 240px;
}
input.date{
    color:blue;
    /*background-color: grey;*/
    font-weight: 800;
    font-size: 15px;
    text-align: center;
}.month-nav {
    font-size: 2rem;          /* grosseur des flèches */
    text-decoration: none;
    color: #007BFF;           /* bleu stylisé */
    transition: color 0.2s, transform 0.2s;
}

.month-nav:hover {
    color: #0056b3;           /* bleu plus foncé au survol */
    transform: scale(1.2);    /* léger agrandissement au survol */
}

/* Cacher les numéros de semaine en mode jour unique */
.calendar.single-day .week-number {
    display: none;
}

/*Case jours avant et apres calendrier acruel*/
.day.other-month {
    opacity: 0.5;
    pointer-events: none;
}

.day-bubble.grey {
    background: rgb(101, 101, 101);
    color: rgb(150, 150, 150);
}
.ligne {
    display: flex;
    flex-direction: column;   
    border-radius: 8px;
    text-align: center;
    min-width: 260px;
}


/*label{
    width: 260px;
}*/


.modification label{
    width: 240px;
}

.ligne input[type="time"] {   
    min-width: 260px;
    min-height:35px;
    font-size: 16px;
    box-sizing: border-box;
}
::placeholder {
    font-size: 1.1em;
}

span{
    text-align: center;
}
h1{display:none;
}

/* ====== VUE ANNUELLE ====== */
.year-view {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 10px;
    padding: 10px;
    justify-content: center;
}

@media (min-width: 600px) {
    .year-view {
        grid-template-columns: repeat(3, auto);
    }
}

@media (min-width: 900px) {
    .year-view {
        grid-template-columns: repeat(4, auto);
    }
}

.mini-month {
    background: rgb(92, 92, 92);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);    
  
}

.mini-month h4 {
    text-align: center;
    margin: 4px 0;
    font-size: 14px;
}

.mini-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

/* Nom des jours */
.mini-day-name {
    font-size: 10px;
    text-align: center;
    color: rgb(0, 0, 0);
}

/* Jours */
.mini-day {
    text-align: center;
    font-size: 11px;
    position: relative;
}

/* Bulle du jour */
.mini-day {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 50%;
}

/* Jour avec événement */

.mini-day.has-event span {
    background-color: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Cases jours autres du mois */
.mini-day.empty {
    visibility: hidden;
}


/* Jour avec anniversaire (vue annuelle) */
.mini-day.jour-anniversaire {
    background-color: #a0e6a0;
    border-radius: 4px;
    font-weight: bold;
    color:black;
    font-size: 12px;
   }

   /* ===== JOUR ACTUEL (CLIGNOTANT) ===== */

/* Aujourd’hui → clignote toujours */
/* Carré qui clignote même sans anniversaire */
.mini-day.today {
    width: 22px;
    height: 22px;
    display: inline-block;
    background-color: #3498db;
    animation: blinkToday 1.5s infinite;
    border-radius: 4px /* 👈 carré parfait */
}

/* Carré qui clignote en vert si anniversaire */
.mini-day.today.jour-anniversaire {
    animation: blinkTodayBirthday 1.5s infinite;
}

@keyframes blinkToday {
    0%   { background-color: #3498db;font-weight: bold;font-size: 14px;}
    50%  { background-color: #5dade200;}
    100% { background-color: #3498db;font-weight: bold;font-size: 14px;}
}

@keyframes blinkTodayBirthday {
    0%   { background-color: #3498db;color:white }
    50%  { background-color: #a0e6a0; color:black}
    100% { background-color: #3498db;color:white }
}


/* Cacher le day-bubble uniquement en vue jour */
/*.calendar.single-day .day-bubble {
    display: none;
}*/
.calendar.single-day .day-bubble {
    display: flex;
    margin-top:-35px;
    margin-left: -278px;
}

.calendar.single-day .day-name {
    display:flex;
    font-size: 18px;
}

.calendar.single-day .day-top {
    display:flex;
    font-size: 18px;
    margin-top:5px;
    background-color: rgb(91, 91, 91);
    max-height:22px;
    min-height:22px;
}